Skip to content

Mention Array.deep has been removed #1477

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

Merged
merged 1 commit into from
Aug 6, 2019
Merged

Conversation

Philippus
Copy link
Member

fixes #1400. I'm struggling with describing a good alternative though, but maybe that is not needed?

@Philippus Philippus requested a review from SethTisue August 1, 2019 21:13
@julienrf
Copy link
Contributor

julienrf commented Aug 2, 2019

Maybe an alternative would be .flatten.toSeq?

@SethTisue
Copy link
Member

SethTisue commented Aug 6, 2019

Maybe an alternative would be .flatten.toSeq?

no, .deep doesn't flatten

I no longer remember what the original reporter of #1400 was using deep for

I think this whole topic is so obscure, it's fine to just merge this as-is. at the time I opened #1400 (on behalf of a user), I probably wasn't aware how obscure deep is

@SethTisue SethTisue merged commit c4d5ece into scala:master Aug 6, 2019
@smarter
Copy link
Member

smarter commented Aug 6, 2019

I miss .deep too, there's a reimplementation in partest that I wish was part of the stdlib: https://github.com/scala/scala/blob/466990276fa361006a90a744616aac95321265a2/src/partest/scala/tools/partest/Util.scala#L65-L78

@SethTisue
Copy link
Member

@smarter can you runtime.ScalaRunTime.stringOf it, or do you actually need to stop before going all the way to String?

@smarter
Copy link
Member

smarter commented Aug 6, 2019

I wasn't aware of that, that works too but afaik scala.runtime is considered an internal API and should not be relied on.

@SethTisue
Copy link
Member

SethTisue commented Aug 6, 2019

yeah. perhaps a PR putting them stuff somewhere in stdlib, without adding to the number of methods available on Array and other user-facing types (which is the main reason I was glad to see .deep go), would be accepted.

@Philippus Philippus deleted the issue-1400 branch August 6, 2019 20:01
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

Successfully merging this pull request may close these issues.

.deep method is gone in 2.13 but not mentioned in migration guide
4 participants