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

[Merged by Bors] - feat(tactic/lint): better fails_quickly linter #8932

Closed
wants to merge 9 commits into from

Conversation

fpvandoorn
Copy link
Member

@fpvandoorn fpvandoorn commented Aug 31, 2021

This linter catches a lot more loops.


Open in Gitpod

TODO:

  • figure out a good threshold for max_steps
  • [ ] fix some/all problematic instances it catches

@fpvandoorn fpvandoorn added WIP Work in progress awaiting-author A reviewer has asked the author a question or requested changes t-meta Tactics, attributes or user commands labels Aug 31, 2021
bors bot pushed a commit that referenced this pull request Aug 31, 2021
…e` (#8933)

Previously, this instance would first look for `decidable_eq` instances and after that for `is_simple_lattice` instances. The latter has only 4 instances, while the former takes hundreds of steps. Reordering the arguments makes a lot of type-class searches fail a lot quicker.

Caught by the new linter (#8932).
bors bot pushed a commit that referenced this pull request Aug 31, 2021
This instance causes loop with `is_total_preorder.to_is_total`, and was unused in the library.

Caught by the new linter (#8932).
@fpvandoorn fpvandoorn added awaiting-review The author would like community review of the PR and removed WIP Work in progress awaiting-author A reviewer has asked the author a question or requested changes labels Sep 3, 2021
@robertylewis
Copy link
Member

TODO:

  • figure out a good threshold for max_steps
  • fix some/all problematic instances it catches

Is the plan to do these as part of this PR, or later?

@fpvandoorn
Copy link
Member Author

The first I sort-of did (by just setting the max_steps high).
The second is a little bit discussed in
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/various.20type-class.20loops
and
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/type-class.20loops.20in.20category.20theory

The status is: we might not fix them in Lean 3 if the Lean 4 loop-checking catches these loops. I haven't done the tests in Lean 4. Even if we're fixing them in Lean 3, it will be in a follow-up PR.

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 7, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 8, 2021
@robertylewis
Copy link
Member

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 9, 2021
bors bot pushed a commit that referenced this pull request Sep 9, 2021
This linter catches a lot more loops.



Co-authored-by: Floris van Doorn <fpv@andrew.cmu.edu>
@bors
Copy link

bors bot commented Sep 9, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(tactic/lint): better fails_quickly linter [Merged by Bors] - feat(tactic/lint): better fails_quickly linter Sep 9, 2021
@bors bors bot closed this Sep 9, 2021
@bors bors bot deleted the better-fails-quickly branch September 9, 2021 22:25
PatrickMassot added a commit that referenced this pull request Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants