":" is used in various places in the codebase, this is wrong (it doesn't work on Windows) and should be replaced by File.pathSeparator
Regarding Windows, I noticed we use /, is that OK? Shouldn't we use File.separator?
/ is usually OK on Windows in Java, because the abstractions will convert them. Except of course if you get a file name from the file system the look for /es in it. If you do that you should first normalize.
Some progress in #5085 by @martijnhoekstra, but they suggest we shouldn鈥檛 be closing this yet.
@Blaisorblade I would suggest closing this for now -- I can't promise there are absolutely no hardcoded strings containing : remaining, though I reviewed all strings ":" and chars ':', there may still be "foo:bar"'s that are harder to find -- but this issue isn't actionable anymore I think
in scala, the platform-dependency issues tend to be
\r\n and \n represents a semantic difference if the line end is part of a multiline string, and println will emit \r\n on windows. Adding insult to injury, if windows users have git autocrlf set (out of dubious recommendations of compatibility) they may have crlf in their local repos where there is no such \r present in the original source.Ironically, many issues occur when one part of some system attempts to do platform compatibility for unneeded reasons (java println, git autoclrf, auto-conversion of /), and other parts don't, and then suddenly you have situations where you're checking for \r\n on windows while there is a \n which is working just fine, leading to errors or test failures.
Closing on @martijnhoekstra鈥檚 recommendation.
Most helpful comment
/is usually OK on Windows in Java, because the abstractions will convert them. Except of course if you get a file name from the file system the look for/es in it. If you do that you should first normalize.