-
Notifications
You must be signed in to change notification settings - Fork 441
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
Some options cannot be set at the command line #3403
Labels
bug
Something isn't working
Comments
Being able to set options globally for a package would be desired for a few other projects, too:
Here is an example lakefile, how I would hope one could set it's own options: Example lakefileimport Lake
open Lake DSL
-- Sample dependency. Contains:
-- register_option lean4game.verbose : Bool := {
-- defValue := false
-- descr := "display more info messages to help developing the game."
-- }
require GameServer from git "https://github.com/leanprover-community/lean4game.git" @ "v4.5.0" / "server"
-- set the option for the entire project:
package «OptionMWE» where
moreLeanArgs := #[
"-Dtactic.hygienic=false",
"-Dlean4game.verbose=false"]
moreServerOptions := #[
⟨`tactic.hygienic, false⟩,
⟨`lean4game.verbose, true⟩]
lean_lib «OptionMWE» where |
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 2, 2024
Initial options are now re-parsed and validated after importing. Cmdline option assignments prefixed with `weak.` are silently discarded if the option name without the prefix does not exist. Fixes #3403
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Description
Options that are not defined in Lean itself (or in a plugin?) cannot be set using
-D
at the command line.Context
In the discussion of std4#625, I proposed using an option to control how the
lemma
command works instead of an ad-hoc switch mechanism. This would allow users to turn on thelemma
command usingset_option
but it would also allow Mathlib to enablelemma
globally by setting it in the lakefile. Usingset_option
works fine but, since it is declared in Std and not in Lean, the option cannot be set globally from the lakefile.Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: