You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for the property file checker (and by extension, the I18n checker and the compiler message checker) in section 16.1 of the manual states:
Multiple files are separated by colons ’:’.
There seems to be no particular technical reason for this being colon on all operating systems besides an oversight in assuming it works on all of them. However, on Windows this prevents the use of absolute paths for property files. So if you pass:
Then this is parsed as four files, the first and third being named "C". This is annoying with some build tools as making a relative path is not always easy (or even possible, should the properties live on another drive).
I think the obvious solution is to change the separator on Windows to be a semi-colon (or more generally, to be Java's File.pathSeparator). This does generate a backward incompatibility for users who are on Windows and use colons already (presumably with relative paths) with Apropfiles. However I think (a) this is still the right solution and (b) I can't see a way round this without instead introducing an extra property to specify the path separator, which seems overkill when the convention is already clear and justified on each OS (colon on Linux, semicolon on Windows).
(I'm happy to make the merge request if you agree on my solution of using File.pathSeparator on all OSes and updating the manual to match.)
The text was updated successfully, but these errors were encountered:
I agree with your suggestion of using File.pathSeparator. If you are willing to make the pull request, we would definitely appreciate it.
(Note: there will be a Checker Framework release in 2 days. Maybe we can get this merged by then, because it seems simple. But there is no pressure on you to meet that deadline, if it is not convenient for you.)
Thanks!
neilccbrown
added a commit
to neilccbrown/checker-framework
that referenced
this issue
Aug 30, 2022
…es, the internationalization checker and the compiler message checker) to use File.pathSeparator to separate property file paths, rather than ':' (as that prevented use of absolute paths like C:\myfile.props on Windows). Updated all the documentation and usages to match.
Fixestypetools#5273
The documentation for the property file checker (and by extension, the I18n checker and the compiler message checker) in section 16.1 of the manual states:
There seems to be no particular technical reason for this being colon on all operating systems besides an oversight in assuming it works on all of them. However, on Windows this prevents the use of absolute paths for property files. So if you pass:
Then this is parsed as four files, the first and third being named "C". This is annoying with some build tools as making a relative path is not always easy (or even possible, should the properties live on another drive).
I think the obvious solution is to change the separator on Windows to be a semi-colon (or more generally, to be Java's File.pathSeparator). This does generate a backward incompatibility for users who are on Windows and use colons already (presumably with relative paths) with Apropfiles. However I think (a) this is still the right solution and (b) I can't see a way round this without instead introducing an extra property to specify the path separator, which seems overkill when the convention is already clear and justified on each OS (colon on Linux, semicolon on Windows).
(I'm happy to make the merge request if you agree on my solution of using File.pathSeparator on all OSes and updating the manual to match.)
The text was updated successfully, but these errors were encountered: