-
Notifications
You must be signed in to change notification settings - Fork 29
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
add Dotty cross-build #113
Conversation
[error] -- [E057] Type Mismatch Error: /Users/tisue/scala-parallel-collections/core/src/main/scala/scala/collection/generic/ParMapFactory.scala:30:80
[error] 30 |abstract class ParMapFactory[CC[X, Y] <: ParMap[X, Y] with ParMapLike[X, Y, CC, CC[X, Y], _]]
[error] | ^
[error] |Type argument CC[X, Y] does not conform to upper bound scala.collection.parallel.ParMapLike[X, Y, scala.collection.parallel.ParMap,
[error] | LazyRef(CC[X, Y])
[error] |, collection.parallel.ParMapLike[X, Y, CC, CC[X, Y], ?]#Sequential] &
[error] | scala.collection.parallel.ParMap[X, Y] 😱 interesting, and perhaps a clue, that |
bcc85fd
to
4c22a3b
Compare
the
next step is to try to get the test suite going. I can do |
89506cc
to
ba4ef7f
Compare
|
getting testmacros going was easy, it only had a single macro and it's a one-liner in Dotty |
Dotty has "inherited member can't shadow definition from enclosing scope" which isn't in scala 2 yet. (I will try to contribute it under |
core/src/main/scala/scala/collection/parallel/ParIterableLike.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/RemainsIterator.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/immutable/ParHashMap.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/immutable/ParHashMap.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/mutable/ParArray.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/mutable/ParHashMap.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/scala/collection/parallel/mutable/ParHashSet.scala
Outdated
Show resolved
Hide resolved
Apparently I was doing this while trying bug 12106 in August, I was curious what would dotty do? I wound up |
in local testing, all tests are now green except thx @som-snytt for the comments. I will circle back to them |
the ScalaCheck folks published ScalaCheck 1.15.0-M1 for Dotty 0.27.0-RC1 just now, so now the CI build is on par with what I was seeing locally using a snapshot build of ScalaCheck |
6a2972c
to
fdf36d4
Compare
tests are now passing. I still want to see if the unchecked-variance commit can be improved or avoided |
2ab9160
to
36d61e6
Compare
Okay, this is ready for review. I don't see a way to improve on the |
I'll merge on Monday (Oct 26) if there's no review feedback by then |
a couple of folks who might be masochistic enough to have a look: @szeiger @joshlemer |
note to prospective reviewers: of the other four PRs, #119 is the at-least-slightly-interesting one |
including adding Scala 3 version of ShouldNotTypecheck
preparations were made in #117, #118, #119, #120
references #80
running notes on the sorts of changes needed:
do-while
is gone 👋implicit def
s need explicit result types ✔️-language:implicitConversions
build-wide 🤷weird thing where I had to add empty bodies to some traitsneed to circle back and figure out if this is a Dotty bug or what@uncheckedVariance
around to make it compile, but need to circle back and consider whether that's acceptable and what's really going on@uncheckedVariance
is needed for abstracting over mutable collections (invariant) and immutable ones (which may be covariant), so it's quite plausible that the Scala 2 typechecker missed some cases where it should have been stricter all along