| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |\ \
| | | | | |
| | | | | | |
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
|
| | | | | |/ / /
| | | | |/| | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fixes the index/length comparison in `Vector#take` and `Vector#drop` so that they handle all possible integer values.
Given the collection's invariants `startIndex >= endIndex` and `0 >= startIndex, endIndex`, it is sufficient to change the arithmetic in the comparison as done in this commit to avoid overflows. As cases when `n <= 0` are handled beforehand, `endIndex - n` cannot overflow, contrary to `startIndex + n`. If without the danger of overflows the condition yields true, on the other hand, `startIndex + n` cannot overflow as it is smaller than `endIndex` (as the previous formulation of the condition shows).
|
| | | |\ \ \ \ \
| | | | |/ / / /
| | | |/| | | | |
Bug fixes for the sbt build and partest
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This allows partest to be run from the command line on the artifacts
produced by the sbt build. The actual location for partest.properties
is hardcoded in the partest script as build/pack/partest.properties.
This will have to be changed when we make sbt the default build tool.
To test this now you can manually copy the generated file from
build-sbt/quick/partest.properties to build/pack/partest.properties.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Fix the scoping of files/lib/*.jar. These files were not on the
classpath when running partest from sbt.
- Pass the same standard Java options to partest as from the command
line. This requires new versions of scala-partest and
scala-partest-interface.
- Fix the classpath scanning in jvm/innerClassEnclMethodJavaReflection.
It only worked for JARs and relative directories but not for absolute
directory paths (which are produced by sbt).
|
| | | | | |/ /
| | | | |/| |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Create the directory for the output file when building an OSGi
bundle. Otherwise a publishing command would fail if dist/mkPack had
not been run before.
- Depend only on “packagedArtifact” in “mkPack”, not on “packageBin”.
The latter is sbt’s standard packaging task but some of the required
dependencies need to be packaged as OSGi bundles.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
mutable.TreeMap instead of java.util.TreeMap in closure optimizer
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9599 Multiple @todo formatted with comma on separate line
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9629 Emit missing 'pattern must be a value' error
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The error used to only be emitted for top-level patterns.
This commit moves it into `typedInternal` so it works
for nested patterns. It uses the typer mode to know
when to fire.
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | | |
Pattern Matching analysis improvements
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Before:
```
⚡ qscala -deprecation
Welcome to Scala 2.12.0-20160126-000825-1e302b76aa (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66).
Type in expressions for evaluation. Or try :help.
scala> import reflect.macros.blackbox.Context; import language.experimental.macros
import reflect.macros.blackbox.Context
import language.experimental.macros
scala> def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl;
<console>:13: warning: method literalUnit in trait ExprUtils is deprecated: Use quasiquotes instead
def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl;
^
impl: (c: scala.reflect.macros.blackbox.Context)c.Expr[Unit]
defined term macro m: Unit
scala> m
<console>:16: error: exception during macro expansion:
scala.MatchError: pos: source-<macro>,line-1,offset=4 then is now a reserved word; usage as an identifier is deprecated WARNING (of class scala.tools.nsc.reporters.StoreReporter$Info)
at scala.reflect.macros.contexts.Parsers$class.scala$reflect$macros$contexts$Parsers$class$$$anonfun$1(Parsers.scala:17)
```
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Currently, exhaustivity analysis only runs for scrutinees with
a sealed type.
This commit treats any case class as a one-element, sealed type
to enable additional analysis, such as in the new test case.
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Hash consing of trees within pattern match analysis was broken, and
considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though
the two `foo`-s referred to different symbols.
The hash consing was based on `Tree#correspondsStructure`, but the
predicate in that function cannot veto correspondance, it can only
supplement the default structural comparison.
I've instead created a custom tree comparison method for use in
the pattern matcher that handles the tree shapes that we use.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Ensure bytecode stability in the closure optimizer
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
https://github.com/scala/scala-dev/issues/77
Previously, the order in which closure invocations were re-written
depended on the callGraph's closureInstantiations map, which is not
sorted / linked.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9437 Emit and support parameter names in class files
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
JEP 118 added a MethodParameters attribute to the class file spec which
holds the parameter names of methods when compiling Java code with
`javac -parameters`.
We emit parameter names by default now.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Restore backend tests that were removed together with GenASM
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Our ANT script only runs junit tests that match *Test.class.
https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
|\| | | | | | |
| |_|/ / / / /
|/| | | | | | |
Eliminate non-escaping boxes, tuples and refs
|
| | | | | | | |
|
| |\ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Add partial appearance update of inheritence graphs in scaladoc
|