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

Uniformize semantics of :> in class after deprecation phase of #16230 #18590

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

proux01
Copy link
Contributor

@proux01 proux01 commented Jan 30, 2024

This ends the deprecation phases of #16230 and #15802 that introduced :: instead of :> for subclasses in Class declarations. Now :> produces an error in Class before we can make it mean coercion in all record declarations (including typeclasses) in next version.

  • Added / updated test-suite.
  • Added changelog.
  • Added / updated documentation.
    • Documented any new / changed user messages.
    • Updated documented syntax by running make doc_gram_rsts.

Overlays (to be merged before the current PR):

To prepare overlays, just ensure that the code compiles with any Coq >= 8.18 and options -w +future-coercion-class-constructor and -w +future-coercion-class-field

@coqbot-app coqbot-app bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jan 30, 2024
@proux01 proux01 added the request: full CI Use this label when you want your next push to trigger a full CI. label Jan 30, 2024
@coqbot-app coqbot-app bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Jan 30, 2024
Copy link
Contributor

coqbot-app bot commented Jan 30, 2024

The job library:ci-fiat_crypto_legacy has failed in allow failure mode
ping @JasonGross

proux01 added a commit to math-comp/analysis that referenced this pull request Jan 31, 2024
proux01 added a commit to proux01/InteractionTrees that referenced this pull request Jan 31, 2024
proux01 added a commit to coq-community/coq-ext-lib that referenced this pull request Jan 31, 2024
proux01 added a commit to math-comp/analysis that referenced this pull request Jan 31, 2024
proux01 added a commit to coq-community/math-classes that referenced this pull request Jan 31, 2024
proux01 added a commit to coq-community/math-classes that referenced this pull request Jan 31, 2024
proux01 added a commit to coq-community/atbr that referenced this pull request Jan 31, 2024
palmskog added a commit to coq-community/atbr that referenced this pull request Jan 31, 2024
proux01 added a commit to proux01/QuickChick that referenced this pull request Jan 31, 2024
proux01 added a commit to proux01/relation-algebra that referenced this pull request Jan 31, 2024
@proux01 proux01 added this to the 8.20+rc1 milestone Jan 31, 2024
@proux01 proux01 added kind: cleanup Code removal, deprecation, refactorings, etc. part: typeclasses The typeclass mechanism. labels Jan 31, 2024
liyishuai pushed a commit to QuickChick/QuickChick that referenced this pull request Feb 1, 2024
liyishuai pushed a commit to coq-community/coq-ext-lib that referenced this pull request Feb 1, 2024
proux01 added a commit to coq-community/corn that referenced this pull request Feb 1, 2024
@proux01 proux01 added the request: full CI Use this label when you want your next push to trigger a full CI. label Feb 1, 2024
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 6, 2024
@coq coq deleted a comment from coqbot-app bot Mar 7, 2024
@coq coq deleted a comment from coqbot-app bot Mar 7, 2024
@coq coq deleted a comment from coqbot-app bot Mar 7, 2024
@proux01
Copy link
Contributor Author

proux01 commented Mar 7, 2024

CI green, as far as I'm concerned, this is ready

@SkySkimmer
Copy link
Contributor

Still waiting for fcl

@JasonGross
Copy link
Member

Ping @JasonGross (fiat crypto legacy is allow failure, I made almost all other overlays but I'm not gonna do that one myself)

I don't know why f-c-l is still allow failure. It was originally put there due to the intricacy of the tactic scripts, but it has not had an issue that required patching the tactics in a long time, it no longer tries to maintain backwards compatibily, and it has caught bugs that no other CI development has caught. I think it should be moved out of allowed failure.

I'll try to create an overlay within the next couple days to a week.

The fix is just to replace :> with :: in classes?

JasonGross added a commit to JasonGross/fiat-crypto that referenced this pull request Mar 12, 2024
For coq/coq#18590

Change made with
```bash
python -c "$(printf 'import re\nfs = {f:open(f, "r").read() for f in (%s)}\nfs2 = {f:[m for m in re.findall(r"%s", c, flags=re.MULTILINE|re.DOTALL) if not m.startswith("Existing") and ":>" in m and re.search(r"%s", m, flags=re.MULTILINE|re.DOTALL)] for f, c in fs.items()}\nfs3 = {f:m for f, m in fs2.items() if m}\nfs4 = {}\nfor f, m in fs3.items():\n    orig = rep = fs[f]\n    for val in m:\n        rep = rep.replace(val, val.replace(":>", "::"))\n    fs4[f] = rep\nfor f, c in fs4.items():\n    open(f, "w").write(c)' "$(printf '"%s", ' $(git grep --name-only 'Class '))" '(?:Existing\s+)?Class\s.*?\.\s' ':=\s*{')"
```
JasonGross added a commit to mit-plv/fiat-crypto that referenced this pull request Mar 12, 2024
For coq/coq#18590

Change made with
```bash
python -c "$(printf 'import re\nfs = {f:open(f, "r").read() for f in (%s)}\nfs2 = {f:[m for m in re.findall(r"%s", c, flags=re.MULTILINE|re.DOTALL) if not m.startswith("Existing") and ":>" in m and re.search(r"%s", m, flags=re.MULTILINE|re.DOTALL)] for f, c in fs.items()}\nfs3 = {f:m for f, m in fs2.items() if m}\nfs4 = {}\nfor f, m in fs3.items():\n    orig = rep = fs[f]\n    for val in m:\n        rep = rep.replace(val, val.replace(":>", "::"))\n    fs4[f] = rep\nfor f, c in fs4.items():\n    open(f, "w").write(c)' "$(printf '"%s", ' $(git grep --name-only 'Class '))" '(?:Existing\s+)?Class\s.*?\.\s' ':=\s*{')"
```
@proux01 proux01 added the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 13, 2024
This way, in next version, we can finally have :> declare a coercion
in any record declaration, including typeclasses. Whereas ::
consistently declares typeclass instances since Coq 8.18.
@coqbot-app coqbot-app bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Mar 13, 2024
Copy link
Contributor

coqbot-app bot commented Mar 13, 2024

The job library:ci-fiat_crypto_legacy has failed in allow failure mode
ping @JasonGross

@proux01
Copy link
Contributor Author

proux01 commented Mar 13, 2024

@JasonGross fiat_crypto_legacy is still failing, apparently your script did not handle definitional typeclasses

@JasonGross
Copy link
Member

apparently your script did not handle definitional typeclasses

I fixed my script and made mit-plv/fiat-crypto#1830, which will auto-merge once CI finishes running there

@proux01
Copy link
Contributor Author

proux01 commented Mar 15, 2024

Thanks that seems to work

@SkySkimmer SkySkimmer removed the needs: overlay This is breaking external developments we track in CI. label Mar 15, 2024
@SkySkimmer
Copy link
Contributor

@coqbot merge now

@coqbot-app coqbot-app bot merged commit a091b25 into coq:master Mar 15, 2024
7 checks passed
@proux01
Copy link
Contributor Author

proux01 commented Mar 15, 2024

Thanks!

@proux01 proux01 deleted the cleanup_16230 branch March 15, 2024 14:31
ckeller pushed a commit to smtcoq/smtcoq that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: cleanup Code removal, deprecation, refactorings, etc. part: typeclasses The typeclass mechanism.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants