Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 2.10.x to 2.11.x #4357

Merged
merged 16 commits into from Feb 25, 2015
Merged

Conversation

retronym
Copy link
Member

% export MB=$(git merge-base origin/2.11.x origin/2.10.x)

% transcript git log --graph --oneline --decorate $MB...origin/2.10.x

https://gist.github.com/3de48ff88c17803a222a

% git merge -sours fbbd1b2
Merge made by the 'ours' strategy.

% git merge ad845ff
Auto-merging test/files/jvm/future-spec/PromiseTests.scala
CONFLICT (content): Merge conflict in test/files/jvm/future-spec/PromiseTests.scala
Auto-merging src/library/scala/concurrent/Promise.scala
CONFLICT (content): Merge conflict in src/library/scala/concurrent/Promise.scala
Automatic merge failed; fix conflicts and then commit the result.
merge/2.10.x-to-2.11.x-20150224 ~/code/scala3 git status
On branch merge/2.10.x-to-2.11.x-20150224
All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

Changes to be committed:

    modified:   src/library/scala/concurrent/Promise.scala
    modified:   test/files/jvm/future-spec/PromiseTests.scala
    new file:   test/files/jvm/t8689.check
    new file:   test/files/jvm/t8689.scala

% git commit

[merge/2.10.x-to-2.11.x-20150224 1a7f4ec] Merge commit 'ad845ff' into merge/2.10.x-to-2.11.x-20150224

% git merge -sours b2f5101
Merge made by the 'ours' strategy.

som-snytt and others added 16 commits December 4, 2014 12:28
Fingers crossed, I have no local java 6 here to test.

No test because no q"" on 2.10.
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
Improve attribute parsing and propagate errors
across event thread. Otherwise tests just hang.
This is tested, right?

This is an upstream port of scala-xml
5f2cfadeb9e8574ed66f37dc7a7a868eb129a8a9
SI-8689 Avoid internal error in Promise after sequence of completions
Because the compiler and library share some code in this
version, compiler must exclude xml tags that look like
Scala operators, such as `<:`.

This is an upstream port of:
scala-xml/commit/968f7bd94e934c781c19e25847ab09ac98cfbaf6
Tested on:
  - Mac: FF35/Safari 8/Chrome 41
  - Win: IE11
Scaladoc js location synch more robust
SI-4339 Backpatch event errors and attr fix
Conflicts:
	src/library/scala/concurrent/Promise.scala
	test/files/jvm/future-spec/PromiseTests.scala
@scala-jenkins scala-jenkins added this to the 2.11.7 milestone Feb 24, 2015
@retronym retronym modified the milestones: 2.11.6, 2.11.7 Feb 24, 2015
@retronym
Copy link
Member Author

Assigning to the 2.11.6 milestone, as the fix for SI-8869 should be included in that release.

@adriaanm
Copy link
Contributor

jenkins master ran out of disk space (scala/scala-jenkins-infra#37)

@adriaanm
Copy link
Contributor

/rebuild ce68a97

@adriaanm
Copy link
Contributor

the IDE failed in the same way on #4354...

I conclude this test is flaky -- where can we track this?

Failed tests:   testWithMultiplePartiallyAppliedFunctions(org.scalaide.ui.internal.editor.decorators.bynameparams.CallByNameParamAtCreationPresenterTest): expected:<Set(offset: 168, length: 2, offset: 230, length: 2, offset: 18, length: 2, offset: 208, length: 2, offset: 212, length: 2, offset: 244, length: 2, offset: 226, length: 2, offset: 190, length: 2)> but was:<Set(offset: 168, length: 2, offset: 230, length: 2, offset: 208, length: 2, offset: 212, length: 2, offset: 244, length: 2, offset: 226, length: 2, offset: 190, length: 2)>

retronym added a commit to retronym/scala-ide that referenced this pull request Feb 25, 2015
Failed a few times recently in Scala PR validation:

  scala/scala#4354
  scala/scala#4357
@retronym
Copy link
Member Author

I conclude this test is flaky -- where can we track this?

I've submitted a PR to scala-ide to enable retry for that test.

@adriaanm
Copy link
Contributor

LGTM -- the other failures can safely be ignored

adriaanm added a commit that referenced this pull request Feb 25, 2015
@adriaanm adriaanm merged commit 092690e into scala:2.11.x Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants