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
and there is no .cache/coursier under $PWD.
If run COURSIER_CACHE=$(PWD)/.cache/coursier ./mill -i clean, the artifacts are downloaded into $(PWD)/.cache/coursier and ref path in out/ point to $(PWD)/.cache/coursier
The text was updated successfully, but these errors were encountered:
I'm actually not sure what the best thing to do here is.
Environment variables in general could refer to anything, so we can't just assume they are all paths. But passing relative paths to the Mill process is generally not going to work, since different Mill workers would have different working directories, as would different mill -i no-server processes.
At the same time, being unable to reliably pass relative paths to environment variables is a huge footgun, beyond the specific Coursier behavior here. While libraries using OS-Lib may do the right thing (since you need to pass in the relative path base to os.Path(str, base) directly), there is a good chance they won't (e.g. if they rely on os.pwd which is the sandbox folder), and there'll be third-party libraries that use java.io/nio directly. And people expect when passing relative paths from the terminal that they will be relative to the current working directory, and not some weird sandbox folder
Not sure what we can do here other than documenting "please use $(PWD) when passing relative paths as env variables"
run
COURSIER_CACHE=.cache/coursier ./mill -i clean
andout/mill-build/runClasspath.json
gives things like this:COURSIER_CACHE=.cache/coursier ./mill clean
gives:and there is no
.cache/coursier
under $PWD.If run
COURSIER_CACHE=$(PWD)/.cache/coursier ./mill -i clean
, the artifacts are downloaded into$(PWD)/.cache/coursier
and ref path inout/
point to$(PWD)/.cache/coursier
The text was updated successfully, but these errors were encountered: