-
Notifications
You must be signed in to change notification settings - Fork 277
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
adding possibility to specify custom repositories for coursier (#1521) #1586
Conversation
@@ -91,7 +91,7 @@ class ScalafmtDynamicDownloader( | |||
"https://oss.sonatype.org/content/repositories/snapshots" | |||
), | |||
MavenRepository.of("https://oss.sonatype.org/content/repositories/public") | |||
) | |||
) ++ customRepositories |
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.
i think custom repos should either override the defaults, or have higher priority - one usecase of this (ours) is that oss repositories are disabled and must go through our own artifactory and it causes timeouts when trying to download stuff from OSS ... therefore it makes sense to try custom repositories first and fallback on defaults
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.
timeouts are good point, will move it in the front then
a724e32
to
2c9c15f
Compare
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.
@slivkamiro thank you so much for this! |
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.
Thank you for this contribution! One comment, otherwise looks great!
/** | ||
* Use this repositories to resolve dependencies. | ||
*/ | ||
Scalafmt withRepositories(String ... repositories); |
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.
Let's make it clear that these must be Maven repositories
Scalafmt withRepositories(String ... repositories); | |
Scalafmt withMavenRepositories(String ... repositories); |
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.
no problem, I will amend the commit if you don't mind
Yes, see scalameta/sbt-scalafmt#73 |
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.
LGTM 👍 Thank you for this contribution!
I'm kind of lost in tests. I would need help with writing a test for ScalafmtDynamicDownloader, if necessary (I haven't found any).
I'm also struggling with sbt-scalafmt part. I can't find a way how to map resolvers configuration into list of string urls. Any ideas?