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

Some vscoq.args are ignored? #1003

Open
mattam82 opened this issue Jan 23, 2025 · 3 comments
Open

Some vscoq.args are ignored? #1003

mattam82 opened this issue Jan 23, 2025 · 3 comments

Comments

@mattam82
Copy link
Member

It seems if I pass "-allow-rewrite-rules" through vscoq.args it is ignored, while having -arg -allow-rewrite-rules in a _CoqProject file works fine. I'm wondering if it is not linked to this: https://github.com/coq/coq/pull/19757/files#diff-596e8c750c790c5bcbf5425f7607226dc6742b60544601b3d5e876b329858bd4L408 @SkySkimmer @rtetley ?

@SkySkimmer
Copy link
Contributor

I don't know what that link means, that line isn't even changed in the diff

@SkySkimmer
Copy link
Contributor

It's probably rather related to #945

@SkySkimmer
Copy link
Contributor

I guess around

let parse_args args =
let usage = {
Boot.Usage.executable_name = "";
extra_args = "";
extra_options = "";
} in
fst @@ Coqargs.parse_args ~init:Coqargs.default ~usage args
[%%else]
let parse_args args =
fst @@ Coqargs.parse_args ~init:Coqargs.default args
[%%endif]
let open_new_document uri text =
let vst = get_init_state () in
let local_args =
let fname = DocumentUri.to_path uri in
let dir = Filename.dirname fname in
match CoqProject_file.find_project_file ~from:dir ~projfile_name:"_CoqProject" with
| None ->
log (Printf.sprintf "No project file found for %s" fname);
Coqargs.default
| Some f ->
let project = CoqProject_file.read_project_file ~warning_fn:(fun _ -> ()) f in
let args = CoqProject_file.coqtop_args_from_project project in
log (Printf.sprintf "Arguments from project file %s: %s" f (String.concat " " args));
parse_args args
we need to insert the Sys.argv arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants