-
Notifications
You must be signed in to change notification settings - Fork 688
Add a deprecation warning to > in Class #15802
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
Add a deprecation warning to > in Class #15802
Conversation
94329ee
to
4eee9a6
Compare
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
4eee9a6
to
9628702
Compare
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
9628702
to
a876a4a
Compare
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
🔴 CI failures at commit a876a4a without any failure in the test-suite ✔️ Corresponding jobs for the base commit 47ad43b succeeded ❔ Ask me to try to extract minimal test cases that can be added to the test-suite 🏃
|
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
🔴 CI failures at commit 4abedb4 without any failure in the test-suite ✔️ Corresponding jobs for the base commit 47ad43b succeeded ❔ Ask me to try to extract minimal test cases that can be added to the test-suite 🏃
|
4abedb4
to
e6dda16
Compare
The job library:ci-fiat_crypto_legacy has failed in allow failure mode |
This isn't a deprecation, it's a behaviour change. |
:>
even for typeclasses
Yes, you read it before I had time to update the title, fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a deprecation phase
You mean putting a warning telling a coercion will be added in the future? why not. |
I think it will take at least 3 version before we can make I see that you've used export for the locality of the existing instances, was this the case before? |
I'm not sure I get this last one, we are talking about adding coercions, not deleting anything. So for me, this third version would be the exact same as currently: no change and no warning, what's the point? |
We could have a version where |
I agree that having the same syntax do two different things is confusing, and I was startled by this myself many years ago. However, the new behavior of The proper solution, IMO, is to have a syntax for only the coercion, and a syntax for only the instance. I think the transition plan for this should look as follows:
This gives precedence to the |
Why wait? If we want 2 releases with both syntaxes we can just keep warning for both releases. |
cc @ppedrot we may want to revert this PR for 8.16 |
We'll have to allow that warning in std++ and Iris then if we want to support more than one Coq release. I think it is nicer to users to wait a bit before deprecating things in favor of new things that have only just been introduced. (The quick deprecation of
Ah, I misunderstood then, I thought this was a behavior change. Thanks for clarifying. Still I think this deprecation is too early. Unless there is some automatic way for us to adjust the code to the new style, we will just allow the warning and wait for such an automatic way to be available -- which seems a lot easier when it is about replacing |
I disagree, IMO the warning is the primary way to communicate intended changes to users (we can't expect everyone to watch PRs) so it's better to have it early. Allowing the warning if you don't want to deal with it immediately is a fine solution. |
Could the warning state that the suggested alternative needs Coq version X to work? The |
As noted above, in the CI all projects but category-theory are unharmed by the extra coercions and a few project even actually want them. So this statement looks pretty wrong. Anyway, there is now a specific request for a syntax to make field instances (but not coercions), |
That's a good idea, and this is still time to do it right for the Hint Rewrite warning. Feel free to open a PR. |
I support @SkySkimmer's suggestion to revert this PR in 8.16 if the new plan is #16224. |
Based on many years of painful experience, I consider all coercions harmful by default until proven otherwise. Of course, adding a coercion doesn't break a build, but it can still break printing by making goals impossible to interpret. CI wouldn't catch almost any of the things that make coercions painful. |
As discussion in rocq-prover#15802 indicates we should revert most fo this and rather go for the plan in rocq-prover#16224 implemented by rocq-prover#16230
As discussion in rocq-prover#15802 indicates we should revert most fo this and rather go for the plan in rocq-prover#16224 implemented by rocq-prover#16230
Reviewed-by: Alizter Ack-by: Zimmi48 Co-authored-by: Alizter <[email protected]>
As discussion in rocq-prover#15802 indicates we should revert most fo this and rather go for the plan in rocq-prover#16224 implemented by rocq-prover#16230
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
…rover#16230 This ends the deprecation phases of rocq-prover#16230 and rocq-prover#15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> means coercion in all record declarations (including typeclasses).
This follows a discussion in #2643
Currently,
field :> field_type
declares field a coercion in every record declaration, except typeclasses where it is instead declared a typeclass instance. It seems more principled to remove that exception (so in typeclasses, both an instance and a coercion are declared).This is currently only introducing a warning to start a deprecation phase.
Adresses #2643 #9014
Overlays (backward compatibles, kindly provided but don't need to be merged in sync with the current PR):