-
Notifications
You must be signed in to change notification settings - Fork 641
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
Command-line setters for options #9876
Conversation
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.
I am bit wary of stuff like this because I do believe that the whole option system should rewritten instead of keep adding some more kludges such as this one that may end up being technical debt in the end. For example doing #8666 is not possible with the current system.
But if people want that I am OK with this patch. You need however:
- to add documentation,
- to check that the command handling stuff work correctly w.r.t. workers (see asynctaskqueue)
So indeed maybe @SkySkimmer if you think this shouldn't go in 8.10 then I'd suggest we chat a bit about the Options API then we go ahead to merge this. |
I don't understand.
How do I do that? |
The current API doesn't allow atomic setup of several options and that is a big problem for use cases such as the one in the PR [printing all has to become a bad hack]
Good question, there is some filtering there, so I guess you should check that the options are correclty passed to the worker processes with |
Good question, there is some filtering there, so I guess you should
check that the options are correclty passed to the worker processes with
|ps ax| or such.
no need to ps, just launching coqide with a -set caused it to die ;)
fixed now
Gaëtan Gilbert
…On 01/04/2019 14:34, Emilio Jesús Gallego Arias wrote:
I don't understand.
The current API doesn't allow atomic setup of several options and that
is a big problem for use cases such as the one in the PR [printing all
has to become a bad hack]
How do I do that?
Good question, there is some filtering there, so I guess you should
check that the options are correclty passed to the worker processes with
|ps ax| or such.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9876 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWQ7HFjuI_pNz6hg0Ccz-kASR6XWzI4ks5vcfy4gaJpZM4cVkc0>.
|
Redesigning the whole option system would be definitely welcome (if someone has ideas, please start a CEP). However, in the meantime there are lots of low-hanging fruits (and TBH the option system works better than one could expect given the heavy use that we make of it). In particular, this PR is very welcome, as are all incremental improvements until someone has a better proposal. |
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.
Preliminary review: this is looking good, I don't have any comment; I assigned to myself.
I will do in-depth review when the PR goes out of draft status.
a0252e9
to
a9049ff
Compare
Added doc. |
Can't you delay the decision on the type after parsing the option and querying for its type? I'd rather have a more uniform syntax by the way, what do you think of just:
|
I agree with you: having |
Why's appveyor complaining? And where's azure? |
a9049ff
to
20f4950
Compare
I hadn't seen @ejgallego's comment above.
That sounds like a good solution too if it's not too heavy to implement. I don't have any clear opinion on proposing integration in 8.10. |
Indeed it is more convenient for tools interacting with coqtop to expose single interface |
Like imagine for example a project configuration in coq_options:
printing all: true
unification keys: active etc... |
256c9b9
to
4e128de
Compare
In any case I'm not looking to change the semantics of v files for this PR. |
@SkySkimmer I am waiting for an answer to #9876 (comment) |
TODO coqproject handling (for now it can be done through -arg I guess)
4e128de
to
1e1fd6d
Compare
Done for bool/int options
It looks fine to me. I'm keeping -unset |
@SkySkimmer in:
|
The change is pretty trivial, I've just done it. |
|
But then |
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.
LGTM, this is ready for merge an IMHO has a benefit/risk ratio high enough as to warrant inclusion in 8.10.
Semantics of UnSet
and some other nuances with options predate this PR, it is a bit unfortunate we have to expose -unset
in the command line as it will likely lead users towards -unset Foo
instead of -set Foo=false
which is IMO by far the preferred form.
This means this PR does introduce some technical debt at the cmdline level which is one of the worst parts of the system in terms of impact. I would still prefer if we could at least discourage the use of -unset
in the documentation or restrict it somehow.
The note about improving the type of option_command
does still apply indeed; I see no reason we should not tweak it before merge.
Good point, no change then if you prefer. But for me this is indeed a warning that the shortcut Leaving a few hours more before merging so discussion can close. |
No problem in delaying this Theo if you think we should discuss more. I think the first problem is that we don't agree on the distinction between "options" and "flags", I don't see why they are different; maybe I am influenced by my current choice of cmline handling in other projects. I dunno. |
I am personally OK with the current solution; I'd have chosen myself a more "regular" solution likely, but at some point stuff like this comes down to taste, and when you write the code, you have a fair amount of power XD so I guess at least myself I'm not willing to delay this more [otherwise at some point we will just halt all development] |
Not that I am not arguing to delay the merge. I'm perfectly OK with merging now. I'm just arguing to not squeeze this feature into 8.10, which seems like the normal thing to do when discussion has revealed that things are not that simple. |
Maybe, they should not be different. But they currently are (see documentation: https://coq.github.io/doc/master/refman/proof-engine/vernacular-commands.html#flags-options-and-tables). |
Well, modulo a few nits, the current implementation seems reasonable to me; in the sense that semantics of the command line flags should match the ones of the vernaculars, is the current If so we could revert. |
I have been thinking about the milestone of this PR, and indeed it seems a bit complicated on the basis of what @Zimmi48 says:
So I dunno; I guess for me the best compromise in this case is to ship in 8.10, but declare the feature "experimental" , that is to say, 8.10 adopters should treat it like in beta / unstable, and thus only use it if they feel comfortable with having to tweak scripts in 8.11; on the other hand that'd allow us to get welcome feedback and testing. |
Sounds good to me. |
So is there some action to do on the docs then? @SkySkimmer a last nit seems whether the non-uniformity of IMVHO I'd at least add a note to the docs stating that |
Well, at least the mention of the experimental status, no? Maybe also the link from the vernac section on options to the command-line flags section.
I disagree... The doc could say that |
That's another choice; but it not so much about "human vs machine" IMHO, more about how data formats these days work, for example JSON or YAML. |
Leaving the question of the milestone and status of the PR open, IMHO no more benefit from delaying the actual merge; these issues could be addressed in additional PRs. |
Ack-by: SkySkimmer Reviewed-by: Zimmi48 Reviewed-by: ejgallego Reviewed-by: gares
Draft until documented
TODO coqproject handling (for now it can be done through -arg I guess)
Closes #9295.