There are just too many instances in which sbt's code relies on
the `lastModified`/`setLastModified` semantics, so instead of moving
to `get`/`setModifiedTime`, we use new IO calls that offer the new
timestamp precision, but retain the old semantics.
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.
JDK 9 complains when java.lang.reflect.Field#setAccessible is called.
So on JDK 9 to get the default Authenticator on JDK you can just call
Authenticator.getDefault(). However lm targets JDK 8..
So on JDK 8 we do what we've always done, and on JDK 9 we use java
reflection to call Authenticator.getDefault(), which is public and
doesn't require setAccessible(true).
Fixes#169
- Replace usage of OkUrlFactory with just direct calls to the OkHTTP
API. This allows us to ensure that connections get properly closed, and
provides finer-grained internal control of how we make http requests.
- Ensure that exceptions/error status codes don't cause leaked or
hanging connections. Previously, a 404 on an artifact download would
cause the underlying OkHTTP client to keep the request and connection
open. This has the effect of wasting resources, but also slowing down
overall download/resolution time to non-pipelined HTTP servers.
Previously the warning read:
Attempting to overwrite $destination
This usage is deprecated and will be removed in sbt 1.0.
This is an empty threat since we did not remove the feature.
I'm replacing it with:
Attempting to overwrite $destination (non-SNAPSHOT)
You need to remove it from the cache manually to take effect.
Fixessbt/sbt#3271
Fixessbt/sbt#3287
I'm not sure why we started to see these messages, but given that their info is mapped to our info, it kind of makes sense that it is surfacing. The fix is hacky, but it should work.
Fixessbt/sbt#3331
The siatuation is a bit complicated.
Currently the credentials are stored in Ivy's credential store.
This needs to be translated into `java.net.Authenticator` by installing `IvyAuthenticator` and `ErrorMessageAuthenticator` in succession.
This, then, needs to be translated into OkHttp Authenticator using `okhttp3.JavaNetAuthenticator`.
The NonRelease pattern matcher is ony checking for the third segment, but for sbt 1.x, we need to check both the second and third segment since 1.1.0-M1 would be bincompat with 1.0.
Fixessbt/sbt#3360
This splits the core of LM and Ivy-based implementation.
- InlineConfiguration is renamed to ModuleConfiguration
- IvyScala is renamed to ScalaModuleInfo
- UpdateConfiguration, RetrieveConfiguration, PublishConfiguration are refactored to use builder pattern.
- Adds ConfigRef for referencing Configuration
- Moves syntax related things into `sbt.librarymagement.syntax`
* origin/0.13.9:
Notes
0.13.9
cached resolution: use mutable map to speed up breakLoops
cached resolution: don't include callers from evicted modules
Add debug logs
Fixes#2129. break up circular dependency loops in cached resolution
try breaking circular dependency and continue sorting
refactored to use less stack space
make sortModules tailrec
Reproduce stack overflow using cached resolution with circular dependency