Stream: jsCoq

Topic: OPAM riddle :D


view this post on Zulip Shachar Itzhaky (Apr 30 2021 at 22:35):

Here's a mind twister: Installing deps from jscoq.opam installs js_of_ocaml-compiler.3.9.0.
Then, installing elpi.1.13.1 (for coq-elpi) causes OPAM to downgrade js_of_ocaml-compiler to 3.7.1.
Haven't been able to figure out why :confused: Can somebody help?

view this post on Zulip Emilio Jesús Gallego Arias (Apr 30 2021 at 22:37):

Trying blind: ppxlib?

view this post on Zulip Emilio Jesús Gallego Arias (Apr 30 2021 at 22:40):

Now after looking at opam, I think I won :) XD

view this post on Zulip Shachar Itzhaky (May 01 2021 at 10:11):

Yeah I was suspecting ppxlib; but can you explain why? I haven't been able to track the dep chain between ppxlib and js_of_ocaml-compiler.

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 12:31):

elpi requires ppxlib < 0.15 , however js_of_ocaml-compiler requires ppxlib >= 0.15 ; so this is why opam tries to downgrade jsoo

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 12:31):

this is due to the ppx 2.0 API

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 12:32):

eventually elpi should be updated to support ppxlib >= 0.15

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 12:33):

I think the deps are clear

view this post on Zulip Shachar Itzhaky (May 01 2021 at 13:56):

Ah yes I was looking at the deps of 3.7.1 (which opam installed ;) ) which is why I did not see the ppxlib dep.

view this post on Zulip Shachar Itzhaky (May 01 2021 at 14:07):

The weird thing is that elpi.1.11.2 is happy with ppxlib.0.15.0.

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:12):

Likely the < 0.15 constraint was added by some automatic tool

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:12):

it is common in opam world to add upper constraints when a new package break existing

view this post on Zulip Enrico Tassi (May 01 2021 at 14:13):

Is the migration path hard? If not I can give a look and make a new elpi 1.13 release

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:13):

if it works you can always use --ignore-constrains-on

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:13):

@Enrico Tassi no idea, I think it depends on what you are using

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:13):

some APIs are the same, some not

view this post on Zulip Enrico Tassi (May 01 2021 at 14:13):

I'd say nothing fancy...

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:14):

Yeah so maybe that is why old elpi works, maybe the new one is failing on something silly

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:14):

and the constraint was added after some CI failed

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:14):

yeah ppx 2.0 another pain-in-the-ass migration

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 14:14):

:joy: :joy: :joy: :joy: :joy: the joy of software development

view this post on Zulip Enrico Tassi (May 01 2021 at 14:16):

the changelog for ppxlib does not seem huge

view this post on Zulip Enrico Tassi (May 01 2021 at 14:17):

I'll give it a shot

view this post on Zulip Enrico Tassi (May 01 2021 at 14:17):

actually, if you remove the dependency on ppxlib, elpi will compile

view this post on Zulip Enrico Tassi (May 01 2021 at 14:17):

it has a local copy of the pre-processed files

view this post on Zulip Enrico Tassi (May 01 2021 at 14:18):

dune will select the copy if ppx is not available

view this post on Zulip Enrico Tassi (May 01 2021 at 14:18):

(that may be your quick fix)

view this post on Zulip Enrico Tassi (May 01 2021 at 14:18):

I've never removed the dep from the opam package, mainly to get CI tell me when things break

view this post on Zulip Enrico Tassi (May 01 2021 at 14:19):

maybe I should make it optional

view this post on Zulip Shachar Itzhaky (May 01 2021 at 14:21):

Great!

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 15:54):

By the way I was writing an elpi overlay, installed 1.13.1 ignore the ppxlib constraint and things seem fine

view this post on Zulip Emilio Jesús Gallego Arias (May 01 2021 at 15:54):

at least at compile time

view this post on Zulip Enrico Tassi (May 01 2021 at 17:45):

I think I'll make a 1.13.2 using https://github.com/LPCIC/elpi/pull/100

view this post on Zulip Enrico Tassi (May 01 2021 at 17:46):

and yes, the problem was in ppxfindcache which is only used for building

view this post on Zulip Enrico Tassi (May 01 2021 at 17:46):

that PR removes it


Last updated: Jan 30 2023 at 18:04 UTC