| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
It turned up in play profiling.
|
|
|
|
|
|
|
|
| |
"sbt" is not an acronym (it used to be, but it isn't any longer).
It's a proper name, like "iPhone" or "eBay".
So, just like you wouldn't write "Get Started With EBay" or
"How To Reset Your IPhone", we don't write "Using the Sbt Build".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The behaviour changed in #5550, this commit adapts to the change so
that we'll be binary compatible after boostrapping.
MiMa alerted us to a change in the parentage of two objects in the
forkjoin package object.
In Scala 2.12.0/1, they implemented `scala.Serializable`. Recently,
this (synthetically added) parent was absent. This appears to be
due to a bug fix in `companionSymbolOf`, which no longer treats
objects and same-named type aliases to be companions.
This commit manually adds the formerly-synthetic parents to these
objects, and documents the change in compiler behaviour with a test.
Fixes scala/scala-dev#290
|
|\
| |
| | |
SI-10007 sys.process thread sync
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A previous change to replace `SyncVar.set` with `SyncVar.put`
breaks things.
This commit tweaks the thread synchronizing in `sys.process`
to actually use `SyncVar` to sync and pass a var.
Joining the thread about to exit is superfluous.
A result is put exactly once, and consumers use
non-destructive `get`.
Note that as usual, avoid kicking off threads in a static
context, since class loading cycles are somewhat dicier
with 2.12 lambdas. In particular, REPL is a static context
by default.
SI-10007 Clarify deprecation message
The message on `set` was self-fulfilling, as it didn't
hint that `put` has different semantics.
So explain why `put` helps avoid errors instead of
creating them.
SI-10007 Always set exit value
Always put a value to exit code, defaulting to None.
Also clean up around tuple change to unfortunately
named Future.apply. Very hard to follow those types.
Date command pollutes output, so tweak test.
|
| | |
|
|\ \
| | |
| | | |
avoid boxing
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
scala.runtime.Rich{Double, Float} has `isNaN` and these are value class.
Also java.lang.{Double, Float} has `isNaN`.
- https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#isNaN--
- https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#isNaN--
We can't call `RichDouble#isNaN` because
`implicit def double2Double(x: Double): java.lang.Double`
is higher priority than
`implicit def doubleWrapper(x: Double): RichDouble`
```
$ scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
$ scala -Xprint:jvm -e "1.0.isNaN"
[[syntax trees at end of jvm]] // scalacmd616162202928036892.scala
package <empty> {
object Main extends Object {
def main(args: Array[String]): Unit = {
new <$anon: Object>();
()
};
def <init>(): Main.type = {
Main.super.<init>();
()
}
};
final class anon$1 extends Object {
def <init>(): <$anon: Object> = {
anon$1.super.<init>();
scala.this.Predef.double2Double(1.0).isNaN();
()
}
}
}
```
|
|/ |
|
|
|
| |
Replace deprecated conforms with identity.
|
| |
|
| |
|
|
|
|
|
|
| |
* Enhanced Scaladocs with groupings and clarifications
* traverse now runs the last step like sequence
* A few minor non-semantic changes to method implementations
|
|
|
|
|
| |
bacause Future#onSuccess is deprecated
https://github.com/scala/scala/commit/fa0743c32338f147eaf7a
|
| |
|
|\
| |
| | |
Resolve several deprecation warnings
|
| |
| |
| |
| | |
Replace it with SyncVar#put
|
|/ |
|
|\
| |
| | |
Provide simpler commented example for Future.map
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adding connection between map and for
As described by SethTisue.
Removing parentheses
Fixing scaladoc
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Conflicts:
build.sbt
scripts/jobs/integrate/bootstrap
|
| | | |
|
|\| |
| |/
|/|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala
src/compiler/scala/tools/nsc/transform/Constructors.scala
src/compiler/scala/tools/nsc/typechecker/Contexts.scala
src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
src/scaladoc/scala/tools/nsc/doc/html/resource/lib/jquery.layout.js
|
| |
| |
| |
| |
| |
| | |
The links were being skipped with a warning before this commit.
The key change was to remove the result type and add an asterisk.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Language imports are preceding other imports
- Deleted empty file: InlineErasure
- Removed some unused private[parallel] methods in
scala/collection/parallel/package.scala
This removes hundreds of warnings when compiling with
"-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
|
|\ \
| | |
| | | |
Remove ThreadPoolExecutor fallback in ExecutionContextImpl
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The method createDefaultExecutorService had a fallback if the creation
of a ForkJoinPool didn't succeed. This was necessary, because Scala
shipped its own version of FJP, and the dependency on sun.misc.Unsafe
(which is not an "offical" official API) made portability slightly
questionable.
Now that we can assume that FJP is supplied by the JDK, this concern
goes away.
|
|\ \ \
| | | |
| | | | |
SI-9545 SyncVar doc and deboxing
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't store the wrapped value double-wrapped in Option.
Also burnish some more docs.
|
| |/ /
| | |
| | |
| | | |
It used to have javish semantics, but now is what it is.
|
|/ / |
|
|\| |
|
| |
| |
| |
| |
| | |
Previously _.result() was invoked in the "real" ExecutionContext, but this is an
unnecessary use of the context.
|
| |
| |
| |
| |
| |
| |
| | |
For each URL
- Where it redirected the target of the redirection was used
- Where is no longer existed a replacement was selected
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To avoid `sun.misc.Unsafe`, which is not supported on Google App Engine.
Deprecate `AbstractPromise` --> extend `j.u.c.atomic.AtomicReference` directly.
`AtomicReference.compareAndSet()` should also provide better performance on
HotSpot, which compiles it down to the machine's CAS instruction.
The binary incompatible change is ok because it's in an internal package.
I can't think of any real issue with adding a superclass (which contributes
only final methods) to a class in an implementation package (as long as
those methods were not introduced in any illicit subclasses of said class).
Instead of changing `DefaultPromise`'s super class, let's be more
conservative, and do it closest to the source. This is both clearer and more
focussed, leaving those subclasses of AbstractPromise we never heard of
unaffected.
Genesis of the commit: since the work on `Future` performance, `AbstractPromise`
is using `Unsafe`, breaking the ability for `Future` to be executed on GAE. At
that time, viktorklang suggested to implement a fallback in case `Unsafe` is
not available. carey proposed an implementation, and mchv submitted a patch,
which was refined by adriaanm.
|
| |
| |
| |
| |
| |
| |
| |
| | |
only trivial merge conflicts here.
not dealing with PR #4333 in this merge because there is a substantial
conflict there -- so that's why I stopped at
63daba33ae99471175e9d7b20792324615f5999b for now
|
| |
| |
| |
| | |
now that Akka 2.4 doesn't need it anymore
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was non-final in Scala 2.11.x, and made final as part
of fa0743c32.
Removing the final modifier seems like the cleanest way to enable
conversions like `javaFuture.toScala.toJava` to return the original
`javaFuture` in scala-java8-compat.
I have made the methods defined in this class final as an
alternative lockdown.
Discussion, Motivation:
https://github.com/scala/scala-java8-compat/pull/46
https://github.com/scala/scala-java8-compat/pull/50
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide deprecated compatibility stubs for the types and static members,
which forward as follows:
```
scala.concurrent.forkjoin.ForkJoinPool => java.util.concurrent.ForkJoinPool
scala.concurrent.forkjoin.ForkJoinTask => java.util.concurrent.ForkJoinTask
scala.concurrent.forkjoin.ForkJoinWorkerThread => java.util.concurrent.ForkJoinWorkerThread
scala.concurrent.forkjoin.LinkedTransferQueue => java.util.concurrent.LinkedTransferQueue
scala.concurrent.forkjoin.RecursiveAction => java.util.concurrent.RecursiveAction
scala.concurrent.forkjoin.RecursiveTask => java.util.concurrent.RecursiveTask
scala.concurrent.forkjoin.ThreadLocalRandom => java.util.concurrent.ThreadLocalRandom
```
To prepare for Java 9, the Scala library does not itself use `sun.misc.Unsafe`.
However, for now, it provide a convenience accessor for it
via `scala.concurrent.util.Unsafe`. This (deprecated) class will
be removed as soon as the eco-system drops its use
(akka-actor, I'm looking at you).
|
|\|
| |
| |
| | |
merge/2.11.x-to-2.12.x-20150501
|
| |\
| | |
| | | |
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.
|
| |/
| |
| |
| |
| | |
This commit corrects many typos found in scaladocs and comments.
There's also fixed the name of a private method in ICodeCheckers.
|
|\| |
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/library/scala/concurrent/Promise.scala
test/files/jvm/future-spec/PromiseTests.scala
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Calling `completeWith` when the `DefaultPromise` is already completed,
leads to callbacks not being properly executed.
This happened because `Future.InternalCallbackExecutor` extends
`BatchingExecutor`[1] which assumes `unbatchedExecute` to be async,
when in this case it is sync, and if there is an exception thrown
by executing the batch, it creates a new batch with the remaining
items from the current batch and submits that to `unbatchedExecute`
and then rethrows, but if you have a sync `unbatchedExecute`, it will
fail since it is not reentrant, as witnessed by the failed `require`
as reported in this issue.
This commit avoids problem by delegating `completeWith` to
`tryComplete`, which has the effect of using `onComplete` +
`tryComplete` i.s.o. `complete`, which means that when it fails
(because of a benign race condition between completers) it won't
throw an exception.
It has been tested by the minimized reproducer.
[1] Actually, in the 2.10.x branch where this patch is starting out,
"The BatchingExecutor trait had to be inlined into
InternalCallbackExecutor for binary compatibility.". This comment
will be more literally correct in the context of 2.11.x and beyond
|
| | | |
|
| |\ \
| | | |
| | | | |
Document concurrent package object
|
| | | | |
|