| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Remove commented priorityqueue code
|
| | |
|
| | |
|
|\ \
| | |
| | | |
SI-7988 - scala.collection.JavaConverters spelling mistake
|
| |/
| |
| |
| | |
Fixed typo and cleaned up the grammar in the paragraph
|
|\ \
| | |
| | | |
SI-8695 SeqLike has unintuitive implementation of combinations
|
| | |
| | |
| | |
| | | |
Clarified what `combinations` means in the docs.
|
|\ \ \
| |_|/
|/| | |
add 0X... for hex number literal
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
SI-8754 linear seqs aren't
|
| | |/
| |/|
| | |
| | | |
LinearSeqLike still isn't exactly linear (LinearSeqOptimized is), but at least the docs now give reasonably correct information about what is actually going on.
|
|\ \ \
| | | |
| | | | |
SI-8502 Improve resiliance to absent packages
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When unpickling a class, we create stub symbols for references
to classes absent from the current classpath. If these references
only appear in method signatures that aren't called, we can
proceed with compilation. This is in line with javac.
We're getting better at this, but there are still some gaps.
This bug is about the behaviour when a package is completely
missing, rather than just a single class within that package.
To make this work we have to add two special cases to the unpickler:
- When unpickling a `ThisType`, convert a `StubTermSymbol` into
a `StubTypeSymbol`. We hit this when unpickling
`ThisType(missingPackage)`.
- When unpickling a reference to `<owner>.name` where `<owner>`
is a stub symbol, don't call info on that owner, but rather
allow the enclosing code in `readSymbol` fall through to
create a stub for the member.
The test case was distilled from an a problem that a Spray user
encountered when Akka was missing from the classpath.
Two existing test cases have progressed, and the checkfiles are
accordingly updated.
|
|\ \ \
| | | |
| | | | |
SI-8946 Disable flaky test for reflection memory leak
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
It passed in PR validation but failed in a later run.
There are some clever ideas bouncing around to make it
stable, but in the meantime I'll shunt it into disabled.
|
|\ \ \
| | | |
| | | | |
FSC server port selected by argument
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Option "port" limits compile server lookup and start to given port.
Normally fsc will start a compile server in a random port if no server
is yet running. This can be problematic with firewalls and/or remote
compile servers. Option "port" should not be confused with option
"server" which looks for a compile server in given host and port and
fails if such server is not found.
Automatic tests for command line user interface do not exist at all.
Thus, adding a test for one new option would require designing a whole
new testing method.
|
|\ \ \ \
| |_|_|/
|/| | | |
Let users specify a different location for build repos than user home
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change is helpful e.g. when setting up CI for Scala and it's important which directories are used by a build.
By default it uses .m2, .pax and .sbt/cache from user home (in general $HOME). Sometimes it's not possible to use
this location and also changing a value of $HOME is not an option.
The required location should be specified both for ant's build.xml and used scripts.
In the first case specifying -Duser.home is all, what we need. But we can't just set _JAVA_OPTIONS
as then partest tests fail due to the unexpected output (an additional 'Picked up java options (...)' messages).
We can set ANT_OPTS instead of this. The only problem was that OSGi JUnit tests (only they) were using $HOME anyway.
I forced them to use -Duser.home by propagating this option in build.xml.
binary-repo-lib.sh is changed to use a special env variable or $HOME, when this variable is not set.
Then we can do:
export SCALA_BUILD_REPOS_HOME=<some_dir>
export ANT_OPTS="$ANT_OPTS -Duser.home=$SCALA_BUILD_REPOS_HOME"
ant dist
and it will create all directories .m2, .pax and .sbt/cache in a specified $SCALA_BUILD_REPOS_HOME directory.
Note: maven's settings.xml should be located in this used $SCALA_BUILD_REPOS_HOME/.m2 and point to the
repository like <some_dir>/.m2/repository
|
|\ \ \ \
| | | | |
| | | | | |
SI-8946: Fixes memory leak when using reflection
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | | |
References to Threads would be retained long after their termination if
reflection is used in them. This led to a steady, long memory leak in
applications using reflection in thread pools.
|
|\ \ \ \
| |/ / /
|/| | | |
SI-5205 Finish applying octal deletion
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The original PR was partially applied to markdown.
https://github.com/scala/scala-dist/pull/103
|
|\ \ \ \
| | | | |
| | | | | |
Correct collections variable definitions to avoid many scaladoc warnings.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-5938 Test for a FSC bug with mixin, duplicate static forwarders
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Under resident compilation, we were getting multiple copies of static
forwarders created for mixed in methods. It seems like the bug was
fixed as a by-product of #4040.
This commit adds a test to show this. I've confirmed that the test
fails appropriately with 2.11.4.
For future reference, before I figured out how to write the test
for this one (test/resident doesn't seem to let you run the code
after compiling it), I was using bash to test as follows:
(export V=2.11.x; (scalac-hash $V sandbox/t5938_1.scala; (for i in 1 2; do echo sandbox/t5938.scala; done; printf '\n') | scalac-hash $V -Xresident); stty echo; scala-hash $V X ; echo ':javap -public X' | scala-hash $V);
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7596 Curtail overloaded symbols during unpickling
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In code like:
object O { val x = A; def x(a: Any) = ... }
object P extends O.x.A
The unpickler was using an overloaded symbol for `x` in the
parent type of `P`. This led to compilation failures under
separate compilation.
The code that leads to this is in `Unpicklers`:
def fromName(name: Name) = name.toTermName match {
case nme.ROOT => loadingMirror.RootClass
case nme.ROOTPKG => loadingMirror.RootPackage
case _ => adjust(owner.info.decl(name))
}
This commit filters the overloaded symbol based its stability
unpickling a singleton type. That seemed a slightly safer place
than in `fromName`.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix one typo in the scaladoc of Inliners
|
| | |_|_|/ / /
| |/| | | | |
| | | | | | |
| | | | | | | |
The Scaladoc of `Inliners` contained one tiny typo for the word "accessibility".
This PR only fixes this typo.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
SI-8597 Improved pattern unchecked warnings
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Cherry picking some of the previous commit message.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The spec says that `case _: List[Int]` should be always issue
an unchecked warning:
> Types which are not of one of the forms described above are
> also accepted as type patterns. However, such type patterns
> will be translated to their erasure (§3.7). The Scala compiler
> will issue an “unchecked” warning for these patterns to flag
> the possible loss of type-safety.
But the implementation goes a little further to omit warnings
based on the static type of the scrutinee. As a trivial example:
def foo(s: Seq[Int]) = s match { case _: List[Int] => }
need not issue this warning.
These discriminating unchecked warnings are domain of
`CheckabilityChecker`.
Let's deconstruct the reported bug:
def nowarn[T] = (null: Any) match { case _: Some[T] => }
We used to determine that if the first case matched, the scrutinee
type would be `Some[Any]` (`Some` is covariant). If this statically
matches `Some[T]` in a pattern context, we don't need to issue an
unchecked warning. But, our blanket use of `existentialAbstraction`
in `matchesPattern` loosened the pattern type to `Some[Any]`, and
the scrutinee type was deemed compatible.
I've added a new method, `scrutConformsToPatternType` which replaces
pattern type variables by wildcards, but leaves other abstract
types intact in the pattern type. We have to use this inside
`CheckabilityChecker` only. If we were to make `matchesPattern`
stricter in the same way, tests like `pos/t2486.scala` would fail.
I have introduced a new symbol test to (try to) identify pattern
type variables introduced by `typedBind`. Its not pretty, and it
might be cleaner to reserve a new flag for these.
I've also included a test variation exercising with nested matches.
The pattern type of the inner case can't, syntactically, refer to the
pattern type variable of the enclosing case. If it could, we would
have to be more selective in our wildcarding in `ptMatchesPatternType`
by restricting ourselves to type variables associated with the closest
enclosing `CaseDef`.
As some further validation of the correctness of this patch,
four stray warnings have been teased out of
neg/unchecked-abstract.scala
I also had to changes `typeArgsInTopLevelType` to extract the type
arguments of `Array[T]` if `T` is an abstract type. This avoids the
"Checkability checker says 'Uncheckable', but uncheckable type
cannot be found" warning and consequent overly lenient analysis.
Without this change, the warning was suppressed for:
def warnArray[T] = (null: Any) match { case _: Array[T] => }
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8253 Fix incorrect parsing of <elem xmlns={f("a")}/>
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The spliced application was placed in the `attrMap` in
`SymbolicXMLBuilder` and later incorrectly matched by a pattern
intended only to match:
xml.Text(s)
That attribute value is generated by parsing:
<elem xmlns='a'/>
So the net effect was that the two fragments of XML were identical!
This commit sharpens up the match to really look for a syntactic
`_root_.scala.xml.Text("...")`.
The test just prints the parse trees of a variety of cases, as we
we should not test the modularized XML library in scala/scala.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7444 docs: null Executor allowed in ExecutionContext factories
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Update the ScalaDoc for the factory methods for `ExecutionContext`
which allow a `null` `Executor`/`ExecutorService`.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-5639 Fix spurious discarding of implicit import
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
To be conservative, I've predicated this fix in `-Xsource:2.12`.
This is done in separate commit to show that the previous fix
passes the test suite, rather than just tests with `-Xsource:2.12`.
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In Scala fa0cdc7b (just before 2.9.0), a regression in implicit
search, SI-2866, was discovered by Lift and fixed. The nature of
the regression was that an in-scope, non-implicit symbol failed to
shadow an eponymous implicit import.
The fix for this introduced `isQualifyingImplicit` which discards
in-scope implicits when the current `Context`'s scope contains
a name-clashing entry.
Incidentally, this proved to be a shallow solution, and we later
improved shadowing detection in SI-4270 / 9129cfe9. That picked
up cases where a locally defined symbol in an intervening scope
shadowed an implicit.
This commit includes the test case from the comments of SI-2866.
Part of it is tested as a neg test (to test reporting of ambiguities),
and the rest is tested in a run test (to test which implicits are
picked.)
However, in the test case of SI-5639, we see that the scope lookup
performend by `isQualifyingImplicit` is fooled by a "ghost" module
symbol. The apparition I'm referring to is entered when
`initializeFromClassPath` / `enterClassAndModule` encounters
a class file named 'Baz.class', and speculatively enters _both_ a
class and module symbol. AFAIK, this is done to defer parsing the
class file to determine what inside. If it happens to be a Java
compiled class, the module symbol is needed to house the static
members.
This commit adds a condition that `Symbol#exists` which shines a torch
(forces the info) in the direction of the ghost module symbol. In our
test, this causes it to vanish, as we only need a class symbol for
the Scala defined `class Baz`.
The existing `pos` test for this actually did not exercise the bug,
separate compilation is required. It was originally checked in to
`pending` with this error, and then later moved to `pos` when someone
noticed it was not failing.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6502 Reenables loading jars into the running REPL (regression in 2.10)
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Moves mergeUrlsIntoClassPath from Global into ClassPath
- Revises and documents AbstractFile.getURL
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|