Commit Graph

323 Commits

Author SHA1 Message Date
Martin Duhem d9722fa7e4 Notes for #2708 2016-08-24 14:01:34 +02:00
Eugene Yokota 954e744408 Adds templateResolvers and `new` command
This adds `new` command, which helps create a new build definition. The
`new` command is extensible via a mechanism called the template
resolver,
which evaluates the arbitrary arguments passed to the command to find
and run a template.

As a reference implementation [Giter8][g8] is provided as follows:

    sbt new eed3si9n/hello.g8

This will run eed3si9n/hello.g8 using Giter8.

  [g8]: http://www.foundweekends.org/giter8/
2016-08-22 02:38:46 -04:00
xuwei-k b92e5773f7 `aggregate` can now be used inside a .sbt file 2016-07-25 12:07:49 +09:00
Dale Wijnand 83075a90f5 Fixes #2654 Silence macro recompilation info message
As well as add a test for the macro recompilation info message feature.
2016-07-08 01:03:32 +01:00
Eugene Yokota cbcdbf44d3 Notes 2016-06-30 23:37:13 +02:00
Eugene Yokota 1f50eacc50 Notes 2016-06-30 14:34:37 +02:00
Anatoly Fayngelerin 182fc544f0 Merge branch '0.13' into depends-on-build-sbt-two 2016-06-30 08:13:34 -04:00
Eugene Yokota 8004649040 Notes 2016-06-30 13:37:47 +02:00
Anatoly Fayngelerin fcedd17270 dependsOn can now be used inside a .sbt file for a subproject 2016-06-29 17:20:28 -04:00
Eugene Yokota ae58cf342b Fixes merged ModuleID dropping configuration specification. Fixes #2002/#1500
Given a dependency graph such as:

    libraryDependencies += "com.google.guava" % "guava-tests" % "18.0"
    libraryDependencies += "com.google.guava" % "guava-tests" % "18.0"
% "test" classifier "tests"

previous releases of sbt would drop the Test configuration from the
classifier "tests" artifacts, and end up including the test JARs into
the Compile configuration instead of the Test configuration, which
would result in runtime error.

This fix configures the explicit artifacts into the configuration
during merge even when it says `"*"`.
2016-06-12 01:27:19 -04:00
Eugene Yokota ec554f2d9d notes 2016-06-10 12:21:49 -04:00
Miles Sabin e98b2363c2 Override scala organization and version transitively at the Ivy level. Fixes #2286. 2016-06-02 12:07:30 +01:00
ekrich fd5f87e7b4 Add Windows script support and native file extensions on Unix platforms
When running a sbt script, this change lets the user on UNIX and
Windows platforms to use native file extensions like none/.sh or
.bat/.cmd. The code copies the file to the sbt boot/hash/src_managed
directory with a .scala extension.
2016-05-10 12:32:32 -07:00
Eugene Yokota c75a386a82 Adds withIncludeSynthToNameHashing. Ref #2537
Provides a workaround flag `incOptions :=
incOptions.value.withIncludeSynthToNameHashing(true)` for name hashing
not including synthetic methods. This will not be enabled by default in
sbt 0.13. It can also enabled by passing `sbt.inc.include_synth=true`
to JVM.
2016-04-05 22:57:59 -04:00
Dale Wijnand f2f12022a5 Deprecate the Build trait 2016-03-31 16:47:12 +01:00
Martin Duhem 791358abb0 Notes for #2469 2016-02-25 16:09:17 +01:00
Eugene Yokota d281c3561d notes 2016-02-22 02:22:29 -05:00
Eugene Yokota 7ebba1c54e sbt 0.13.11 is the new 0.13.10 2016-02-21 18:50:17 -05:00
Eugene Yokota be69daeb8d Add notes for #2453 2016-02-11 16:32:39 -05:00
Eugene Yokota 9da5fc871b Changed the flag name to "sbt.global.autoimport" per review. 2016-01-26 03:05:30 +09:00
Dale Wijnand 26b9d9c1ab Notes: Collapse an improvement into its fix 2016-01-22 23:19:03 +00:00
Dale Wijnand 8a12edbfa0 Notes: Reword some passages 2016-01-22 23:18:31 +00:00
Dale Wijnand 899ac9eb98 Notes: Fix links 2016-01-22 23:14:27 +00:00
Dale Wijnand 223cb2632e Notes: Sort issues, move ivy/jline to the top 2016-01-22 23:11:43 +00:00
Eugene Yokota 06658661a1 Hand merged notes 2016-01-22 14:47:37 -05:00
Tim Harper 7d86bc70d3 bugfix - apply autoImports for global plugins at global configuration stage
Previously, the autoimports for globally defined plugins were not
imported for global configuration files, although they were imported for
project configuration files.

This patch causes an additional plugin discovery phase to happen during
global config evaluation, so that auto-plugins can be detected and their
imports subsequently included.
2016-01-18 15:05:29 -07:00
Eugene Yokota c55c3ec966 Merge branch 'backport/internal-tracking' into wip/internal 2016-01-13 12:59:51 -05:00
Eugene Yokota 98b26ae5d3 Inter-project dependency tracking. Fixes #2266
Adds `trackInternalDependencies` and `exportToInternal` settings. These
can be used to control whether to trigger compilation of a dependent
subprojects when you call `compile`. Both keys will take one of three
values: `TrackLevel.NoTracking`, `TrackLevel.TrackIfMissing`, and
`TrackLevel.TrackAlways`. By default they are both set to
`TrackLevel.TrackAlways`.

When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`,
sbt will no longer try to compile internal (inter-project) dependencies
automatically, unless there are no `*.class` files (or JAR file when
`exportJars` is `true`) in the output directory. When the setting is
set to `TrackLevel.NoTracking`, the compilation of internal
dependencies will be skipped. Note that the classpath will still be
appended, and dependency graph will still show them as dependencies.
The motivation is to save the I/O overhead of checking for the changes
on a build with many subprojects during development. Here's how to set
all subprojects to `TrackIfMissing`.

    lazy val root = (project in file(".")).
      aggregate(....).
      settings(
        inThisBuild(Seq(
          trackInternalDependencies := TrackLevel.TrackIfMissing,
          exportJars := true
        ))
      )

The `exportToInternal` setting allows the dependee subprojects to opt
out of the internal tracking, which might be useful if you want to
track most subprojects except for a few. The intersection of the
`trackInternalDependencies` and `exportToInternal` settings will be
used to determine the actual track level. Here's an example to opt-out
one project:

    lazy val dontTrackMe = (project in file("dontTrackMe")).
      settings(
        exportToInternal := TrackLevel.NoTracking
      )
2016-01-13 12:56:28 -05:00
Eugene Yokota 83b725559f Fix notes 2016-01-06 22:12:01 -05:00
Eugene Yokota 5661b0fac4 Adds release note to #2343 2016-01-06 17:52:53 -05:00
eugene yokota f00f6fd541 Merge pull request #2344 from smarter/0.13-dotty
Make sbt aware of Dotty
2016-01-03 20:22:13 -05:00
Guillaume Martres 10265efd9c Make sbt aware of Dotty
This small set of changes, together with the compiler-bridge I wrote
(https://github.com/smarter/dotty-bridge) enables us to compile code
using Dotty in sbt, see https://github.com/smarter/dotty-example-project
for an example.
2016-01-03 20:35:29 +01:00
Eugene Yokota 0d925630df Fixes #1827. Adds withInterProjectFirst to update option.
withInterProjectFirst when set to true will prioritize inter-project
resolver over all other resolver and Ivy cache.
This aimed to workaround the fact that on Maven Test configuration is
considered private, and thus project dependency with `test->test`
configuration may not under some condition. The condition is when
someone resolves `x:y:1.0` and you have a subproject named and
versioned exactly that, and some other subproject tries to depend on
it. This happens when the project does not change the version number on
the Github.
2015-12-31 01:22:27 -05:00
Eugene Yokota e82e6652d0 Move intransitive warning to update. Ref #2127 2015-12-30 13:41:31 -05:00
eugene yokota bfb602c29b Merge pull request #2313 from sbt/wip/refix-snapshots
Fixes #1514. Enable latest SNAPSHOT option by default
2015-12-30 10:31:07 -05:00
Eugene Yokota 1bf789eb3d Fixes #1616. Fixes the "latest snapshot" chain resolver
The "latest snapshot" chain resolver was assuming that there's at least
one artifact per module. I think that was the root cause of #1616.
2015-12-30 04:46:20 -05:00
eugene yokota b87a4acc2e Merge pull request #2338 from sbt/wip/nightly_launchconfig
Include sbt-ivy-snapshots to launchconfig
2015-12-29 23:45:50 -05:00
Eugene Yokota 585e727a97 Include sbt-ivy-snapshots to launchconfig
Include sbt-ivy-snapshots to launchconfig
Prior to this change, the launchconfig for sbt was generated using
Transform's resource generator so releases would include
`typesafe-ivy-releases` repo, and snapshot releases would include
`typesafe-ivy-snapshots` and `sonatype-snapshots` repos in addition.
This is no longer useful since nightly builds are now published to
`sbt-ivy-snapshots` instead, which is backed by Bintray.

This removes the switching logic, so both `typesafe-ivy-releases` and
`sbt-ivy-snapshots` repos are always included into the launchconfig.
This removes the step of needing to download a launcher just to try the
nightly builds.
2015-12-29 19:48:57 -05:00
Eugene Yokota fd347f0020 Release note for #2325 2015-12-29 18:13:58 -05:00
eugene yokota 05e5ae311b Merge pull request #2322 from dwijnand/drop-sealed-from-Append-typeclasses
Drop sealed from the typeclasses in Append
2015-12-29 13:00:57 -05:00
Eugene Yokota 9699f4b1b7 Adds bootIvyConfiguration to grab compiler bridge source. Fixes #2336
As described in #2336, I noticed that when using 0.13 nightly from
Bintray, sbt was unable to locate the compiler source.
Since `updateSbtClassifiers` is already set up to download sbt's own
sources, the `ivyConfiguration` should be reused. However, `compilers`
is a derived task, which is unable to depend on a scoped key.
To workaround this I had to create a new key called
`bootIvyConfiguration`. This should now use the metabuild's resolvers
to download the compiler bridge source.
2015-12-28 17:15:02 -05:00
Eugene Yokota c796c77386 Add useJCenter setting, which is set to false. Fixes #2217
Adds a new setting `useJCenter`, which is set to `false` by default.
When set to `true`, JCenter will be placed as the first external
resolver to find library dependencies.

The implementation of `externalResolvers` is changed to incorporate the
setting by calling `Resolver.reorganizeAppResolvers`. These changes
were required because `externalResolvers` uses whatever that's in the
launchconfig, which the build user may not upgrade.
2015-12-25 23:20:56 -05:00
Eugene Yokota 6b3f6901af Add JCenter change to 0.13.9's notes 2015-12-25 21:49:01 -05:00
Dale Wijnand 164fb5f847 Drop sealed from the typeclasses in Append 2015-12-18 14:04:52 +00:00
eugene yokota d3cb46951b Merge pull request #2261 from Duhemm/fix-1171
Consider signatures of methods before and after erasure in ExtractAPI
2015-12-16 13:24:42 -05:00
Eugene Yokota 12bdfda224 Artisanal hand merging of release notes 2015-12-15 03:08:40 -05:00
Eugene Yokota d1caf32a86 Adds release note for #2303 2015-12-14 17:19:15 -05:00
Eugene Yokota e6c846db47 Fixes #1514. Enable latest SNAPSHOT option by default
#1520 originally fixed #1514 by reimplementing part of chain resolver
to check all resolvers to find the latest snapshot artifacts.
This behavior did not work well with Maven repositories where sbt was
failing to calculate the correct publication dates.
Now that #2075 fixes the Maven integration issue we should enable this
flag back again.

The build user can opt out by:

    updateOptions := updateOptions.value.withLatestSnapshots(false)
2015-12-14 16:59:55 -05:00
Eugene Yokota 8d2a15da6e Bumping Scala version to 2.10.6. 2015-12-14 05:26:34 -05:00
Eugene Yokota 4e8d5e827e Merge 2015-12-03 17:08:45 -05:00
eugene yokota 8749a969c3 Merge pull request #2297 from sbt/wip/fix-2264
Fixes #2264. Fixes updateClassifiers when default configuration is missing + uses listed artifacts if any
2015-12-03 02:11:52 -05:00
Eugene Yokota 3a3965b5f5 Fixes #2264. Use explicit artifacts if any, fallback to hardcoded
Even though it's not really used, updateClassifiers constructs
dependency graph based on the result from update.
The direct cause of #2264 came from the fact that the `allModules`
returned from ConfigurationReport did not include dependency
configurations. For example it returned "compile" instead of
"compile->runtime". I've identified that in #2264 and was fixed by
@Duhemm in f49fb33e6d.

Martin identified that the fix still does not address the fact that
updateClassifier hardcodes the classifiers to be tried. This commit
adds the fallback behavior so for Ivy-published modules it will use the
explicit list of artifacts, and for others it will fallback to the
hardcoded list of classifiers.
2015-12-02 16:41:02 -05:00
eugene yokota c5b7fc1d9c Merge pull request #2272 from Duhemm/fix-1968
Don't pass `-J<flag>` to local java, improve javac's error parsing
2015-11-27 15:37:16 -05:00
Dale Wijnand f270cd2a5c Add Resolver.bintrayIvyRepo 2015-11-25 09:26:58 +00:00
Martin Duhem a8d644eb45 Merge branch '0.13' into fix-1968 2015-11-12 09:15:47 +01:00
eugene yokota 222623071a Merge pull request #2271 from Duhemm/fix-2228
Report failed compilation if errors are registered.
2015-11-12 02:14:08 -05:00
Martin Duhem 5934350aa2 Notes for #2261 2015-11-11 14:55:52 +01:00
Martin Duhem 590c4d07ef Notes for sbt/sbt#2272 2015-11-11 14:41:26 +01:00
Martin Duhem e19ca7bf85 Notes for sbt/sbt#2271 2015-11-11 14:30:05 +01:00
Huw Giddens cbeaba0ccd Update per the changes since August. 2015-11-11 21:35:57 +11:00
Martin Duhem 26e15c2dd4 Add notes for #2258 2015-10-28 16:05:45 +01:00
Dale Wijnand 397c25679f Add notes for #1750. 2015-08-28 23:38:49 +01:00
Josh Suereth da8bb5b621 Merge pull request #2151 from dwijnand/add-Def.settings
Extract Def.settings from Project#settings.
2015-08-25 09:52:27 -04:00
Huw Giddens 68330d042a Add notes for PR. 2015-08-24 18:36:26 +10:00
Dale Wijnand 786dc7fd10 Add notes for MavenRepository.localIfFile. 2015-08-23 17:33:19 +01:00
Dale Wijnand dcbbc531ed Add notes for PR 2151. 2015-08-20 18:45:42 +01:00
Dale Wijnand a432c3def1 Merge remote-tracking branch 'origin/0.13.9' into merge-0.13.9-into-0.13
* 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
2015-08-11 22:42:31 +01:00
Eugene Yokota 946ee17081 Notes 2015-08-11 17:24:55 -04:00
Eugene Yokota 431a90264d Fixes #2129. break up circular dependency loops in cached resolution
Simple remove-one method to workaround for circular dependency did not
work. This fix traverses the entire graph to detect all loops and then
breaks them up.
2015-08-03 07:31:32 -04:00
Josh Suereth f3b5bcc02b Merge pull request #2127 from sbt/wip/warn-on-intransitive-pom
Add warning to MakePom for intransitive dependencies.
2015-07-25 08:23:09 -04:00
Josh Suereth 92acfe1287 Fixes from review 2015-07-24 12:48:11 -04:00
Josh Suereth 9beff22d9a Add warning to MakePom for intransitive dependencies.
Intransitive does not work in Maven, and does not translate to pom.xml.
2015-07-24 10:42:49 -04:00
Josh Suereth bad1e9d487 Add handling for transitive exclude rules in pom.xml files.
Fixes #2109

* Add maven resolver tests back to travisCI
* Disable ivy.xml translation test from maven-repository-resolver config, due to incorrect assumptions.
2015-07-23 15:32:27 -04:00
eugene yokota c703b2a6a0 Merge pull request #2116 from sbt/0.13.9
Merge 0.13.9 back into 0.13
2015-07-18 13:36:04 -04:00
Josh Suereth d0e918d6d3 Merge pull request #2114 from pdalpra/add-append.sequence-list
Add an Append.Sequence instance for List
2015-07-18 07:05:59 -04:00
Pierre DAL-PRA 10c71b3f8a Add an Append.Sequence instance for List, fixes #2107 2015-07-18 10:51:31 +02:00
Eugene Yokota 7eb7df017e Fixes #2105/#1763. Cached resolution: removes duplicate callers during merge 2015-07-18 02:17:25 -04:00
Pierre DAL-PRA f944ec98d2 Log javaOptions/fork interactions:
- When forking, log the javaOptions that are used
- When javaOptions are defined but fork := false, warn that javaOptions
	will be ignored
2015-07-18 00:37:35 +02:00
eugene yokota 5824ef6d7f Merge pull request #2106 from Duhemm/interface-specific-sources-clean
Find most specific version of compiler interface sources
2015-07-17 10:25:16 -04:00
fkorotkov c73f513016 review comments 2015-07-16 15:49:06 -04:00
fkorotkov a6f83dda97 added a note 2015-07-16 15:23:24 -04:00
Dale Wijnand 5428c07420 Move PR 2085 notes. 2015-07-16 16:24:45 +01:00
Martin Duhem 3195d7256e Notes 2015-07-16 15:46:14 +02:00
Josh Suereth 4abc8386f2 Merge pull request #2085 from twitter-forks/stuhood/java-static-final-fields-as-singletons
Encode static-final constant fields as Singletons
2015-07-14 12:35:56 -04:00
Stu Hood e3ba86fdbb Add notes for the change 2015-07-13 21:38:48 -07:00
eugene yokota 67d908a4a6 Merge pull request #2101 from sbt/0.13.9
merge 0.13.9 on 0.13
2015-07-10 16:07:05 -04:00
Eugene Yokota 0b718bb3fa notes 2015-07-10 11:40:38 -04:00
Pierre DAL-PRA ea0abefac9 Add notes 2015-07-09 23:45:01 +02:00
Martin Duhem 6c123f22ba Hide stacktrace on compilation error in build definition 2015-07-09 11:40:02 +02:00
Eugene Yokota a9f0a16486 Merge notes 2015-06-28 22:06:52 -04:00
eugene yokota f44f4540db Merge pull request #2079 from sbt/wip/distinct-rename
Fixes #1973. Renames distinct to distinctName
2015-06-28 21:58:46 -04:00
Eugene Yokota 16b95a4d62 Add distinctPath 2015-06-28 14:41:32 -04:00
Dale Wijnand 81524b1b6a Add notes for #2008/#2009. 2015-06-28 12:22:38 +01:00
Eugene Yokota 4bae8b3acb Fixes #1973. Renames distinct to distinctName 2015-06-27 05:56:43 -04:00
Eugene Yokota f0dbbe15b0 Release note for #2075/#2005 2015-06-27 05:38:24 -04:00
Eugene Yokota 81f175ddbf Fixes #1666 2015-06-20 00:51:42 -04:00
Josh Suereth 0c1d07dde7 Merge pull request #2006 from jroper/run-input-task
Added Extracted.runInputTask
2015-06-17 10:12:51 -04:00
James Roper 3625ce5943 Added Extracted.runInputTask
This provides a convenience function for running an input task from the
extracted state. This is particularly useful for commands, release steps
etc that may want to run input tasks, like scripted.
2015-06-10 16:09:09 +02:00
Eugene Yokota 558585c88f Fix links 2015-06-10 10:54:28 +02:00
Eugene Yokota 97956ac9eb Notes 2015-06-09 18:10:45 +02:00