| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
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.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Scaladoc depends on scala-xml, etc, built with the previous stable
version of Scala. This isn't ideal, but we're stuck with this for
now.
We were relying on Ivy to evict the transitive dependency on the
old version of scala-library. However, SBT treats evictions of
scala-library as suspicious and emits a custom warning.
This commit explicitly excludes the transitive dependency so
as to avoid these warnings. It also makes the output of `show update`
a little easier to read.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As suggested in sbt/sbt#1872, specify ScalaInstance manually
and use sbt's launcher as a context for Ivy resolution. This way
we avoid the circular dependency problem described in the issue.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Mirror ant by disabling docs and publishing tasks in these subprojects.
Class files are included by merging `mappings`: the `package` task
uses it to determine which class files should end up in a jar file.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Put library class files to scaladoc's classpath when documenting the library.
TODO: why is this needed? Bug in scaladoc?
Pass `src/library-aux` to scaladoc using `-doc-no-compile` option.
To mimic ant, output docs into `buildDirectory/scaladoc/$name`.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As they are forks of external Java projects, don't document/publish them.
TODO: move them out of the repo
As in ant, pass -g, -source and -target options to javac to get
byte-identical outputs for Java files between Ant and sbt builds.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Move most of `commonSettings` to `subprojectSettings` and keep
`commonSettings` truly minimal.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This settings determines location of where class files, jars, and other
build products will go. By default, it's `./build-sbt`. It makes it easier
to compare what Ant and sbt builds do.
Also, changed `SettingKey` to `settingKey`. The latter is a macro that
automatically determines `label` of a setting and takes a description as
argument. Before that, `SettingKey("my desc")` would create a setting key
with `label` set to "my desc". Not what we wanted.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, Project.base was set to ./$name and we tweaked manually the
`baseDirectory` setting to point at `.`. This was confusing sbt and its
plugins. We are setting Project.base to ./src/$name and leave
`baseDirectory` intact (so it will point at `./src/$name`.
Adapt settings that depend on `baseDirectory` accordingly.
Refactor configuration as a subproject into a common method.
Given that `baseDirectory` is pointing at `src/$name`, we don't have to
worry about `sourcesInBase`.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add an sbt task that generates .properties files that are packaged
into jars. The properties file contains Scala version in various
formats.
The task is registered as a resource generator so sbt can properly
track generated files and make sure they are included in packaged
jars.
The implementation of generateVersionPropertiesFile contains a note
on arbitrary order of written properties. We could consider using
https://github.com/etiennestuder/java-ordered-properties
to guarantee a stable order. Or simply ditch using Properties class
and generate a String. Our property files are simple enough that
nothing more fancy is needed.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Override default location for jars to be build/pack/lib. This turned out
to be a bit more involved than I expected. Check the diff for details.
Strip down the -version suffix from jar names.
For now we're trying to mimic Ant's build as closely as possible. Ant does
not embed version numbers in jar names it creates in build/pack/lib
directory.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It mimics the ant build as closely as necessary to compare the produced
artifacts between the two builds, to build confidence in the transition:
- all projects are built into the same directories in build/quick
- include legacy projects: forkjoin, asm, actors
- TODO: Include forkjoin & asm into library & compiler jars, respectively.
We don't carry over ant's built-in bootstrapping process;
this will be scripted outside of the build, publishing layers locally.
NOTE: the root project cannot be named `scala`:
it shadows the `scala` package in e.g., `projectConsole`.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
SI-4476 add an index of deprecated members to scaladoc
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The deprecated list is only emitted if there actually are deprecated
members; same for the link in the left sidebar.
We just build on the existing index support, with an additional method
to avoid having to go through the whole index if we won't generate the
page anyway. The deprecated list page itself is completely identical to
the normal index pages, except we don't strike through any entry (there
are *all* deprecated already).
There is just about enough space in the left sidebar for the deprecated
link, see [1], and [2] for when there are no deprecated members.
[1]: http://static.gourlaysama.net/img/scaladoc-deprecated.png
[2]: http://static.gourlaysama.net/img/scaladoc-deprecated-empty.png
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9268 Be robust against absent classfiles during signature parsing
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When parsing a Java generic signature that references an inner
class `A$B`, we were tripping an assertion if the enclosing class
`A` was absent.
This commit creates a stub symbol for `B` when this happens, rather
than continuing on with `NoSymbol`.
The enclosed test shows that we can instantiate a class containing
a method referring to such an inner class with only a warning
about the absent classfile, and that an error is issued only upon
a subsequent attempt to call the method.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Fix typo in Quasiquote doc that was confusing
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Make lambda body public rather than using static accessor
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Under -Ydelambdafy:method (the basis of the upcoming "indylambda"
translation for -target:jvm-1.8), an anonymous function is currently
encoded as:
1. a private method containing the lambda's code
2. a public, static accessor method that allows access to 1 from
other classes, namely:
3. an anonymous class capturing free variables and implementing
the suitable FunctionN interface.
In our prototypes of indylambda, we do away with 3, instead deferring
creating of this class to JDK8's LambdaMetafactory by way of an
invokedynamic instruction at the point of lambda capture. This
facility can use a private method as the lambda target; access is
mediated by the runtime-provided instance of
`java.lang.invoke.MethodHandles.Lookup` that confers the privelages
of the lambda capture call site to the generated implementation class.
Indeed, The java compiler uses this to emit private lambda body
methods.
However, there are two Scala specific factors that make this
a little troublesome.
First, Scala's optimizer may want to inline the lambda capture
call site into a new enclosing class. In general, this isn't a
safe optimization, as `invokedynamic` instructions have call-site
specific semantics. But we will rely the ability to inline like
this in order to eliminate closures altogether where possible.
Second, to support lambda deserialization, the Java compiler creates
a synthetic method `$dersializeLamda$` in each class that captures
them, just to be able to get the suitable access to spin up an
anoymous class with access to the private method. It only needs
to do this for functional interfaces that extends Serializable,
which is the exception rather than the rule. But in Scala, *every*
function must support serialization, so blindly copying the Java
approach will lead to some code bloat.
I have prototyped a hybrid approach to these challenges: use the
private method directly where it is allowed, but fall back to
using the accessor method in a generic lambda deserializer or
in call sites that have been inlined into a new enclosing class.
However, the most straight forward approach is to simply emit the
lambda bodies as public (with an mangled name and with the SYHTNETIC
flag) and use them in all cases. That is what is done in this commit.
This does moves us one step backwards from the goals of SI-7085,
but it doesn't seem sensible to incur the inconvenience from locking
down one small part of our house when we don't have a plan or the
budget to complete that job.
The REPL has some fancy logic to decompile the bodys of lambdas
(`:javap -fun C#m`) which needed tweaking to accomodate this change.
I haven't tried to make this backwards compatible with the old
encoding as `-Ydelambdafy:method` is still experimental.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-3368 Default to coalescing for 2.11
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Preserve current behavior (no PCData nodes, only Text)
for 2.11.
The coalescing flag is on if enabled or if source level
is not 2.12 and no flag was supplied.
The subtle change is that adjacent Text nodes are thereby
coalesced. This happens in the presence of CData sections,
but this is at the discretion of the parser anyway.
Also, no PCData nodes are emitted under coalescing, even
if there were no sibling text nodes. That is the correct
behavior: the general idea is that coalescing mode says,
I only want to deal with text.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Derive repository info from (jenkins) env vars
|