Skip to content

Conversation

Ckaf
Copy link
Contributor

@Ckaf Ckaf commented Sep 13, 2025

No description provided.

@Ckaf Ckaf force-pushed the pgn-parser-1.0.2 branch 2 times, most recently from 3b974b3 to baca9d5 Compare September 13, 2025 18:52
@Ckaf
Copy link
Contributor Author

Ckaf commented Sep 13, 2025

I think I specified the checksum correctly, what could be the problem?

@jmid
Copy link
Contributor

jmid commented Sep 13, 2025

AFAICS, you've specified the wrong checksum:

$ wget https://github.com/Ckaf/pgn_parser/archive/v1.0.2.tar.gz
[...]
$  sha256sum v1.0.2.tar.gz 
d84c375f6acec42c8c3a64a05f6942e9c0289a8fd367a52f11099c866d9b1e22  v1.0.2.tar.gz

which differs from 78e455b3d4446e9cd8c191b78cb83a7edbc526894eb917ef0555346c1e5c7f86

@jmid
Copy link
Contributor

jmid commented Sep 14, 2025

There's progress: Now I see a bunch of lower-bounds failures:
chess_com_api.1.0.2 and pgn_parser.1.0.0 together fails with

#=== ERROR while compiling chess_com_api.1.0.2 ================================#
# context              2.4.1 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/Ckaf/pgn_parser/archive/v1.0.2.tar.gz)
# path                 ~/.opam/4.14/.opam-switch/build/chess_com_api.1.0.2
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p chess_com_api -j 255 @install
# exit-code            1
# env-file             ~/.opam/log/chess_com_api-7-38833e.env
# output-file          ~/.opam/log/chess_com_api-7-38833e.out
### output ###
# File "test/dune", line 42, characters 12-22:
# 42 |  (libraries pgn_parser chess_com_api lwt lwt.unix)
#                  ^^^^^^^^^^
# Error: Library "pgn_parser" not found.
# -> required by _build/default/test/test_chess_com_api.exe
# -> required by _build/install/default/bin/test_chess_com_api
# -> required by _build/default/chess_com_api.install
# -> required by alias install
[...]

Similarly lichess_api.1.0.2 and pgn_parser.1.0.0 together fails with

#=== ERROR while compiling lichess_api.1.0.2 ==================================#
# context              2.4.1 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/Ckaf/pgn_parser/archive/v1.0.2.tar.gz)
# path                 ~/.opam/4.14/.opam-switch/build/lichess_api.1.0.2
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p lichess_api -j 71 @install
# exit-code            1
# env-file             ~/.opam/log/lichess_api-7-fc0742.env
# output-file          ~/.opam/log/lichess_api-7-fc0742.out
### output ###
# File "test/dune", line 36, characters 12-22:
# 36 |  (libraries pgn_parser lichess_api)
#                  ^^^^^^^^^^
# Error: Library "pgn_parser" not found.
# -> required by _build/default/test/test_integration.exe
# -> required by _build/install/default/bin/test_integration
# -> required by _build/default/lichess_api.install
# -> required by alias install
[,,,]

These kinds of cross-package incompatibilities are a source of red CI lights and time-consuming missing constraint hunting (both for you - and for opam-repo maintainers).
Since you are publishing 3 packages from the same repo - and from the same source tar-ball, I would recommend adding lock-step constraints, so that

  • chess_com_api.1.0.2 works with lichess_api.1.0.2 and pgn_parser.1.0.2
  • chess_com_api.1.0.3 works with lichess_api.1.0.3 and pgn_parser.1.0.3
  • etc.

The lock-step constraints can be expressed with the version variable in an opam file as follows:

  "pgn_parser" {= version}

In a dune-project file you would need to prefix the version variable with a colon:

  (pgn_parser (= :version))

See also the first exception listed in https://github.com/ocaml/opam-repository/tree/master/governance/policies#5-strict-dependency-constraints-should-be-avoided---or-preventive-upper-bounds

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

Successfully merging this pull request may close these issues.

2 participants