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

Constrain old sail versions to omd<1.4 #14

Open
wants to merge 1 commit into
base: opam2
Choose a base branch
from

Conversation

SamB
Copy link

@SamB SamB commented Feb 10, 2022

As you probably know, leaving it unconstrained can result in opam trying
to build sail with omd 2.0.0~alpha2, which ends up producing an error something
like:

File "latex.ml", line 226, characters 6-21:
226 |     | Paragraph elems ->
            ^^^^^^^^^^^^^^^
Error: The constructor Paragraph expects 2 argument(s),
       but is applied here to 1 argument(s)

... due to omd 2's revamp of the
AST (ocaml/omd#234).

Anyway, it turns out that opam can still end up picking sail 0.13 and
earlier, which (unlike version 0.14) don't yet have this constraint, and
so still fail fail to build in this manner.

I'm not really sure why sail 0.14 chose the constraint "omd<1.4", but in
the interest of monotonicity, I elected to apply the same one retroactively:

opam admin add-constraint 'omd<1.4'

It may seem alarming to update existing packages in this way, but
apparently this is the state-of-the-art in opam repository
administration at the moment. (Meaning: nobody's managed to figure out
how to avoid needing to do it.)

Apparently, nothing too terrible happens as long as you restrict such
changes to tightening up version constraints, and don't do so in ways
that would prevent something that worked before from working now. Since
this change only excludes two versions of omd that currently
exist (2.0.0alpha1 and 2.0.0alpha2), which as we've seen don't work
for sail, we should be fine.

As you probably know, leaving it unconstrained can result in opam trying
to build sail with omd 2.0.0~alpha2, which ends up producing an error something
like:

```
File "latex.ml", line 226, characters 6-21:
226 |     | Paragraph elems ->
            ^^^^^^^^^^^^^^^
Error: The constructor Paragraph expects 2 argument(s),
       but is applied here to 1 argument(s)
```

... due to omd 2's revamp of the
AST (<ocaml/omd#234>).

Anyway, it turns out that opam can still end up picking sail 0.13 and
earlier, which (unlike version 0.14) don't yet have this constraint, and
so still fail fail to build in this manner.

I'm not really sure why sail 0.14 chose the constraint "omd<1.4", but in
the interest of monotonicity, I elected to apply the same one retroactively:

``` sh
opam admin add-constraint 'omd<1.4'
```

It may seem alarming to update existing packages in this way, but
apparently this is the state-of-the-art in opam repository
administration at the moment. (Meaning: nobody's managed to figure out
how to avoid needing to do it.)

Apparently, nothing too terrible happens as long as you restrict such
changes to tightening up version constraints, and don't do so in ways
that would prevent something that worked before from working now. Since
this change only excludes two versions of omd that currently
exist (2.0.0~alpha1 and 2.0.0~alpha2), which as we've seen don't work
for sail, we should be fine.
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

Successfully merging this pull request may close these issues.

1 participant