@Ali Caglayan points out that there are some problems when using Coq and Dune in newer Coq versions. I didn't check for 8.16, but for 8.15, the Dune Coq language test suite runs well, so I can't detect any problem. Can you provide a reproduction case here?
dune build
will work.
Do a dune clean
.
dune build --cache=disabled theories/UsingMyPlugin.vo
and it doesn't.
Same with this.
Which Coq version?
8.16
ok let me see
In 8.15, once you modify to the legacy names they work
I believe the crux of the problem is that the dune rules don't rely on the META file.
Oh, the problem is that Dune doesn't support that method
at all indeed
you need to use
Declare ML Module "MyPlugin".
It should be like this Declare ML Module "my_plugin:my-coq-plugin.plugin".
The new form is just not supported, the one I propose likely has a bug
So indeed we need to document that.
Yes master
works fine for me
great job by Enrico keeping the compat
Actually my PR makes it fail, but the fix is easy
Dune's test-suite works fine in master !
Provided we adapt the test cases to the new declare ML syntax
So @Ali Caglayan , does that solve your problem?
@Emilio Jesús Gallego Arias Are you running the tests correctly? dune build @test/blackbox-tests/test-cases/coq/runtest
?
Also make sure you have a more recent version of dune or else dune skips the coq tests when coq is not present
I think I'm running the tests correctly
I'm using Dune master plus Coq master
and this PR
https://github.com/ocaml/dune/pull/5776
So actually things work fine with my PR, @Ali Caglayan you have another bug in your code
the mlg should have DECLARE PLUGIN "my-coq-plugin.plugin"
Why does it work the other way?
What do you mean @Ali Caglayan ?
Emilio Jesús Gallego Arias said:
the mlg should have
DECLARE PLUGIN "my-coq-plugin.plugin"
Why?
Oh because the table that checks required plugins is using the new plugin name as index
It also worked when it was wrong so I am confused about the point of this.
not after my PR, that was a bug in old code
it was too loose
and registered the wrong name
Does it still work when you target a vo from a clean build?
then it needed the hack, now we use the findlib name all the time
yes it works for me, please test!
So migration is basically to replace the old names
and in dune we need to use the foo:pkg.foo
syntax
for now
Does it work for you ?
Looks like it
Thanks for documenting it in the mltop PR
I just learned how it works lol
I mean a couple of days ago
but it looks good to me
now we need to fix (coq.theory ...)
that'll be easy, I think we have been making things more complex than they are
but build stuff is tricky one needs a lot of discipline, specially with a system like dune which is so precise
Last updated: Oct 13 2024 at 01:02 UTC