-
Notifications
You must be signed in to change notification settings - Fork 408
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
value Stream in package scala is deprecated (since 2.13.0) #1066
Comments
(I haven't studied this myself but) as someone pointed out on Discord, #627 seems relevant here |
When I look at #627 I don't really understand the discussion, but it seems SethTisue merged a fix for this in Feb 2020. #627 (review) Was this a different issue that just looks similar? |
@jimka2001 it might help if you showed a little more of the context in your code – the context in which you wrote |
Here is a permalink to the function in question; not sure if there are other similar functions here is the content of the function
|
I would expect it to work if you expunge all use of Try that. If it doesn't work, show the version of the code that uses only |
@jimka2001 , according to the snippet, you're trying to make use of the original |
@SethTisue are you suggesting I change the return type of |
I'm not sure if I understand the suggestion. Here is a version of the code which uses only If I understand correctly,
This version does not compile.
If I change
|
OK, I finally got it to work by removing the call to The code now compiles, and at least the local tests pass, i.e. the tests for this package. Perhaps that should have been obvious, but I didn't realize
|
thanks for providing the fixed code, perhaps it will help someone else in a similar situation |
@SethTisue @jimka2001 , just for a record: If you simply provide an implicit conversion for type implicit def shrinkA(a: A): LazyList[A] = ??? that implicit conversion won't be used for shrinking per sei, and the default shrinking will be used instead, i.e. this one: scalacheck/core/shared/src/main/scala/org/scalacheck/Shrink.scala Lines 26 to 30 in 4c403a9
which means no shrinking. If you need a custom shrinking for type A, you still have to provide an implicit |
I'm getting deprecation warnings when I compile my project:
I believe this is caused by the declaration of
Shrink
which seems to be the followingIf I change my use of
Stream.empty
toLazyList.empty
, then I get the following compilation error.The text was updated successfully, but these errors were encountered: