-
-
Notifications
You must be signed in to change notification settings - Fork 419
Run examples with local repo under out/ rather than ~/.ivy2/local #5949
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
base: main
Are you sure you want to change the base?
Run examples with local repo under out/ rather than ~/.ivy2/local #5949
Conversation
What's the benefit of making these changes? |
Sorry, forgot to mention that in the PR description. That's been useful to me when using a locally published Mill version, to develop on Mill or other projects. Running examples or ITs erases it, which is annoying, but also somewhat unexpected (running tests shouldn't erase things in the local repository, at least not things put there manually on purpose). |
Conflicts: integration/ide/build-classpath-contents/src/BuildClasspathContentsTests.scala integration/ide/gen-idea/resources/extended/idea/mill_modules/mill-build.iml integration/ide/gen-idea/resources/extended/idea/mill_modules/mill-build.mill-build.iml integration/ide/gen-idea/resources/hello-idea/idea/mill_modules/mill-build.iml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. But doesn't this make some tests sensitive to env variable MILL_STABLE_VERSION
being not 1
?
@lefou What do you mean? It makes them sensitive to the Mill version not being |
Yeah. I mean, it would be nice if the test suite still works in a release build. But a release build will most likely not have the version |
This changes how Mill is run in integration tests and examples. This makes it stop publishing things under
~/.ivy2/local
, and use something likeout/dist/localRepo.dest
instead, which is theTask.dest
of the newdist.localRepo
task. That new repository is a local Maven repositiory rather than an Ivy one, which has a slightly different file structure, the same as Maven Central.For that new repository to be taken into account, the Mill launcher used in examples and ITs is now a script (bat under Windows, bash everywhere else) that sets the
COURSIER_REPOSITORIES
env var, so that the new local repo is added to it, and gets automatically used when running examples and ITs.The second commit of this PR mainly updates the file names of the locally published Mill artifacts, because of the switch from an Ivy repository to a Maven one.
That's been useful to me when using a locally published Mill version, to develop on Mill or other projects. Running examples or ITs erases it, which is annoying, but also somewhat unexpected (running tests shouldn't erase things in the local repository, at least not things put there manually on purpose). This PR fixes that.