-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Apply coursier default config files (repositories and mirrors config) #2886
Conversation
I'd favor just calling the configuration logic from coursier. Copied code will get out of sync eventually. Await is standard Scala, so it should be fine to use it. It's easy to identify as boilerplate when reviewing the code. |
5b88cc5
to
dd0344b
Compare
@lefou Now it is implemented using |
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.
Yeah, that's better.
We can import the execution context more local, e.g. just in the task.
Beside that, it looks good to me.
How did you test this? Would it be possible to add a small integration test under integration.feature
or example.misc
?
I test it by remove |
In an integration test, we could use a different empty temporary cache location and could either assert, that Mill fails as expected, or fills that repo as expected. |
8302c3d
to
9da85e5
Compare
@lefou I've add a test suite by setting the |
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 to me. Thanks for adding a test!
Thank you for this contribution, @jilen ! |
This is available in |
@jilen It would be really cool, if you could review our documentation regarding repository configuration. We should mention all potential ways to customize it. IIUC, we now also support some coursiers-specific config files. |
Fix #2312
Copied from
https://github.com/coursier/coursier/blob/main/modules/coursier/shared/src/main/scala/coursier/Resolve.scala#L61
It is possible to use
Resolve().finalRepositories.future()
to avoid the implementation detail.But that requires
Await
andExecutionContext
, I'm not sure whether worth doing it.