Skip to content

Still can't use scala-parallel-collections in REPL via :dep #25078

@bishabosha

Description

@bishabosha

Compiler Version

commit a3a3fb8

Details

This is actually still broken, as it crashes/fails to typecheck the moment you actually try to use a definition:

$ java -cp $(cs fetch -p org.scala-lang:scala3-repl_3:3.8.3-RC1-bin-SNAPSHOT) dotty.tools.repl.Main -cp $(cs fetch -p org.scala-lang:scala3-repl_3:3.8.3-RC1-bin-SNAPSHOT)

scala> :dep org.scala-lang.modules::scala-parallel-collections:1.2.0

scala> import scala.collection.parallel.CollectionConverters.seqIsParallelizable

scala> List(1,2,3).par
// crashes in TastyUnpickler
$ java -cp $(cs fetch -p org.scala-lang:scala3-repl_3:3.8.3-RC1-bin-SNAPSHOT) dotty.tools.repl.Main -cp $(cs fetch -p org.scala-lang:scala3-repl_3:3.8.3-RC1-bin-SNAPSHOT)

scala> :dep org.scala-lang.modules::scala-parallel-collections:1.2.0

scala> scala.collection.parallel.ParSeq(List(1,2,3)*)
-- Error: ----------------------------------------------------------------------
1 |scala.collection.parallel.ParSeq(List(1,2,3)*)
  |                                 ^^^^^^^^^^^^
  |Sequence argument type annotation `*` cannot be used here:
  |the corresponding parameter has type Seq[A] @Repeated which is not a repeated parameter type
1 error found

Originally posted by @bishabosha in #25064 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions