Skip to content

Conversation

@ceedubs
Copy link
Contributor

@ceedubs ceedubs commented Sep 7, 2018

This targets the 2.12 branch. See discussion here.

@scala-jenkins scala-jenkins added this to the 2.12.7 milestone Sep 7, 2018
trait LowPriorityEquiv {
self: Equiv.type =>

@deprecated("An implicit universal Equiv instance allows code to compile when it is comparing instances of types for which equality isn't well-defined or implemented (for example, comparing two Function1 instances doesn't generally provide a meaningful result). Use Equiv.universal explicitly instead. If you really want an implicit univeral Equiv intance despite the potential problems, you can write a method `implicit def universalEquiv[T]: Equiv[T] = universal[T]`", "2.12.7")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty long line. I briefly looked for other examples of long deprecation messages in the code base but didn't see much. Happy to reformat if desired.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can look at Ordering.DeprecatedFloatOrdering for an example of a long deprecation message.

Copy link
Member

@SethTisue SethTisue Sep 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggesting explaining at any length you like in the Scaladoc, then putting something shorter in the deprecation message that also refers the user to the Scaladoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SethTisue I attempted to follow your advice. Let me know what you think.

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Sep 7, 2018
This targets the 2.12 branch. See discussion [here](scala#7164).
@ceedubs ceedubs force-pushed the deprecate-universal-equiv-2.12 branch from 0aab7e6 to 88e8ae3 Compare September 7, 2018 22:00
* despite the potential problems, you can write a method such as `implicit def universalEquiv[T]:
* Equiv[T] = universal[T]`
*/
@deprecated("Use explicit Equiv.universal instead. See Scaladoc entry for more information.", "2.12.7")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to put the URL to the entry in the deprecation message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smarter could you please clarify what you mean by "URL to the entry"? Do you mean something like https://www.scala-lang.org/api/2.12.7/scala/math/Equiv$.html#universalEquiv[T]:scala.math.Equiv[T]? I assume that the eventual URL will look like this, but it seems a little fragile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's what I meant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, added.

@adriaanm
Copy link
Contributor

Thanks @ceedubs! I took the liberty of fixing a typo and tightening the wording a bit :-) Hope that's ok!

(When merging, let's squash.)

@ceedubs
Copy link
Contributor Author

ceedubs commented Sep 11, 2018

@adriaanm sure, no problem. Although admittedly I'm scratching my head trying to figure out how you had commit rights to my fork. I don't see anyone else having permissions in Settings. ¯\_(ツ)_/¯

Having said that, I've grown wary of this deprecation. See #7187 (comment)

This might actually be a case in which it would be easier on users to just remove this without going through a deprecation cycle.

@adriaanm
Copy link
Contributor

adriaanm commented Sep 11, 2018

When you submit a PR, there's a checkbox to uncheck if you want to disallow edits. (It's called " Allow edits from maintainers.", and you can also uncheck it after submitting the PR)

@ceedubs
Copy link
Contributor Author

ceedubs commented Sep 11, 2018

Ah, I thought that just applied to the text in the description 😆. It's totally fine I was just confused.

@adriaanm adriaanm modified the milestones: 2.12.7, 2.12.8 Sep 12, 2018
@adriaanm
Copy link
Contributor

Regarding your concerns with the deprecation, what should we do with this PR?

@NthPortal
Copy link
Contributor

(I am not @ceedubs but) I think we should deprecate in 2.13, where we can add non-deprecated methods for all of the core types. I don't think it makes sense to deprecate without those available (since there may not be anything to replace the universal Equiv with), and bincompat won't allow us to add instances for core types in 2.12.

@ceedubs
Copy link
Contributor Author

ceedubs commented Sep 29, 2018

@adriaanm @NthPortal sorry for the lack of activity on this and #7187. I'll try to come back to both of these this weekend.

@ceedubs
Copy link
Contributor Author

ceedubs commented Sep 30, 2018

I'm going to go ahead and close this out until we reach a conclusion on #7187, as I think that the two are pretty intertwined and one probably shouldn't happen without the other.

@ceedubs ceedubs closed this Sep 30, 2018
@SethTisue SethTisue removed this from the 2.12.8 milestone Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes worth highlighting in next release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants