fm-sbt-s3-resolver
fm-sbt-s3-resolver copied to clipboard
`s3CredentialsProvider` is no longer respected with SBT 1.3.x/Coursier
We recently upgraded from SBT 1.2.8 to 1.3.8 and saw the following regression:
In our primary build.sbt, we defined a custom s3CredentialsProvider. In 1.2.8, this was evaluated and called and seemed to work. With 1.3.8, when Coursier is enabled, the custom s3CredentialsProvider is never called (though the setting itself appears to be evaluated at a later point). Debugging shows that, when https://github.com/frugalmechanic/fm-sbt-s3-resolver/blob/master/src/main/scala/fm/sbt/S3ResolverPlugin.scala#L123 runs, the s3CredentialsProvider that is defined in the root built.sbt is not yet initialized/visible.
A workaround we found is to define our custom s3CredentialsProvider in project/plugins.sbt
I'll try to play around with this when I have a chance.
@stephenjudkins Are you saying that if you disable Coursier in SBT 1.3.8 then s3CredentialsProvider works as expected?
Yep. With (useCoursier in Global) := false it works as before; with Coursier enabled we had to move our custom s3CredentialsProvider to project/plugins.sbt to get it to work.
@stephenjudkins I see SBT 1.3.9 just got released with some classpath changes for Coursier. Does that make things start working or does the bug persist?
The bug persists in 1.3.9.
This seems worse with SBT 1.5.5, now not even having s3CredentialsProvider in project/plugins.sbt works. The only way I'm able to get this working is to add Global / useCoursier := false. Any ideas, @tpunder?
@therockstorm do you have an example of the custom provider?