Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make canonical paths relative to the repository root #239

Closed
aeqz opened this issue Dec 14, 2022 · 0 comments · Fixed by #263
Closed

Make canonical paths relative to the repository root #239

aeqz opened this issue Dec 14, 2022 · 0 comments · Fixed by #263
Assignees

Comments

@aeqz
Copy link
Contributor

aeqz commented Dec 14, 2022

Clarification and motivation

After the #230 refactor, we will be using a custom FilePath canonicalization that is weaker than System.Directory.canonicalizePath. It currently applies a FilePath.makeAbsolute transformation and we can try to avoid it in order to reduce some filesystem state dependency.

Acceptance criteria

  • If possible, replace the FilePath.makeAbsolute transformation in our canonicalizePath function by another transformation that allows us to hold paths relative to the repository root instead of absolute ones.
aeqz added a commit that referenced this issue Jan 9, 2023
Problem: after refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: we now use POSIX relative paths during the analysis, and
system dependant ones for reading file contents in the scan phase.
@aeqz aeqz self-assigned this Jan 9, 2023
aeqz added a commit that referenced this issue Jan 13, 2023
Problem: after refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: we now use POSIX relative paths during the analysis, and
system dependant ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 18, 2023
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 20, 2023
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 24, 2023
Problem: When a file name contains unusual characters, its output line
in git ls-files is quoted and Xrefcheck parses the file name wrong.

Solution: If a git ls-files output line starts with a double quote, use
the String Read instance for parsing it.
aeqz added a commit that referenced this issue Jan 24, 2023
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 25, 2023
Problem: After changing the progress bar interface to require progress
unit witnesses, some functions related to an anonymous task timestamp
also started to require a progress unit witness, which complicates its
usage unnecessarily.

Solution: Do not require a progress unit witness for setTaskTimestamp
and getTaskTimestamp.
aeqz added a commit that referenced this issue Jan 25, 2023
Problem: When a file name contains unusual characters, its output line
in git ls-files is quoted and Xrefcheck parses the file name wrong.

Solution: Use the git ls-files -z option to output lines verbatim with
null character line terminators.
aeqz added a commit that referenced this issue Jan 25, 2023
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 25, 2023
Problem: After changing the progress bar interface to require progress
unit witnesses, some functions related to an anonymous task timestamp
also started to require a progress unit witness, which complicates its
usage unnecessarily.

Solution: Do not require a progress unit witness for setTaskTimestamp
and getTaskTimestamp.
aeqz added a commit that referenced this issue Jan 27, 2023
Problem: After refactoring the FilePath usages in the codebase to have a
canonical representation of them, we noticed that further improvements
could be applied, such as clarifying whether the path is system
dependent and avoiding absolute file system paths.

Solution: We now use POSIX relative paths during the analysis, and
system dependent ones for reading file contents in the scan phase.
aeqz added a commit that referenced this issue Jan 27, 2023
Problem: After changing the progress bar interface to require progress
unit witnesses, some functions related to an anonymous task timestamp
also started to require a progress unit witness, which complicates its
usage unnecessarily.

Solution: Do not require a progress unit witness for getTaskTimestamp.
aeqz added a commit that referenced this issue Jan 27, 2023
Problem: When a file name contains unusual characters, its output line
in git ls-files is quoted and Xrefcheck parses the file name wrong.

Solution: Use the git ls-files -z option to output lines verbatim with
null character line terminators. The file not found message has also
been improved for the case in which its link contains a backslash.
aeqz added a commit that referenced this issue Jan 27, 2023
Problem: We currenlty have golden tests for anchor case-sensitivity, but
not for path case-sensitivity.

Solution: A golden test for path case-sensitivity has been added and the
previous one has been renamed.
@aeqz aeqz closed this as completed in #263 Jan 27, 2023
aeqz added a commit that referenced this issue Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant