| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix documentation of assertions in Predef
|
| |
| |
| | |
Assertions can be elided at compile time; they generate no runtime conditional code and are in fact run unconditionally if not elided during compilation. Updated documentation to reflect that.
|
|\ \
| | |
| | | |
SI-9282 Avoid obscuring an exception during classfile parsing
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on analysis of a stack trace in this bug report, I identified
a code path in `ClassfileParser` that can lead to an NPE in its
exception handling code. If `val in = new AbstractFileReader(file)`
throws (e.g during its construction in which it eagerly reads the
file `val buf: Array[Byte] = file.toByteArray`), the call to
`in.file` in `handleError` will NPE.
This commit stores the active file directly a field in ClassfileParser
and uses this in the error reporting.
|
|\ \ \
| | | |
| | | | |
SI-9285 Don't warn about non-sensible equals in synthetic methods
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Notably, in the synthetic equals method of a case class. Otherwise,
we get an unsuppressable warning when defining a case class with a
`Unit`-typed parameter, which some folks use a placeholder for
real type while evolving a design.
|
|\ \ \
| | | |
| | | | |
Remove unused, mostly commented out doc/html/page/Source.scala
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This file seems to be some early, unfinished draft. It's unused and
mostly commented out. De facto it hasn't been changed since this
version:
https://github.com/scala/scala/blob/d9e3dde6d6d18b9a93e7566447cc3ee342f033d5/src/compiler/scala/tools/nsc/doc/html/page/Source.scala
Just in meantime someone updated imports, moved it to other package
etc. but nothing more.
|
|\ \ \ \
| | | | |
| | | | | |
Cleanup files in wrong place
|
| | | | | |
|
| |/ / / |
|
|\ \ \ \
| |/ / /
|/| | | |
Update intellij project files for IDEA 14.1 and latest Scala plugin
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Removes the src/intellij-14 folder and moves everything back to
src/intellij.
|
|\ \ \ \
| | | | |
| | | | | |
Follow HTTP redirects when downloading bootstrap binaries
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
After a recent change to the repository that hosts these JARs,
we now get a HTTP redirect to the new destination. We need to
explicitly instruct curl to follow this.
|
|\ \ \ \
| |/ / /
|/| | | |
PR validation publishes zinc to $prRepoUrl
|
|/ / /
| | |
| | |
| | | |
Companion to https://github.com/scala-ide/uber-build/pull/73
|
|\ \ \
| |/ /
|/| | |
spec: Remove obsolete rules related to scala.NotNull
|
|/ /
| |
| |
| |
| | |
These rules were removed in #2244 and scala.NotNull itself was
deprecated.
|
|\ \
| | |
| | | |
Spec improvements
|
| | | |
|
|\ \ \
| |/ /
|/| | |
SI-9279 Improve performance of bash runner script
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In fbe897d16, the template for bash scripts (scala/scalac/etc) was
modified to fix processing of `-J`, `-bootcp`.
This involved looping through the argument array and filtering out
options like `-bootcp` that only influence the script, and shouldn't
be passed to the JVM.
However, the mechanism to do this uses an inefficient, erm,
"CanBuildFrom", and under the load of even a few hundred source
files takes half a second before the JVM starts. Throw 2000 files
at it, and you have to wait ten seconds!
This commit uses a more efficient array append operator. This requires
Bash 3 or above. Hopefully it is safe to presume this version these
days, it's been around for a decade.
Results:
```
% time ~/scala/2.11.6/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1
Unrecognized option: -NOJVM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
real 0m7.765s
user 0m7.734s
sys 0m0.028s
% time ./build/quick/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1
Unrecognized option: -NOJVM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
real 0m0.144s
user 0m0.124s
sys 0m0.022s
```
Thanks to Stephan Schmidt for pointing out the performance gulf.
|
|\ \
| | |
| | | |
SI-9254 UnrolledBuffer appends in wrong position
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed two bugs in insertion (insertAll of Unrolled):
1. Incorrect recursion leading to an inability to insert past the first chunk
2. Incorect repositioning of `lastptr` leading to strange `append` behavior after early insertion
Added tests checking that both of these things now work.
Also added a comment that "waterlineDelim" is misnamed. But we can't fix it now--it's part of the public API. (Shouldn't be, but it is.)
|
|\ \ \
| | | |
| | | | |
SI-9197 Duration.Inf not a singleton when deserialized
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Made `Duration.Undefined`, `.Inf`, and `.MinusInf` all give back the singleton instance instead of creating a new copy by overriding readResolve.
This override can be (and is) private, which at least on Sun's JDK8 doesn't mess with the auto-generated SerialVersionUIDs.
Thus, the patch should make things strictly better: if you're on 2.11.7+ on JVMs which pick the same SerialVersionUIDs, you can recover singletons. Everywhere else you were already in trouble anyway.
|
|\ \ \ \
| | | | |
| | | | | |
SI-9275 Fix row-first display in REPL
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A missing range check in case anyone ever wants to use
```
-Dscala.repl.format=across
```
which was observed only because of competition from Ammonite.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix many typos
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
This commit corrects many typos found in scaladocs and comments.
There's also fixed the name of a private method in ICodeCheckers.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Don't crash GenBCode for value classes with a self declaration
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If a value class has a self declaration
class V(x: Long) extends AnyVal { self => /* ... */ }
`vClassSymbol.typeOfThis.typeSymbol` is `class Long` in the backend.
The InlineInfo for traits contains a field for the self type of the
trait. This is required for re-writing calls to final trait methods
to the static implementation method: the self type appears in the
impl method signature.
By mistake, the backend was recording the self type of all classes,
not only of traits. In the case of a value class with a self
declaration, this broke the assumption that the self type is always
a class type (not a primitive type).
The simple fix: only record the self type for traits.
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Experimental sbt build [ci: last-only]
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I added build configuration to ask SBT to forcible override the Scala
version in the subproject to the declared bootstrap version. I did
this in response to a warning by SBT the declared `scalaVersion`
has been evicted.
However, we actually *want* the newer version. To get rid of the
warning, we need to exclude all `"org.scala-lang" % "*"` when
depending on Scala modules. This cleanly breaks the cycle.
Here's a diff of `*/dependencyClasspath` as a result of this patch:
https://gist.github.com/retronym/217c76001b1b81798042
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In favour of explicitly ignoring the ones we know contain
SBT build output.
Rationale: we used to have a package named target. Admittedly
we thought better of that (55109d0d253) so it is now called `meta`,
but let's not get lazy and encode a poor practice into our
gitignore.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
There were two inconsistencies in building asm & forkjoin:
1. Asm classes lived in `build/asm`, while forkjoin's were in
`build/libs/classes/forkjoin`.
2. Though no jars are needed for these projects, forkjoin was packaged,
but asm was not.
No reason for these inconsistencies could be found in the history.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
To ensure the sbt build matches the ant build, diff their output.
The scripts just delegates to `diff` command that compares directories
recursively. We've added some handy ignore patterns (e.g. for .complete
files).
Ignore locker and deps dirs when comparing build and build-sbt,
these directories are needed by Ant build only.
Ignore irrelevant jars in build/pack/lib generated by the Ant build.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Partest tests are defined in Integration configuration.
This means you need to run them with `test/it:test` command. We put them
in separate configuration because they are slow to run so user needs to
ask explicitly for partest to run.
Introduce a common way of setting jar location so it can be reused between
`scalaSubprojectSettings` and `partestJavaAgent`.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add dependency on scaladoc in junit subproject, as required by
6e6632e (it introduced a junit test for scaladoc).
Enable assertion stack traces and info logging of each test.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Explicitly set [un]managed[re]sourceDirectories for all
projects to improve the import into IntelliJ
- Add partest extras project, that contains scala/scala specific
extensions to partest for use in partest and junit tests.
- Add junit project, which contains unit tests for the compiler and
library.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Common library dependencies are extracted into vals.
Those dependencies define "scala-library" as an excluded transitive
dependency so we don't get eviction warnings during `update`.
Lastly, version numbers for dependencies are obtained from
`versions.properties` file.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This way we don't need to worry about mixing classes for Scala compiler
that sbt is invoking and the one we just built. For an example of
possible problem, check out:
https://github.com/gkossakowski/scala/pull/2#issuecomment-78169188
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Shell scripts are generated with `mkBin` sbt task that calls ScalaTool.
ScalaTool is defined in project/ and is a port of Ant task that lives
in scala.tools.ant.ScalaTool. While porting, we've simplified the code
significantly.
The `mkBin` task is defined in a new subproject: dist. This subproject
will become responsible for building the distribution in the future.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Static resources are stored along source files in our current layout.
Therefore we set resourceDirectory to be sourceDirectory but make sure
that includeFilter includes nothing by default. Subprojects like library
or compiler set their own include filters.
The include filters have been ported from the Ant build definition.
Generate properties for: library, reflect, compiler & actors.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Scala artifacts (like library or compiler) are published are published
with "scala-" prefix in their name. We keep project ids short so we can
refer to projects simply by e.g. `library` and not `scala-library`.
Given that `name` settings will have a different value, we switch to
`Project.id` when constructing paths for target directories.
We had to tweak properties generation because over there we use project
name as a file name without "scala-" prefix.
Since our projects are not named uniformly (e.g., "repl" and not "scala-repl"),
add a setting for each subproject that requires special handling.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add welcome message that is shown at sbt's startup. The message clearly
indicates experimental status of sbt build.
Also, add a short paragraph to README.md explaining status of sbt build.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Let's override `sources` task to return empty collections of sources to
compile. Otherwise, sbt by default would pick up sources in the root
directory which is not what we want.
|