Skip to content
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

s3CredentialsProvider is no longer respected with SBT 1.3.x/Coursier #59

Open
stephenjudkins opened this issue Mar 25, 2020 · 7 comments

Comments

@stephenjudkins
Copy link

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.

@harpocrates
Copy link

A workaround we found is to define our custom s3CredentialsProvider in project/plugins.sbt

@tpunder
Copy link
Owner

tpunder commented Mar 26, 2020

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?

@stephenjudkins
Copy link
Author

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.

@tpunder
Copy link
Owner

tpunder commented Mar 31, 2020

@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?

@harpocrates
Copy link

The bug persists in 1.3.9.

@therockstorm
Copy link

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?

@er1c
Copy link
Contributor

er1c commented Dec 16, 2021

@therockstorm do you have an example of the custom provider?

@tpunder tpunder mentioned this issue Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants