Commit Graph

11969 Commits

Author SHA1 Message Date
eugene yokota 17b2737bbf
Merge pull request #4486 from eed3si9n/wip/whitesource2
define whitesourceOnPush
2018-12-13 21:07:56 -05:00
Eugene Yokota 67e590d940 define whitesourceOnPush
whitesourceOnPush calls whitesourceCheckPolicies and whitesourceUpdate on push.
Since Travis CI secrets are not available during PR from a fork, there's no point in calling these during the PR validation.
2018-12-13 19:31:56 -05:00
eugene yokota 5a91334147
Merge pull request #249 from fredge/issue-248
fix #248.
2018-12-12 23:35:59 -05:00
fredge 0e8655fd5d fix #248. Move setting JVM's debug option after executing `:copyrt` label, in order to avoid unintended debug string written to `rtext.txt` 2018-12-13 12:25:42 +09:00
Ethan Atkins 27268a35cd
Merge pull request #4485 from eatkins/linter
Support disabling the sbt task linter
2018-12-12 10:15:40 -08:00
Ethan Atkins 01b2e86a54 Fix Def cannot be used inside a taskDyn #3110
The illegalReference check did not actually validate whether the illegal
reference actually referred to an M[_] (which is pretty much always
Initialize[_]]). The means by which this failure was induces were fairly
obscure and go through multiple levels of macro transformations that I
attempt to explain in the comment in IllegalReferenceSpec.

Fixes #3110
2018-12-11 21:49:42 -08:00
Ethan Atkins d42b3ee2fd Make the TaskLinterDSL warn by default
I am generally of the opinion that a linter should not abort progress by
default. I do, however, think that it should be on by default, making
warn a happy compromise.
2018-12-11 18:21:46 -08:00
Ethan Atkins 32792f2b9d Make the task linter configurable
The user should be able to configure whether or not the task linting is
strictly enforced. In my opinion, the linter is generally pretty good
about warning users that a particular definition may not behave the way
the user expects. Unfortunately, it is fairly common that the user
explicitly wants this behavior and making the linter abort compilation
is a frustrating user experience.

To fix this, I add the LinterLevel trait to a new sbt.dsl package in the
core-macros project. The user can configure the linter to:
1) abort when an issue is detected. This is the current default behavior.
2) print a warning when an issues is detected
3) skip linting all together

Linter configuration is managed by importing the corresponding implicit
object from the LinterLevel companion object.

Fixes #3266
2018-12-11 18:21:44 -08:00
Ethan Atkins 2e027640d3 Add solutions for dynamic task evaluation
There are many cases where one would want to force evaluation of the
task even when contained in a lambda (see
https://github.com/sbt/sbt/issues/3266). The @sbtUnchecked annotation is
one way to disable the linter that prevents this, but it is obscure. If
the annotation is to exist, I think it should be presented as a
solution.
2018-12-11 12:45:49 -08:00
Ethan Atkins 1c2bab093b Switch to more functional style in BaseTaskLinterDSL
I found it somewhat difficult to reason about the state of the tree
Traverser because of the usage of mutable variables and data structures.
For example, I determined that the uncheckedWrappers were never used
non-locally so a Set didn't seem to be the right data structure. It was
reasonably straightforward to switch to a more functional style by
parameterizing the method local traverser class.

Bonus:
  - remove unused variable disableNoValueReport
  - add scaladoc to document the input parameters of the traverser class
    so that it's a bit easier to understand for future maintainers.
2018-12-11 12:45:49 -08:00
Ethan Atkins ab2df045ab Lint TaskLinterDSL for intellij
This cleans up all of the yellow intellij warnings for me. It still
complains about some typos, but those manifest as green squiggled lines
which are less annoying.
2018-12-11 12:45:49 -08:00
eugene yokota 9a429e9bad
Merge pull request #4483 from eed3si9n/wip/nightly
fix nightly
2018-12-09 03:02:44 -05:00
Antonio Cunei cf1034e28e Bump scalatest to 3.0.6-SNAP5 2018-12-08 13:12:26 -05:00
Antonio Cunei 9104bde061 Bump log4j2 to 2.11.1 2018-12-08 13:09:02 -05:00
Ethan Atkins 8bd953edc1
Merge pull request #4475 from eatkins/imports
Optimize imports
2018-12-03 15:28:05 -08:00
Ethan Atkins 77e01ca930
Merge branch 'develop' into imports 2018-12-03 14:15:53 -08:00
eugene yokota 9d562ff82c
Merge pull request #4474 from eatkins/type-annotations
Annotate type signature of public methods and fields
2018-12-03 17:05:21 -05:00
Ethan Atkins de7c67ea45 Optimize imports in Defaults, Main and Keys
It was becoming a pain to work on these files in intellij because the
auto-import feature would implicitly optimize all of the imports in
these files, leading to a large diff. I'd then have to go and manually
add the import that I care about. This change does add some wildcard
imports, which I don't always love, but these files are so unwieldy
already that I think it's worth it to have the imports follow the format
preferred by intellij.
2018-12-03 13:28:10 -08:00
Ethan Atkins 80eb76da36 Annotate type signature of public methods and fields
This file was littered with intellij warnings due to public members and
fields not having their types annotated. Although in this case it didn't
really matter, it is good practice to always annotate public methods and
fields so that they can evolve in a binary compatible way.
2018-12-03 12:57:28 -08:00
eugene yokota d19348f109
Merge pull request #247 from liff/issue-246
Fix rsync source path designation in preloaded; fixes #246
2018-12-03 15:31:12 -05:00
Olli Helenius b8b3542339 Fix rsync source path designation in preloaded; fixes #246 2018-12-03 22:13:08 +02:00
eugene yokota f6031709c8
Merge pull request #4473 from eed3si9n/wip/bump
bump util, lm, and zinc
2018-11-30 13:52:08 -05:00
Eugene Yokota 3b63524c10 1.2.7-SNAPSHOT 2018-11-30 13:06:41 -05:00
Eugene Yokota 76f0e2de6b implement TestConsoleLogger
This avoids the mixup of log4j versions.
2018-11-30 13:06:29 -05:00
Eugene Yokota 172a3c8247 bump util, lm, and zinc 2018-11-30 08:35:00 -05:00
eugene yokota 34ef5ab500
Merge pull request #4454 from eed3si9n/wip/prompt-fix
Fix prompt for task progress
2018-11-29 10:47:30 -05:00
Eugene Yokota 9858bc29fb more tweaking on task progress
move the cursor up after the user enters command.
2018-11-29 04:40:40 -05:00
eugene yokota dedc7a53e6
Merge pull request #4466 from eed3si9n/wip/travis-notifications
[1.2.x] drop notification override
2018-11-29 01:45:31 -05:00
eugene yokota 138deadafd
Merge pull request #4471 from cunei/1.2.x-fixNightly
[1.2.x] fix nightly
2018-11-29 01:44:23 -05:00
eugene yokota d220a0cc84
Merge pull request #4467 from eed3si9n/wip/travis
use AdoptOpenJDK 8 on Travis CI
2018-11-28 15:18:15 -05:00
eugene yokota b884dea2ca
Merge pull request #4468 from olafurpg/semanticdb
Update semanticdb-scalac to v4.1.0
2018-11-28 15:18:03 -05:00
Antonio Cunei 9e4e16b7f0 Bump scalatest to 3.0.6-SNAP5 2018-11-28 20:44:07 +01:00
Antonio Cunei 94aa8591e6 Bump log4j2 to 2.11.1 2018-11-28 20:44:07 +01:00
Ólafur Páll Geirsson fefb83f8fd Update semanticdb-scalac to v4.1.0
This release supports more Scala versions, works on Java 11 and
is ~8mb smaller than v4.0.0.
2018-11-28 08:56:18 +01:00
eugene yokota 935afadeac
Merge pull request #4465 from eed3si9n/fport/ignore-files-in-scripted-group-dirs
[fport] Ignore files in scripted group dirs
2018-11-27 20:50:20 -05:00
Eugene Yokota 7c4412d960 use AdoptOpenJDK 8 2018-11-27 18:48:22 -05:00
Eugene Yokota fe8a74c229 drop notification override 2018-11-27 18:29:56 -05:00
Eugene Yokota 5558ca5c70 drop notification override 2018-11-27 18:25:32 -05:00
Dale Wijnand 248b8b93d1 Ignore files in scripted group dirs
Scripted tests, in src/sbt-test/<group>/<name> blow up if <name> is a
plain file.  Filter them out.
2018-11-27 18:17:38 -05:00
eugene yokota 2e0d2d920a
Merge pull request #189 from eed3si9n/wip/log4j
bump JLine and log4j 2
2018-11-26 00:25:07 -05:00
Eugene Yokota fac92b66cb bump JLine and log4j 2 2018-11-25 23:22:22 -05:00
eugene yokota 0313cc5758
Merge pull request #4462 from raboof/discoverOracleJdk
Discover Oracle JDK installed in /opt
2018-11-24 02:46:08 -05:00
eugene yokota c2115cc347
Merge pull request #4463 from dwijnand/ignore-files-in-scripted-group-dirs
[1.2.x] Ignore files in scripted group dirs
2018-11-23 16:26:35 -05:00
Dale Wijnand 5f562aa7a8
Ignore files in scripted group dirs
Scripted tests, in src/sbt-test/<group>/<name> blow up if <name> is a
plain file.  Filter them out.
2018-11-22 15:48:56 +00:00
Arnout Engelen ae932f7390 Discover Oracle JDK installed in /opt 2018-11-22 12:50:13 +01:00
Alexandre Archambault 9fc9c49d0e Have updateClassifiers use the dependencyResolution task 2018-11-21 14:54:11 +01:00
eugene yokota 4f27319beb
Merge pull request #4456 from eatkins/multi-command
Multi command
2018-11-20 10:35:46 -05:00
Ethan Atkins c00cc37953 Do not require leading semicolon for multi command
It has long been a frustration of mine that it is necessary to prepend
multiple commands with a ';'. In this commit, I relax that restriction.
I had to reorder the command definitions so that multi comes before act.
This was because if the multi command did not have a leading semicolon,
then it would be handled by the action parser before the multi command
parser had a shot at it. Sadness ensued.
2018-11-19 10:42:51 -08:00
Ethan Atkins 51d986d751 Make multi command parser work with string literals
Presently the multi command parser doesn't work correctly if one of the
commands includes a string literal. For example, suppose that there is
an input task defined name "bash" that shells out and runs the input.
Then the following does not work with the current multi command parser:
; bash "rm target/classes/Foo.class; touch src/main/scala/Foo.scala"; comple
Note that this is a real use case that has caused me issues in the past.

The problem is that the semicolon inside of the quote gets interpreted
as a command separator token. To fix this, I rework the parser so that
it consumes string literals and doesn't modify them. By using
StringEscapable, I allow the string to contain quotation marks itself.

I couldn't write a scripted test for this because in a command like
`; foo "bar"; baz`, the quotes around bar seem to get stripped. This
could be fixed by adding an alternative to StringEscapable that matches
an escaped string, but that is more work than I'm willing to do right
now.
2018-11-19 10:38:22 -08:00
Ethan Atkins 05e3a8609b Fix watch command parser
I discovered that when I ran multi-commands with '~' that if there was a
space between the ';' and the command, then the parsing of the command
would fail and the watch would abort. To fix this, I refactor
Watched.watch to use the multi command parser and, if that parser fails,
we fallback on a single command.
2018-11-19 10:38:22 -08:00