Start a GoodDefaults file collecting recommended option settings.#19117
Start a GoodDefaults file collecting recommended option settings.#19117Zimmi48 wants to merge 1 commit into
Conversation
|
Thanks for opening this! I would say the relevant proposals are
For sure on the list should be the recommended config for type classes but I don't know it. |
|
If anyone disagrees with the proposed options, please voice your opinion. BTW, @TheoWinterhalter, you may be able to push changes directly to this branch, in particular if you see the "Add more commits by pushing to the good-defaults branch on Zimmi48/coq." message above the CI status section. |
|
I'm a bit wary of the Keyed Unification option, it's probably wildly undertested and thus very buggy. |
|
We know primitive projections are pretty buggy too. |
|
OK. I advise that we avoid any controversial or insufficiently tested option. We could make a separate file |
|
I guess we should look through the deprecated warnings to see if any correspond to options that may be flipped. |
|
But if we do that we need to version this file per release... |
That's already the case here. |
|
Versioning it is the whole point in fact. If we didn't version we may as well flip the global defaults. |
|
Thanks @Zimmi48, but I actually don't want to push things, I'm merely listing options that might be worth adding, but I'm myself unsure whether they should, and I think it should be debated. |
|
Since this is a draft, let's remove the milestone. |
|
There was a good reason for the milestone: the file has a version number. If it is not merged in this version, it should be renamed. |
|
Then rename to 8.21 and put in 8.21+rc1 milestone. |
|
Why would I do that, exactly? The documented branching date for 8.20 is 2024-06-17. So if this PR is ready to merge before that date, it can still go in 8.20, no? |
|
Sure |
|
Coming back to this so it doesn't die. I think we would need have a flag to change default hint mode for typeclasses. Currently I think it's |
|
The "needs: rebase" label was set more than 30 days ago. If the PR is not rebased in 30 days, it will be automatically closed. |
|
This PR was not rebased after 30 days despite the warning, it is now closed. |
|
I see #19473 is relevant here. |
|
I fear, this also means more chances to just remained ignored or simply unknown :( |
|
Sure, but this is a better middle ground to doing nothing, which has been what has been done for years for many of these defaults. There were even attempts at changing some of these defaults, which failed (e.g., #17811). |
|
We have a better CI contract now, maybe that would help? |
318aa7f to
1fe2393
Compare
1fe2393 to
fd8ac57
Compare
|
I would also vouch to set the TC database opaque by default, see #20786. |
Co-authored-by: Théo Winterhalter <theo.winterhalter@inria.fr> Follow-up of Zulip discussion at: https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/Better.20default.20options Update theories/Corelib/Compat/GoodDefaults_2025.v Co-authored-by: Théo Zimmermann <theo.zimmermann@telecom-paris.fr>
fd8ac57 to
9eca531
Compare
|
Done. |
|
This should probably get merged. Then, we will have until the 9.2 release to nitpick the settings / improve the Good Defaults 2025 file before it is frozen forever. |
|
Is there anything we can do to have this PR accepted? |
|
@TheoWinterhalter concerning you ask to discuss this at Rocq Call
|
|
I'm not sure passing the Stdlib with it is mandatory since those are breaking changes, hence why they're not already default I gather. Also, I'm waiting for the Rocq call page of next week to be created to add the topic. |
|
I think Hint Constants Opaque may not be a good idea because it will override any transparency hints from code before the import. |
I agree, I am just saying it is a good test to see what would have to change, for instance, I was not expecting the example above to fail, and I guess it probably should not ? |
|
I do think we should hold any potential set of recommended settings to at least the written standard for changing the defaults -- having tried it on a few representative developments and still endorsing it. I have prematurely adopted "recommended" settings before and it was a colossal waste of time chasing down new issues they caused/surfaced (and now that file is almost empty). In that spirit, I worry that the current Having recently learned of More personally, I find |
|
After the Rocq call today it was decided that good defaults should be actual defaults and then use the compatibility layer to preserve backwards compatibility for a time. In practice I suppose this means that none of the proposed options will become defaults and nothing will change but well, prove me wrong. 😉 |
We really should rely on the CI contract and let project authors do the porting here (and have an efficient assignee) otherwise the overlay cost will indeed be a definitive deterrent. |
|
And we should do our part of the CI contract and actually validate the defaults we push on representative users on the CI (not necessarily all of it). The deterrent is there for a reason, to prevent unfortunate "off-by-default-but-recommended" additions like primitive projections or universe polymorphism. Let's use |
|
...and trying out |
|
FWIW |
|
|
||
| *) | ||
|
|
||
| #[ export ] Set Default Goal Selector "!". |
There was a problem hiding this comment.
I would strongly oppose making this the default since it forces the use of focusing which is considered a broken feature by many users. I agree we should make progress on proof-scripts structure checking but this isn't a satisfactory solution.
There was a problem hiding this comment.
I don't understand this comment? How is it broken? To me Rocq is unusable without this option and I don't consider a Rocq script robust if it doesn't work without this option.
I think this shouldn't even be an option and should be enforced.
There was a problem hiding this comment.
mathcomp people use Set Bullet Behavior "None". so they have no way to focus
There was a problem hiding this comment.
Yes, using this flag should be paired with a different option for default goal selector. Although I still believe it's the wrong behaviour.
Technically they still have a way to focus with 1:{ }. But I agree you don't want to enforce that.
There was a problem hiding this comment.
That's the point, the current semantics of bullets is broken, for bad historical reasons.
There was a problem hiding this comment.
But isn't that only broken if you use Set Bullet Behavior "None".?
There was a problem hiding this comment.
It's not broken, you just don't like it.
There was a problem hiding this comment.
No? If you do not have any bullet behaviour, bullets are just like comments. So they are counterproductive because they give you the fake impression that they carry meaning. Sure they contain intention but that's it.
Worse, the interface then always shows you all goals, which is a nightmare. (And coq-lsp perpetuates this nightmare even when you use focusing.) You essentially get lost in the structure of the proof.
When bullets are meaningful and the default goal selector is none, then they work as they should and force you to write robust proof scripts. And structure is ensured by the system. I've used it for years, and I teach my students to use it.
There was a problem hiding this comment.
Well, it broke a large existing code base by reusing its syntax with an incompatible semantics, it's hard not to call that broken.
And again, no need to convince me that a proof script structure checking is a desirable thing.

Follow-up of Zulip discussion at: https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/Better.20default.20options
Let's keep the momentum on this good idea. I've started populating this file with an easy one. What else should go in there and is not controversial? For instance, I saw
Set Universe Polymorphism.being suggested in https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/Your.20favorite.20secret.20Coq.20option.3F, but is it already recommended for all users?