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

Parsing issues with MetaCoq #892

Open
thomas-lamiaux opened this issue Sep 9, 2024 · 9 comments
Open

Parsing issues with MetaCoq #892

thomas-lamiaux opened this issue Sep 9, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@thomas-lamiaux
Copy link
Contributor

At the moment, basically all the files in https://github.com/thomas-lamiaux/generating_recursors creates parsing issue.
I can not exactly isolate a file as it happens from time to time when I open files.

You can check out the issue by cloning the repo, doing make, and trying to check the files in the folder recursors_api.

I am using coq 8.19.2, the associated version of Equations and MetaCoq and vscoq 2.1.7.

@rtetley rtetley added the bug Something isn't working label Sep 13, 2024
@terencode
Copy link

Not sure if it is the same, but for my project, the parsing is messed up almost each time I edit something containing utf8 characters like 𝓘 or 𝒯. The only fix is to reopen vscode, which gets annoying very quickly.

@gares
Copy link
Member

gares commented Sep 24, 2024

@terencode can you please tell us which version are you on?

@terencode
Copy link

terencode commented Sep 24, 2024

@terencode can you please tell us which version are you on?

vscoq 2.2.1, coq 8.19.2

@thomas-lamiaux
Copy link
Contributor Author

see https://coq.zulipchat.com/#narrow/channel/237662-VsCoq-devs-.26-users/topic/VsCoq.20randomly.20crashes.20when.20opening.20a.20file/near/481334265 for a minimal example.
Basically it happens as soon as there is a file doing

From MetaCoq Require Import Template.All

@SkySkimmer
Copy link
Contributor

can you try with coq/coq#19864 ?

@SkySkimmer
Copy link
Contributor

This looks like a metacoq issue, they do something with an option which can modify another option
https://github.com/MetaCoq/metacoq/blob/65aa1112dc73b853e5e55b77be12aaed7c6bce15/template-coq/src/tm_util.ml#L18-L54
this is not really supported by the API

@SkySkimmer
Copy link
Contributor

SkySkimmer commented Nov 25, 2024

It doesn't even work, set_option_value ~stage:Interp (fun _ v -> v) key i sets the option to the current value
ie Set MetaCoq Template Monad Debug. does nothing

SkySkimmer added a commit to SkySkimmer/metacoq that referenced this issue Nov 25, 2024
It causes coq/vscoq#892 because `optwrite`
is not supposed to be able to add persistent objects (libobject) to
Coq's state but `set_option_value` does add one.

It's also bugged as
`set_option_value ~stage:Interp (fun _ v -> v) key i`
sets the option to its current value not a new value.
In other words `Set MetaCoq Template Monad Debug.` has no effect but
its existence causes bugs.

Since nobody complained about it not working it's not worth fixing it
instead of deleting it (also I'm not sure it can be fixed with the
currently available APIs).
@gares
Copy link
Member

gares commented Nov 26, 2024

Thanks for investigating @SkySkimmer . Should we open an issue in metacoq?

@SkySkimmer
Copy link
Contributor

MetaCoq/metacoq#1123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants