| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though our build can't be imported into IntelliJ
automatically, we don't need to live in the dark ages
of red squigglies when editing build.sbt.
This commit hand-crafts the module defintion for the
project, which has SBT and its dependendencies on the
classpath.
A screenshot of the code assist is worth the thousand
expletives I uttered while writing the pictured code
without this facility:
https://www.dropbox.com/s/6mxv0iwxkhvnor7/Screenshot%202016-02-07%2022.09.12.png?dl=0
To download the sources for the SBT JARs that are referenced
herein, run
sbt> reload plugins
sbt> updateClassifiers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can complete partest options (I've excluded some that
aren't relevant in SBT), as well as test file names.
If `--srcpath scaladoc` is included, completion of test
paths will be based on `test/scaladoc` rather than
the default `test/files`. Note that the `--srcpath` option
is currently broken via scala partest interface, this
change to scala-partest is needed to make it work:
https://github.com/scala/scala-partest/pull/49
I've also hijacked the `--grep` option with logic
in the SBT command itself, rather than passing this
to `partest`. Just like `./bin/partest-ack`, this looks
for either test file names or regex matches within
the contents of test, check, or flag files.
I tried for some time to make the tab completion of
thousands of filenames more user friendly, but wasn't
able to get something working. Ideally, it should
only suggest to `test/files/{pos, neg, ...}` on the
first <TAB>, and then offer files on another TAB.
Files should also be offered if a full directory
has been entered. Hopefully a SBT parser guru will
step in and add some polish here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea here is to avoid the need for switching
between the SBT shell and Bash.
- Add aliases for partest, scala{,c,p,doc}
- Change working directory for these forked processes
to the root project base directory, rather than the
subprojects base directory. This lets us use relative
paths to files in a more familar way.
- Don't log the output of forked processes with the
`[info] ` prefix, rather pass it through directly
to stdout.
Demo:
```
> partest --terse test/files/pos/t6231.scala
[info] Packaging /Users/jason/code/scala2/build-sbt/pack/lib/scala-partest-javaagent.jar ...
[info] Done packaging.
Selected 1 tests drawn from specified tests
.
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[success] Total time: 3 s, completed 05/02/2016 12:44:19 PM
> scala sandbox/test.scala
[info] Running scala.tools.nsc.MainGenericRunner -usejavacp sandbox/test.scala
Hello, World!
[success] Total time: 4 s, completed 05/02/2016 12:45:08 PM
> scalac sandbox/test.scala
[info] Running scala.tools.nsc.Main -usejavacp sandbox/test.scala
[success] Total time: 3 s, completed 05/02/2016 12:45:15 PM
> scala Test
[info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test
Hello, World!
[success] Total time: 1 s, completed 05/02/2016 12:45:20 PM
> scala
[info] Running scala.tools.nsc.MainGenericRunner -usejavacp
Welcome to Scala 2.11.8-20160204-090931-42525ec (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_71).
Type in expressions for evaluation. Or try :help.
scala> 1.to
to toBinaryString toByte toChar toDegrees toDouble toFloat toHexString toInt toLong toOctalString toRadians toShort toString
scala> 1.toString
res0: String = 1
scala> :quit
[success] Total time: 8 s, completed 05/02/2016 12:45:48 PM
>
```
|
|\
| |
| | |
bump copyright year to 2016
|
|/ |
|
|\
| |
| | |
SI-9572 Check for illegal tuple sizes in the parser
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit adds explicit checks with syntax errors for tuple literals
and types of more than 22 elements. An alternative approach to fixing
SI-9572 would be to revert to the old failure mode of Scala 2.10 where
references to arbitrary `scala.TupleXY` would be generated in the
parser, which then leads to “type/object not found” errors in the
typechecker. This fix here is more intrusive but arguably provides a
better user experience.
Methods `stripParens` and `makeBinop` are moved from `TreeBuilder` to
`Parsers` because they can now generate syntax errors. New methods
`makeSafeTupleType` and `makeSafeTupleTerm` implement the error checking
on top of `makeTupleType` and `makeTupleTerm`. They are overridden with
no-op versions in the quasiquotes parser because it also overrides `makeTupleType` and `makeTupleTerm` in a way that supports arbitrary tuple sizes.
|
|\ \
| | |
| | | |
fix broken links to Scala CLA
|
| | | |
|
|\ \ \
| | | |
| | | | |
SI-9534 Use BoxedUnit in all cases for creating Array[Unit]
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Calling `wrap` or one of the higher-dimension Array factory methods on
the `Manifest` for `Unit` led to an exception because it tried to use
`void` as a primitive type. Unlike all other primitive Scala types,
`Unit` needs to be boxed. The basic `newArray` method was not affected
by this bug because it was already special-cased. The fix is to also
special-case `arrayClass`.
|
|\ \ \
| | | |
| | | | |
tweak my own entry in the readme
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
sbt-based PR validation job
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
# Improve version handling in the sbt build:
The new settings `baseVersion` and `baseVersionSuffix` make it easier
to set version numbers for different kinds of builds in a consistent
way without e.g. having to first get a git SHA outside of sbt.
The new task `generateBuildCharacterPropertiesFile` writes the file
`buildcharacter.properties` to the root dir. The format is compatible
with the same file produced by the ANT build but it only contains a
subset of the properties, in particular the Maven version, which is
needed in publishing scripts and passed around between different
Jenkins jobs as `jenkins.properties`.
SHAs in version numbers are consistently shortened to 7 digits (as used
by git and github). Previously we used 7 digits in Maven snapshot
version numbers but 10 digits in canonical and OSGi version numbers.
# Add Jenkins script support to the sbt build:
The new command `setupPublishCore` takes the PR validation snapshot
repository as an argument and changes the required settings for the
`publish-core` build (use SHA-SNAPSHOT versioning, compile with
optimization enabled, do not publish scaladoc sets)
For example, the following command can be used to generate
`buildcharacter.properties` with the version numbers needed for PR
validation builds:
sbt setupPublishCore dummy generateBuildCharacterPropertiesFile
The sbt build will now automatically detect and use a “~/.credentials”
file with the credentials for publishing to a remote repository.
# Call sbt from `publish-core`:
The correct`$SBT_CMD` is set directly in `bootstrap` and used by
`publish-core` to first generate `buildcharacter.properties` and then
build and publish. Parsing the git revision, computing a version
number and getting binary dependencies are no longer required in the
script. This is all done in the sbt build.
|
|\ \ \
| | | |
| | | | |
Trim complexity in CommentFactoryBase
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. Replace option handling with library call
2. Remove NumberFormatException catch presumed to be copy/paste legacy
3. It's Scaladoc
4. Parse trailing whitespace regex once instead of per line
5. Use string interpolation where it improves readability
6. Add missed alternative to block grammar production rule
7. Add regression test for tag requirement warnings
|
|\ \ \
| | | |
| | | | |
Some fixes for the sbt build on Windows
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We now normalize EOLs in `ScalaTool` to LF when reading the templates,
and write them as CRLF or LF depending on the target platform. This
allows the script templates to be stored locally with either LF or CRLF
line endings (which can both happen, depending on the platform and git
configuration).
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of waiting for a Java-8-only build to use
`Files.setPosixPermissions()` we can call `setExecutable` and
`setReadable`, both of which are available on Java 6.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The generated scripts for "quick" are not portable anyway (neither in
the sbt build nor in the ant build) because they contain absolute
paths. When using the sh versions on Windows in MSYS or Cygwin, the
classpath must be in Windows format because "java" expects it that way.
Note that none of this applies to "pack" (and thus to distribution
builds) where the classpath is constructed dynamically by the launcher
scripts itself.
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Link 'Future' scaladoc to 'Futures and Promises'
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
[backport] SI-9616 False positive in unused import warning
|
| | | |
| | | |
| | | |
| | | | |
This is a minimal backport of the fix for SI-9383.
|
|\ \ \ \
| | | | |
| | | | | |
disable flaky presentation compiler test on Windows
|
| | |/ /
| |/| |
| | | |
| | | | |
see https://github.com/scala/scala-dev/issues/72 for details
|
|\ \ \ \
| |/ / /
|/| | | |
Fix some simple extra words
|
|/ / /
| | |
| | |
| | | |
The the word 'the' is often used twice. Fix that.
|
|\ \ \
| | | |
| | | | |
Fix Scaladoc overloaded method link to Duration companion object
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
The links were being skipped with a warning before this commit.
The key change was to remove the result type and add an asterisk.
|
|\ \ \
| | | |
| | | | |
SI-9605 Searching does not use binary search for Array
|
| |/ /
| | |
| | |
| | | |
Binary search should be used for every `IndexedSeqLike` instance and not only for `IndexedSeq`. According the Scaladoc, it is `IndexedSeqLike` that guarantees "constant-time or near constant-time element access and length computation".
|
|\ \ \
| |/ /
|/| | |
SI-8641 Fix right shift docs for integer types
|
|/ /
| |
| |
| |
| | |
Docs for >> operation of integer types (from Byte to Long) had a wrong
direction saying that it is bit-shift left.
|
|\ \
| | |
| | | |
Script to compare the current scaladoc with the parent commit's doc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Tested on Ubuntu 14.04.3 LTS.
SUMMARY
1. Use `set -e` to ensure ant failure bails script.
2. Make best effort to display scaladoc build diff.
3. Quiet output from git checkout.
4. Prefer plumbing over porcelain when getting hashes.
5. Use short hashes to enhance output readability.
6. Use branch name when available.
7. Ensure scaladoc copies are clean.
8. Remove redundant use of scaladoc-compare.
9. Improve message formatting.
10. Use $(...) instead of backticks for more legible code.
11. Pause after reporting missing old file.
12. Report missing new files.
DETAILS
1. Use `set -e` to ensure an ant failure bails the script. Turn off before
diff because diff returns an error code when the compared files differ,
which is expected to be seen.
2. Make best effort to display scaladoc build diff preferring graphical
clients.
opendiff is a Mac OS X command that opens a graphical diff display, meld
is a graphical client for Ubuntu and other distros. On Ubuntu fallback to
gvimdiff which will display graphically if possible otherwise in the
console. Ultimately default to diff.
Command detection taken from,
http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
3. Quiet output from git checkout to avoid detached head warning.
The user does not need to see the detached head warning when running this.
4. Prefer plumbing over porcelain to avoid 'not found' error when getting
SHA1s.
Calling get-scala-commit-sha errors out on Ubuntu 14.04.3 with
Bash 4.3.11 with these messages,
tools/get-scala-commit-sha: 11: tools/get-scala-commit-sha: [[: not found
tools/get-scala-commit-sha: 17: tools/get-scala-commit-sha: Bad substitution
5. Use short hashes to enhance output readability.
6. Use branch name when available.
If the branch name is not used when the working directory is restored
after checkout out the parent commit we will be in a detached HEAD
state. Make a best effort to avoid that.
7. Ensure scaladoc copies are clean.
Remove previous copy of scaladoc to ensure consistent behaviour on runs
past the first.
8. Remove use of scaladoc-compare because the equivalent functionality is
provided when iterating the new files.
9. Improve message formatting.
10. Use $(...) instead of backticks for more legible code.
11. Pause after reporting missing old file.
Without this pause it was easy to miss the message when we had this
sequence of differences,
* differing files
* missing file
* differing files
12. Report missing new files.
Along with reporting new files with no corresponding old file report the
complementary scenario.
|
| | | |
|
|\ \ \
| | | |
| | | | |
SI-9567 Fix pattern match on 23+ param, method local case class
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Typechecking constructor patterns of method local case classes
was only working because of the existence of the unapply method
in the companion, which is used if navigation to the case class
companion object fails.
We now support defintion of, and pattern matching on, case classes
with more than 22 parameters. These have no `unapply` method
in the companion, as we don't have a large enough tuple type to
return. So for such case classes, the fallback that we inadvertently
relied on would no longer save us, and we'd end up with a compile
error advising that the identifier in the constructor pattern was
neither a case class nor an extractor.
This is due to the propensity of `Symbol#companionXxx` to return
`NoSymbol` when in the midst of typechecking. That method should
only be relied upon after typechecking. During typechecking,
`Namers#companionSymbolOf` should be used instead, which looks in the
scopes of enclosing contexts for symbol companionship. That's
what I've done in this commit.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Under -optimize, the pattern matcher tries to avoid local variables
in favour of directly accessing to non-var case class accessors.
However, the code that analysed the patterns failed to account
properly for repeated parameters, which could either lead to
a compiler crash (when assuming that the n-th subpattern must have
a corresponding param accessor), or could lead to a correctness
problem (when failing to eagerly the bound elements from the
sequence.)
The test case that tried to cover seems only to have been working
because of a separate bug (the primary subject of SI-9567) related
to method-local case classes: they were treated during typechecking
as extractors, rather than native case classes.
The subsequent commit will fix that problem, but first we must
pave the way with this commit that emits local vals for bound
elements of case class repeated params.
|
|\ \ \ \
| | | | |
| | | | | |
Document JavaConverters conversion from java.util.Properties to Map
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also
- Fix grammar on duplicated DecorateAsJava comment by copying over from
JavaConverters
- Remove author tags
|
|\ \ \ \ \
| | | | | |
| | | | | | |
add doc for log, sqrt
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It's useful to know that log is the natural logarithm, not 10log or 2log or so.
Also did sqrt "while I was at it"
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Apply title case to Scaladoc buttons: By Inheritance & Show All
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
The alternative choice was to change "Hide All" to "Hide all" to match existing
capitalization but title case fits for this UI.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9581 Fix overflow on Vector take and drop methods
|