-
Notifications
You must be signed in to change notification settings - Fork 3
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
Try to exploit newtypes over FilePath more to better separate semantics #249
Comments
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
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
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
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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clarification and motivation
After #230 we still have some ambiguities around
FilePath
, e.g. it may be always in Posix format or platform dependent.I first abandoned this idea, but it starts getting more desired to me just as a measure to make the code more readable. Namely: let's introduce some
MarkdownFilePath
orPosixFilePath
that would be used in markdown links. And leaveFilePath
for platform-dependent version of path.This way one can easily understand the expected format at any place in the code just by looking at the type.
We may end up using posix-formatted paths in at least two places after #230 - in
FileInfo
and in error type, so having a separate type starts to make sense for me.On implementation notes:
FileInfo
, let's probably do so.Acceptance criteria
The text was updated successfully, but these errors were encountered: