Commit Graph

17940 Commits

Author SHA1 Message Date
Alexandre Archambault 95289d9657 Rename CONTRIBUTING.md to DEVELOP.md
So that it doesn't appear as recommended reading before submitting PRs
2017-05-15 18:54:29 +02:00
Alexandre Archambault 763106bf96 Switch to tut 0.5.1 2017-05-15 18:54:29 +02:00
Alexandre Archambault f62a110cfa Bump dependencies 2017-05-15 18:54:29 +02:00
Alexandre Archambault 2f350e058b Add sbt-updates 2017-05-15 15:32:49 +02:00
Alexandre Archambault 5ca736b87a Move property file under coursier namespace
Should make it move along the rest when shading coursier
2017-05-15 15:32:48 +02:00
Alexandre Archambault 9c7168fbc7 Add alias 2017-05-15 15:32:48 +02:00
Alexandre Archambault 89c3b3544d Don't create too visible empty directories during build 2017-05-15 15:32:48 +02:00
Alexandre Archambault f8c05d570b Dummy renaming in build 2017-05-15 15:32:47 +02:00
Alexandre Archambault 0b864ddabf Merge pull request #542 from xuwei-k/rename
fix github organization name. s/alexarchambault/coursier
2017-05-15 14:19:57 +02:00
xuwei-k a729d5a2c4 fix github organization name. s/alexarchambault/coursier 2017-05-13 23:14:23 +09:00
eugene yokota d3ff3fb63a migrate PluginTrigger and ProjectOrigin to Contraband (#3191)
and move TestFramework to a non case class.
2017-05-13 13:01:51 +01:00
eugene yokota 9e799a80f3 Merge pull request #97 from scalacenter/unique-resolvers
Allow to define concrete resolvers for dependencies
2017-05-12 22:57:53 -04:00
jvican 8bb1676e61
Allow to define concrete resolvers for dependencies
Sometimes, for predictability and performance, we may be interested in
specifying the concrete resolver that a `ModuleID` should use.

This patch achieves this by adding a new field to `UpdateOptions` and
then getting this information from the `SbtChainResolver`, that will
select the concrete resolver for a given dependency descriptor.

Why is this useful? Well, two reasons:

* Predictable behaviour. We have the guarantee that an artifact only
  comes from a concrete resolver.
* Resolution speedup. Around 1/3 or 1/2 times faster than normal
  resolution in a moderate test case scenario. If there is a lot of
  latency or network connection is poor, speedups will be higher.

LOGS:

```
NORMAL RESOLUTION TIME 1790
FASTER RESOLUTION TIME 1054
```

```
NORMAL RESOLUTION TIME 2078
FASTER RESOLUTION TIME 1055
```

Lots of projects can benefit from this option, as well as organizations
and companies. This will eventually integrate with the dependency lock
file, but can be used independently of it.
2017-05-12 23:47:05 +02:00
eugene yokota 3b55a30141 Merge pull request #98 from scalacenter/issue-3051
Fix sbt/sbt#2650: Degrade log level and clarify
2017-05-12 13:24:20 -04:00
jvican 92cc5339eb
Fix sbt/sbt#2650: Degrade log level and clarify
To ensure that SNAPSHOTs are always the latest, we go through all the
resolved modules and check their timestamps. Good.

However, if in the process of reparsing/redownloading the module
descriptor we fail (or it's not found in that resolver at all), then we
cannot refresh the resolved module that could have been internalized or
heavily cached in memory by ivy. We do this for correctness.

This patch does two things:

1. Adds more comments.
2. Warns only when there are parsing errors in ivy files.
3. Adds debug info in the rest of the cases.

This removes the pain of seeing `Unable to parse` that could be caused by
other reasons that are not related to parsing at all and which would not
affect the algorithm at hand. For instance, if we get a URLResource,
that's totally fine -- there is no way we could parse the ivy file. Ivy
uses URLResources in several cases where the artifact origin URL is
specified.
2017-05-12 18:56:00 +02:00
eugene yokota ccc63d3ee0 Merge pull request #100 from scalacenter/add-frozen-mode
Add a frozen mode to update configuration
2017-05-12 12:43:24 -04:00
eugene yokota 40fa6dcd3b Merge pull request #96 from scalacenter/sbt-chain-resolver-rewrite
Make `SbtChainResolver` readable
2017-05-12 12:40:26 -04:00
Alexandre Archambault 107cdf2aa4 Fix typo 2017-05-12 13:33:08 +02:00
Alexandre Archambault 325e8c84ee Add release notes for 1.0.0-RC3 2017-05-12 13:28:02 +02:00
Alexandre Archambault 8f7c7756d0 Setting version to 1.0.0-SNAPSHOT 2017-05-12 13:18:52 +02:00
Alexandre Archambault 67b3b06895
Updates for 1.0.0-RC3 2017-05-12 13:18:38 +02:00
Alexandre Archambault 10860681e6 Setting version to 1.0.0-RC3 2017-05-12 13:04:32 +02:00
Dale Wijnand 50cc045a70 Merge pull request #3189 from eed3si9n/wip/more-case-class
[sbt 1.0] migrate ForkOptions to Contraband
2017-05-12 11:12:48 +01:00
Alexandre Archambault 928ecb6170 Merge pull request #541 from coursier/develop
Latest developments
2017-05-12 11:32:05 +02:00
Eugene Yokota 3724277704 migrate ForkOptions to Contraband 2017-05-12 05:22:08 -04:00
Alexandre Archambault 688e5342f1 Add more refined typelevel test
Fixes https://github.com/coursier/coursier/issues/536
2017-05-12 00:00:14 +02:00
Alexandre Archambault e76f6170f1 Move typelevel-related things to new extra module 2017-05-12 00:00:14 +02:00
jvican b1e36e50c8
Add review comments and improve docs 2017-05-11 18:10:01 +02:00
jvican 5ff32f2a99
Add a frozen mode to update configuration
The frozen mode is used by the dependency lock file.

It makes sure that the resolution is always intransitive and that ivy
does not check for changed dependencies and stores that information in
the resolved ivy files. Following the ivy documentation, the last change
may bring a slight performance improvement:

http://ant.apache.org/ivy/history/latest-milestone/use/resolve.html
2017-05-11 18:00:24 +02:00
Alexandre Archambault 690b0b3215 Be fine with signatures of signatures of checksums of signatures of checksums of POMs
or various combinations of those
2017-05-11 17:48:45 +02:00
Alexandre Archambault 394f9f2bb6 Handle html entities in XML files 2017-05-11 17:48:44 +02:00
Alexandre Archambault 2f0eb1dba8 wuw 2017-05-11 17:48:44 +02:00
Alexandre Archambault fc38828818 Cleaning 2017-05-11 17:48:43 +02:00
Alexandre Archambault 83e04a8e45 Get parent metadata prior to requiring import dependencies 2017-05-11 17:48:43 +02:00
Alexandre Archambault bb4fcfceb6 Tweak console output 2017-05-11 17:48:43 +02:00
Alexandre Archambault 5af21ca88c Merge pull request #534 from coursier/topic/foo
Minor things
2017-05-11 12:52:00 +02:00
Alexandre Archambault b77016cf77 Merge pull request #533 from ChristopherDavenport/updateSupported
List Support for 0.13.15 in Readme
2017-05-11 12:51:45 +02:00
Dale Wijnand 0b2081bc3c Merge pull request #3184 from dwijnand/sbt-1-on-1
Upgrade the build to use sbt 1.0.0-M5
2017-05-11 10:31:21 +01:00
Dale Wijnand 0b33c195ef
Upgrade the build to sbt 1.0.0-M5
Some plugins remain commented out, for now.

sbt-doge is no longer needed because a variant of it has been folded
into sbt 1.

For some reason scripted requires src/doc jars of sbt, so switch back to
using `publishAll` rather than `publishLocalBinAll`. :(

Also, the sys.prop change in scripted is to force log4j2 to not use a
thread context classloader, and avoid the following:

    ERROR StatusLogger Unable to create custom ContextSelector. Falling back to default.
     java.lang.ClassCastException: Cannot cast org.apache.logging.log4j.core.async.AsyncLoggerContextSelector to org.apache.logging.log4j.core.selector.ContextSelector
    	at java.lang.Class.cast(Class.java:3369)
    	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:201)
    	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOfProperty(LoaderUtil.java:226)
    	at org.apache.logging.log4j.core.impl.Log4jContextFactory.createContextSelector(Log4jContextFactory.java:97)
    	at org.apache.logging.log4j.core.impl.Log4jContextFactory.<init>(Log4jContextFactory.java:58)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    	at java.lang.Class.newInstance(Class.java:442)
    	at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:94)
    	at org.apache.logging.log4j.spi.ThreadContextMapFactory.createThreadContextMap(ThreadContextMapFactory.java:73)
    	at org.apache.logging.log4j.ThreadContext.init(ThreadContext.java:223)
    	at org.apache.logging.log4j.ThreadContext.<clinit>(ThreadContext.java:202)
    	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createDefaultInjector(ContextDataInjectorFactory.java:83)
    	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createInjector(ContextDataInjectorFactory.java:67)
    	at org.apache.logging.log4j.core.lookup.ContextMapLookup.<init>(ContextMapLookup.java:34)
    	at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:117)
    	at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:125)
    	at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:46)
    	at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:650)
    	at org.apache.logging.log4j.core.layout.PatternLayout.createDefaultLayout(PatternLayout.java:487)
    	at sbt.internal.util.ConsoleAppender.<init>(ConsoleAppender.scala:245)
    	at sbt.internal.util.ConsoleAppender$.apply(ConsoleAppender.scala:196)
    	at sbt.internal.util.ConsoleLogger.<init>(ConsoleAppender.scala:42)
    	at sbt.internal.util.ConsoleLogger$.apply(ConsoleAppender.scala:34)
    	at sbt.test.ScriptedRunner.run(ScriptedTests.scala:221)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at Scripted$.doScripted(Scripted.scala:125)
    	at $0483e89d182e9d240274$.$anonfun$scriptedTask$5(build.sbt:301)
2017-05-11 09:44:42 +01:00
Eugene Yokota 080bd0d92f package signer 2017-05-11 00:11:11 -04:00
eugene yokota b1a1d03009 Merge pull request #3180 from eed3si9n/wip/zero2
[sbt 1.0] Rename scope component Global to Zero (`in Global` stays the same)
2017-05-10 16:48:40 -04:00
eugene yokota a265600154 Merge pull request #3151 from scalacenter/parallel-scripted-tests
Add parallel batch mode to scripted tests
2017-05-10 16:46:01 -04:00
jvican f967f6c1d7
Split project and aggregate project-load 2017-05-10 21:40:23 +02:00
jvican 272afa9d73
Try another travis structure + build tweaks
I've tried to put together some scripted tests to remove the overhead of
compiling the whole sbt, which is around 3 minutes every time.

This new structure *should* make the scripted tests run faster.

Aside from this, we do some more tweaks:

* Increase memory.
* Fork processes to compile and run (to see if it makes a difference).
* Pass in the server flag to sbt.
2017-05-10 21:40:23 +02:00
jvican 6813eb47af
Up memory for every scripted instance 2017-05-10 21:40:23 +02:00
jvican 3d6e0f9327
Handle empty case in `labelsAndDirs` 2017-05-10 21:40:22 +02:00
jvican 5e44ec7c53
Fix string-to-command to ignore existing commands
The scripted batch executor injects a command and the operation
performed in this test checks all the commands, assuming only `noop` is
declared.
2017-05-10 21:40:22 +02:00
jvican e01f5f5ef1
Fix auto-plugins temporarily until #3163 is fixed
Unfortunately, I think this uncovers a bug in duplicated computation of
settings in the `ThisBuild` and `Global` axis.
2017-05-10 21:40:22 +02:00
jvican 388ed641fb
Create a compiler plugin for scripted
The compiler plugin is more appropriate than running a series of
commands because of the effects of `set`.
2017-05-10 21:40:22 +02:00
jvican 80c8883219
Reboot to ditch state produced by scripted reload 2017-05-10 21:40:22 +02:00