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

Usage docs inaccurate #64

Closed
mslinn opened this issue Apr 20, 2019 · 4 comments
Closed

Usage docs inaccurate #64

mslinn opened this issue Apr 20, 2019 · 4 comments

Comments

@mslinn
Copy link

mslinn commented Apr 20, 2019

The Usage section of the README for this project says:

In your code, adding this import:

import scala.collection.parallel.CollectionConverters._

will enable use of the .par method as in earlier Scala versions.

However using that import in Scala 2.12.7 results in:

object CollectionConverters is not a member of package scala.collection.parallel

The equivalent import for Scala 2.12.7 is instead:

import scala.collection.parallel._

It would be desirable for the old import to continue to work, otherwise older code will break because there is no way to conditionally import based on compiler version.

@SethTisue
Copy link
Member

duplicate of #22?

@mslinn
Copy link
Author

mslinn commented Apr 21, 2019

I would say this is not a duplicate because this issue reports an error in documentation that has not previously been mentioned AFAIK.

@SethTisue
Copy link
Member

sorry, but I fail to see how this isn't exactly the same as #22. let's consolidate there: if you think something is missing from #22, please add it as a comment there.

@SethTisue
Copy link
Member

SethTisue commented Apr 21, 2019

it's also precisely the same, as far as I can tell, as what's already documented in the README at https://github.com/scala/scala-parallel-collections#cross-building-source-compatibility

Cross-building: source compatibility

Using .par is problematic in a cross-built project, since in Scala 2.13 the CollectionConverters._ import shown above is necessary, but in earlier Scala versions, that import will not compile.

You may able to avoid the problem by directly constructing your parallel collections rather than going through .par. For other possible workarounds, see #22, which is still under discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants