Commit Graph

5343 Commits

Author SHA1 Message Date
Dale Wijnand 73b45f6d30
Cleanup code paths related to "last" 2017-06-20 14:03:56 +01:00
Dale Wijnand c85fbbf215 Merge pull request #3279 from sbt/wip/testlogger
Fixes test content logger dropping out, or displaying twice
2017-06-20 10:53:23 +01:00
Eugene Yokota f81598c6e9 Fixes test content logger dropping out, or displaying twice
Fixes #3117
2017-06-20 03:04:53 -04:00
eugene yokota 42dd5117e8 Merge pull request #3263 from eed3si9n/wip/bump_sbt
bump to using sbt 1.0.0-M6
2017-06-16 17:31:48 -04:00
Eugene Yokota 04f2a04fa4 sbt-scalafmt 1.3 2017-06-16 16:12:37 -04:00
eugene yokota 7909052513 Merge pull request #3262 from dwijnand/test-spam
Drop test spam.
2017-06-16 11:06:32 -04:00
Dale Wijnand 689ef7920e Merge pull request #3268 from scalacenter/issue/3245
Fix #3245: Add deprecated scripted `run` back
2017-06-14 11:12:43 +01:00
eugene yokota c250e4c82c Merge pull request #3269 from eed3si9n/wip/notes2
notes change
2017-06-13 18:37:30 -04:00
Eugene Yokota 94ec0af21a notes change 2017-06-13 18:36:50 -04:00
jvican d33985d219
Fix #3245: Add deprecated scripted `run` back 2017-06-14 00:10:44 +02:00
Dale Wijnand a08a84145b
Drop test spam.
Fixes #3116
2017-06-13 12:35:27 +01:00
Dale Wijnand 33212d2331
Cleanup test logging related code 2017-06-13 12:34:59 +01:00
Eugene Yokota bcc74a962e bump to using sbt 1.0.0-M6
We are missing the plugin for Scalafmt but I think we need to use beta2 ourselves.
2017-06-13 01:09:19 -04:00
eugene yokota a64a60342d Merge pull request #3247 from sbt/issue-tmpl-sbt-version
Add prompt for sbt version in the issue template
2017-06-05 08:20:56 +02:00
Dale Wijnand 2096655739 Add prompt for sbt version in the issue template
With sbt 1 in beta and the final release coming up bug reports and reproductions will start to diversify between sbt 0.13 and sbt 1. So let's try and get reporters to specify the version they're using.
2017-06-04 11:47:21 +02:00
kenji yoshida 260f6ee740 fix typo (#3246) 2017-06-04 00:28:22 +02:00
eugene yokota 8f777e04dc Merge pull request #3242 from BardurArantsson/add-gitter-badge
Add gitter badge to README.md
2017-06-03 06:11:45 +02:00
eugene yokota 646c7f9b39 Merge branch '1.0.x' into add-gitter-badge 2017-06-03 06:11:33 +02:00
eugene yokota 9534a677fb Merge pull request #3241 from BardurArantsson/patch-1
Update README.md
2017-06-03 06:11:10 +02:00
Bardur Arantsson 5beb336dfb Add gitter badge to README 2017-06-02 20:16:26 +02:00
Bardur Arantsson 260d70f436 Update README.md
Remove link to long-dead mailing list.
2017-06-02 19:22:52 +02:00
Dale Wijnand 50ed5ee8fe Link Johannes 2017-05-31 17:48:48 +02:00
eugene yokota 65f5ec5986 Merge pull request #3236 from eed3si9n/wip/notes
sbt 1.0.0-M6 notes
2017-05-31 17:43:02 +02:00
Eugene Yokota adb92f6bd9 sbt 1.0.0-M6 notes 2017-05-31 03:56:00 -04:00
eugene yokota d631d7e918 Merge pull request #3224 from eed3si9n/fport/3155
[fport] ScalaTest nested suites reported in JUnit XML reports as  "(It is not a test)"
2017-05-30 10:37:42 -04:00
Eugene Yokota d952dbb7ba Fix build to publish M6 2017-05-30 02:44:13 -04:00
eugene yokota 6e1e6ea384 Merge pull request #3228 from eed3si9n/wip/bump3
Adjust to Zinc and lm changes
2017-05-30 01:49:59 -04:00
Eugene Yokota 03c9b648fb Adjust to Zinc and lm changes 2017-05-30 00:59:43 -04:00
eugene yokota 3b92421d66 Merge pull request #3233 from eed3si9n/wip/cachedupdate
Fix cached update task
2017-05-29 18:27:41 -04:00
Eugene Yokota 3690ff193c Fix cached update task
Fixes sbt/sbt#3226

One of the checks that the cached update task performs is called `depsUpdated`, which checks if the subproject dependencies have been thawed out of cache of now.
For this to function correctly, when we thaw the `UpdateReport` from JSON, we need to mark the report as cached. This was done subtley in sbt 0.13 for sbinary (https://github.com/sbt/sbt-zero-thirteen/blob/v0.13.15/main/actions/src/main/scala/sbt/CacheIvy.scala#L66-L67).
2017-05-29 17:14:52 -04:00
eugene yokota 13ec092be3 Merge pull request #3225 from scalacenter/improvements-dsl-checks
[sbt 1.0] Add missing .value DSL check and other improvements
2017-05-29 13:55:21 -04:00
jvican c85fb95851
Remove unnecessary infra for .value DSL check 2017-05-28 18:36:14 +02:00
jvican 6a31251a01
Add tests that check `sbtUnchecked` is respected 2017-05-28 18:31:45 +02:00
jvican b017eaee39
Support DSL detection for nested ifs and anons
Before, we were not preserving the value `insideXXX`. This commit makes
sure that we handle much more complex scenarios and we report them
successfully. Have a look at the tests.
2017-05-28 18:31:44 +02:00
jvican ded281b5c2
Add missing .value DSL check
The missing .value analysis is dumb on purpose because it's expensive.

Detecting valid use cases of idents whose type is an sbt key is
difficult and dangerous because we may miss some corner cases. Instead,
we report on the easiest cases in which we are certain that the user
does not want to have a stale key reference. Those are idents in the rhs
of val definitions with `_` as name and idents in statement position
inside blocks.

In the future, we can cover all val definitions no matter what their
name is. Unfortunately, doing so will come at the cost of speed: we have
to run the unused name analysis in `TypeDiagnostics` and expose it from
the power context in `ContextUtil`.

This is good enough for now. If users express interest in having a
smarter analysis, we can always consider trying the unused name
analysis. I am not sure how slow it will be -- hopefully it won't be
that much.
2017-05-28 18:08:58 +02:00
eugene yokota 9fc9304638 Merge pull request #3223 from eed3si9n/fport/3153
[fport] Remove the "hit [ENTER] to switch to interactive mode" feature
2017-05-27 01:12:15 -04:00
eugene yokota 4d3b910a19 Merge pull request #3221 from eed3si9n/fport/3133
[fport] Port sbt-cross-building's ^ and ^^ commands
2017-05-27 01:12:00 -04:00
James Koch fe72a6e11d Issue #3154 - ScalaTest nested suites reported in JUnit XML reports as "(It is not a test)". 2017-05-27 00:18:40 -04:00
eugene yokota acf4a5ffc2 Merge pull request #3220 from eed3si9n/fport/3135
[fport] Fix += interference with sbt-buildinfo
2017-05-27 00:15:32 -04:00
Eugene Yokota 0e979b4a3a Port sbt-cross-building's ^ and ^^ commands
This ports sbt-cross-building's cross (`^`) and switch (`^^`) commands.
Instead of making it a plugin, the default settings are now changed
to use `sbtVersion in pluginCrossBuild` for the sbt dependency.
2017-05-27 00:15:03 -04:00
eugene yokota fd129efc9d Merge pull request #3222 from eed3si9n/fport/3147
[fport] Notify users about shell only if compile is present
2017-05-26 23:37:36 -04:00
eugene yokota ba1fe56fbd Merge pull request #3219 from eed3si9n/fport/3134
[fport] Ignore ZipException in cache
2017-05-26 22:34:59 -04:00
Dale Wijnand e4be5f4a09 Remove the "hit [ENTER] to switch to interactive mode" feature
In sbt 0.13.15, in addition to notifying the user about the existence of
sbt's shell, a feature was added to allow the user to switch to sbt's
shell - a more pro-active approach to just displaying a message.

Unfortunately sbt is often unintentionally invoked in shell scripts in
"interactive mode" when no interaction is expected by, for exmaple,
invoking `sbt package` instead of `sbt package < /dev/null`. In that
case hitting [ENTER] would silently trigger sbt to run its shell,
easily wrecking the script. In addition to that I was unhappy with the
implementation as it created a tight coupling between sbt's command
processing abstraction to sbt's shell command.

If you want to stay in sbt's shell after running a task like `package`
then invoke sbt like so:

    sbt package shell

Fixes #3091
2017-05-26 21:42:41 -04:00
Dale Wijnand b54c0ff059 Notify users about shell only if compile is present
This is a change in strategy.

The motivation is the need to find a good balance between:

  + informing the uninformed that would benefit from this information, &
  + not spamming the already informed

Making it dependent on "compile" being present in remainingCommands will
probably make it trigger for, for example, Maven users who are used to
running "mvn compile" and always run "sbt compile", and who therefore
are unneccesarily suffering terribly slow compile speeds by starting up
the jvm and sbt every time.

Fixes #3091
Fixes #3097
2017-05-26 21:33:49 -04:00
Eugene Yokota bfc2d85d54 Fix += interference with sbt-buildinfo
The macro pattern match was too general. This makes it tighter.

Fixes #3132
2017-05-26 21:04:33 -04:00
eugene yokota bb16c7b068 Merge pull request #3218 from eed3si9n/wip/restligeist
Fix restligeist macro
2017-05-26 21:03:06 -04:00
Eugene Yokota cfbff070e0 Ignore ZipException in cache
Fixes #3050
2017-05-26 21:02:41 -04:00
Eugene Yokota 5dc46e3cf2 fix restligeist macro
Fixes sbt/sbt#3157

Before:

    PgpSettings.scala:99: exception during macro expansion:
    [error] java.lang.RuntimeException: Unexpected macro application tree (class scala.reflect.internal.Trees$Apply): PgpKeys.pgpStaticContext.<<=(sbt.this.Scoped.t2ToApp2[sbt.File, sbt.File](scala.Tuple2.apply[sbt.SettingKey[sbt.File], sbt.SettingKey[sbt.File]](PgpKeys.pgpPublicRing, PgpKeys.pgpSecretRing)).apply[com.jsuereth.pgp.cli.PgpStaticContext]({
    [error]   ((publicKeyRingFile: sbt.File, secretKeyRingFile: sbt.File) => SbtPgpStaticContext.apply(publicKeyRingFile, secretKeyRingFile))

After:

    build.sbt:18: error: `<<=` operator is removed. Use `key := { x.value }` or `key ~= (old => { newValue })`.
    See http://www.scala-sbt.org/1.0/docs/Migrating-from-sbt-012x.html
        publishLocal <<= foo // publishLocal.dependsOn(foo)
                     ^
    [error] sbt.compiler.EvalException: Type error in expression
2017-05-26 01:03:26 -04:00
Eugene Yokota 06c5ef4208 fix build 2017-05-26 00:59:49 -04:00
eugene yokota 239280f137 Merge pull request #3216 from scalacenter/macro-usability-improvements
Add first round of DSL checks to sbt
2017-05-25 14:30:40 -04:00