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

Be friendly to SBT plugins that also use URLHandlerRegistry.setDefault #183

Merged
merged 7 commits into from
Nov 24, 2017

Conversation

tpunder
Copy link
Contributor

@tpunder tpunder commented Nov 22, 2017

Other plugins (for example: https://github.com/frugalmechanic/fm-sbt-s3-resolver)
also make use of the URLHandlerRegistry.setDefault mechanism to register handlers
for other protocols (e.g. "s3"). This change makes it so that SBT will only
register the http/https protocols and will preserve any other protocol handlers
that have already been registered.

NOTE: This has now been tested and fixes #175

dwijnand and others added 7 commits October 13, 2017 15:00
fix incorrect eviction warning message
Other plugins (for example: https://github.com/frugalmechanic/fm-sbt-s3-resolver)
also make use of the URLHandlerRegistry.setDefault mechanism to register handlers
for other protocols (e.g. "s3").  This change makes it so that SBT will only
register the http/https protocols and will preserve any other protocol handlers
that have already been registered.
@typesafe-tools
Copy link

The validator has checked the following projects against Scala 2.12,
tested using dbuild, projects built on top of each other.

Project Reference Commit
sbt 1.x sbt/sbt@8b1cab0
zinc 1.x sbt/zinc@b1e7eac
io 1.x sbt/io@e8c9757
librarymanagement pull/183/head 8330d16
util 1.x sbt/util@f4eadfc
website 1.x

✅ The result is: SUCCESS
(restart)

@tpunder
Copy link
Contributor Author

tpunder commented Nov 22, 2017

I've now tested this fix and it resolves the conflict with fm-sbt-s3-resolver.

Here is what I did:

  • Built sbt/librarymanagement locally and did a publishLocal
  • Build sbt/sbt locally (using sbt -Dsbtlm.path=../librarymanagement) and did a publishLocal
  • Updated my project using fm-sbt-s3-resolver to use my -SNAPSHOT version of sbt
  • Cleared my .ivy/cache
  • Verified my project still downloaded all dependencies
  • Published my project using the fm-sbt-s3-resolver plugin. This now works! It previously failed.
  • Repeated the previous steps for my project using both sbt -Dsbt.gigahorse=true and sbt -Dsbt.gigahorse=false

So from my standpoint everything looks good!

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, thank you @tpunder!

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@eed3si9n eed3si9n changed the base branch from 1.x to 1.0.x November 24, 2017 22:22
@eed3si9n
Copy link
Member

I'm retargeting this to 1.0.x branch so we can include this in sbt 1.0.x.
Luckily other commits seems like fixes too.

@eed3si9n eed3si9n merged commit 50d024a into sbt:1.0.x Nov 24, 2017
robhudson added a commit to mozilla/moztelemetry that referenced this pull request Nov 27, 2017
After merging it was discovered that there was a bug in sbt [1]
preventing `sbt publish` from working. This reverts the changes and
updates until this bug is fixed and a new sbt release published.

[1] sbt/librarymanagement#183
robhudson added a commit to mozilla/moztelemetry that referenced this pull request Nov 27, 2017
After merging it was discovered that there was a bug in sbt [1]
preventing `sbt publish` from working. This reverts the changes and
updates until this bug is fixed and a new sbt release published.

[1] sbt/librarymanagement#183
fbertsch pushed a commit to mozilla/moztelemetry that referenced this pull request Nov 27, 2017
After merging it was discovered that there was a bug in sbt [1]
preventing `sbt publish` from working. This reverts the changes and
updates until this bug is fixed and a new sbt release published.

[1] sbt/librarymanagement#183
robhudson added a commit to mozilla/moztelemetry that referenced this pull request Nov 30, 2017
This adds a Docker container to run locally for development and for
testing, as well as updates various dependencies to latest versions,
and moves to CircleCI for testing and publishing.

This commit differs from the prior commits by using sbt 1.0.4 which
fixes a problem with `sbt publish`.
See: sbt/librarymanagement#183
robhudson added a commit to mozilla/moztelemetry that referenced this pull request Nov 30, 2017
This adds a Docker container to run locally for development and for
testing, as well as updates various dependencies to latest versions,
and moves to CircleCI for testing and publishing.

This commit differs from the prior commits by using sbt 1.0.4 which
fixes a problem with `sbt publish`.
See: sbt/librarymanagement#183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants