Skip to content

Conversation

@codinuum
Copy link
Contributor

No description provided.

depends: [
"ocaml" {>= "4.14"}
"dune" {>= "3.18"}
"cmdliner"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"cmdliner"
"cmdliner" {>= "2.0.0"}

This is missing a lower bound causing a failure during the lower bounds search:
https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/e5c850a73cee18c61dff7201a56d1bf8cbe84151/variant/compilers,4.14,diffast-git-cli.0.3.6,lower-bounds

  - downgrade cmdliner                 2.0.0 to 1.3.0            [required by diffast-git-cli]
[...]
[ERROR] The compilation of diffast-git-cli.0.3.6 failed at "dune build -p diffast-git-cli -j 71 --promote-install-files=false @install".

#=== ERROR while compiling diffast-git-cli.0.3.6 ==============================#
# context              2.5.0~alpha1 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/codinuum/diffast/archive/v0.3.6.tar.gz)
# path                 ~/.opam/4.14/.opam-switch/build/diffast-git-cli.0.3.6
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p diffast-git-cli -j 71 --promote-install-files=false @install
# exit-code            1
# env-file             ~/.opam/log/diffast-git-cli-7-bd1c2d.env
# output-file          ~/.opam/log/diffast-git-cli-7-bd1c2d.out
### output ###
# (cd _build/default/src/api/dev && /usr/bin/git describe --always --dirty) > _build/default/src/api/dev/v
# fatal: not a git repository (or any parent up to mount point /)
# Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
# (cd _build/default && /home/opam/.opam/4.14/bin/ocamlopt.opt -w -40 -O3 -I src/git/cli/.git_diffast.eobjs/byte -I src/git/cli/.git_diffast.eobjs/native -I /home/opam/.opam/4.14/lib/angstrom -I /home/opam/.opam/4.14/lib/asn1-combinators -I /home/opam/.opam/4.14/lib/astring -I /home/opam/.opam/4.14/lib/awa -I /home/opam/.opam/4.14/lib/awa-mirage -I /home/opam/.opam/4.14/lib/base64 -I /home/opam/.opam/4.14/lib/base64/rfc2045 -I /home/opam/.opam/4.14/lib/bigstringaf -I /home/opam/.opam/4.14/lib/bos -I /home/opam/.opam/4.14/lib/bytes -I /home/opam/.opam/4.14/lib/bytesrw -I /home/opam/.opam/4.14/lib/bytesrw/zlib -I /home/opam/.opam/4.14/lib/ca-certs-nss -I /home/opam/.opam/4.14/lib/camlp-streams -I /home/opam/.opam/4.14/lib/carton -I /home/opam/.opam/4.14/lib/carton-git -I /home/opam/.opam/4.14/lib/carton-lwt -I /home/opam/.opam/4.14/lib/carton/thin -I /home/opam/.opam/4.14/lib/checkseum/c -I /home/opam/.opam/4.14/lib/cmdliner -I /home/opam/.opam/4.14/lib/cryptokit -I /home/opam/.opam/4.14/lib/cstruct -I /home/opam/.opam/4.14/lib/csv -I /home/opam/.opam/4.14/lib/decompress/de -I /home/opam/.opam/4.14/lib/decompress/zl -I /home/opam/.opam/4.14/lib/diffast-api -I /home/opam/.opam/4.14/lib/diffast-core -I /home/opam/.opam/4.14/lib/diffast-git -I /home/opam/.opam/4.14/lib/diffast-misc -I /home/opam/.opam/4.14/lib/digestif/c -I /home/opam/.opam/4.14/lib/domain-name -I /home/opam/.opam/4.14/lib/duff -I /home/opam/.opam/4.14/lib/dune-private-libs/dune-section -I /home/opam/.opam/4.14/lib/dune-private-libs/meta_parser -I /home/opam/.opam/4.14/lib/dune-site -I /home/opam/.opam/4.14/lib/dune-site/dynlink -I /home/opam/.opam/4.14/lib/dune-site/plugins -I /home/opam/.opam/4.14/lib/dune-site/private -I /home/opam/.opam/4.14/lib/duration -I /home/opam/.opam/4.14/lib/emile -I /home/opam/.opam/4.14/lib/encore -I /home/opam/.opam/4.14/lib/eqaf -I /home/opam/.opam/4.14/lib/faraday -I /home/opam/.opam/4.14/lib/fmt -I /home/opam/.opam/4.14/lib/fpath -I /home/opam/.opam/4.14/lib/functoria-runtime -I /home/opam/.opam/4.14/lib/gen -I /home/opam/.opam/4.14/lib/git -I /home/opam/.opam/4.14/lib/git-mirage/http -I /home/opam/.opam/4.14/lib/git-mirage/ssh -I /home/opam/.opam/4.14/lib/git-mirage/tcp -I /home/opam/.opam/4.14/lib/git-paf -I /home/opam/.opam/4.14/lib/git-unix -I /home/opam/.opam/4.14/lib/git/loose -I /home/opam/.opam/4.14/lib/git/loose-git -I /home/opam/.opam/4.14/lib/git/nss -I /home/opam/.opam/4.14/lib/git/nss/git -I /home/opam/.opam/4.14/lib/git/nss/hkt -I /home/opam/.opam/4.14/lib/git/nss/neg -I /home/opam/.opam/4.14/lib/git/nss/pck -I /home/opam/.opam/4.14/lib/git/nss/pkt-line -I /home/opam/.opam/4.14/lib/git/nss/sigs -I /home/opam/.opam/4.14/lib/git/nss/smart -I /home/opam/.opam/4.14/lib/git/nss/smart-flow -I /home/opam/.opam/4.14/lib/git/nss/unixiz -I /home/opam/.opam/4.14/lib/gmap -I /home/opam/.opam/4.14/lib/happy-eyeballs -I /home/opam/.opam/4.14/lib/happy-eyeballs-lwt -I /home/opam/.opam/4.14/lib/happy-eyeballs-mirage -I /home/opam/.opam/4.14/lib/httpaf -I /home/opam/.opam/4.14/lib/hxd/core -I /home/opam/.opam/4.14/lib/hxd/string -I /home/opam/.opam/4.14/lib/ipaddr -I /home/opam/.opam/4.14/lib/ipaddr/unix -I /home/opam/.opam/4.14/lib/kdf/hkdf -I /home/opam/.opam/4.14/lib/kdf/pbkdf -I /home/opam/.opam/4.14/lib/ke -I /home/opam/.opam/4.14/lib/logs -I /home/opam/.opam/4.14/lib/lwt -I /home/opam/.opam/4.14/lib/lwt/unix -I /home/opam/.opam/4.14/lib/macaddr -I /home/opam/.opam/4.14/lib/markup -I /home/opam/.opam/4.14/lib/menhirLib -I /home/opam/.opam/4.14/lib/mimic -I /home/opam/.opam/4.14/lib/mimic-happy-eyeballs -I /home/opam/.opam/4.14/lib/mirage-clock -I /home/opam/.opam/4.14/lib/mirage-clock-unix -I /home/opam/.opam/4.14/lib/mirage-crypto -I /home/opam/.opam/4.14/lib/mirage-crypto-ec -I /home/opam/.opam/4.14/lib/mirage-crypto-pk -I /home/opam/.opam/4.14/lib/mirage-crypto-rng -I /home/opam/.opam/4.14/lib/mirage-device -I /home/opam/.opam/4.14/lib/mirage-flow -I /home/opam/.opam/4.14/lib/mirage-kv -I /home/opam/.opam/4.14/lib/mirage-runtime -I /home/opam/.opam/4.14/lib/mirage-time -I /home/opam/.opam/4.14/lib/mirage-unix -I /home/opam/.opam/4.14/lib/mtime -I /home/opam/.opam/4.14/lib/mtime/clock -I /home/opam/.opam/4.14/lib/ocaml/threads -I /home/opam/.opam/4.14/lib/ocamlgraph -I /home/opam/.opam/4.14/lib/ocplib-endian -I /home/opam/.opam/4.14/lib/ohex -I /home/opam/.opam/4.14/lib/optint -I /home/opam/.opam/4.14/lib/paf -I /home/opam/.opam/4.14/lib/pecu -I /home/opam/.opam/4.14/lib/psq -I /home/opam/.opam/4.14/lib/ptime -I /home/opam/.opam/4.14/lib/result -I /home/opam/.opam/4.14/lib/rresult -I /home/opam/.opam/4.14/lib/sedlex -I /home/opam/.opam/4.14/lib/seq -I /home/opam/.opam/4.14/lib/stringext -I /home/opam/.opam/4.14/lib/tcpip -I /home/opam/.opam/4.14/lib/tls -I /home/opam/.opam/4.14/lib/tls-mirage -I /home/opam/.opam/4.14/lib/uri -I /home/opam/.opam/4.14/lib/uuidm -I /home/opam/.opam/4.14/lib/uutf -I /home/opam/.opam/4.14/lib/vlt -I /home/opam/.opam/4.14/lib/x509 -I /home/opam/.opam/4.14/lib/zarith -intf-suffix .ml -no-alias-deps -o src/git/cli/.git_diffast.eobjs/native/dune__exe__Git_diffast.cmx -c -impl src/git/cli/git_diffast.pp.ml)
# File "src/git/cli/git_diffast.ml", line 161, characters 6-19:
# 161 |       Arg.Conv.make ~docv:"<path>" ~parser ~pp ()
#             ^^^^^^^^^^^^^
# Error: Unbound module Arg.Conv

and I can see Arg.Conv is a cmdliner.2.0.0 addition:
https://github.com/dbuenzli/cmdliner/blob/master/CHANGES.md#api-changes

There are however also a couple of other CI failures...

@raphael-proust
Copy link
Contributor

The windows CI has two failures:

  • zlib linking issues
  • dune crash (with the easter egg message)

no idea how to solve this.

Also not sure who to ping about them. Anyone knows?

@jmid
Copy link
Member

jmid commented Nov 19, 2025

I was about to write that the last time I saw something like this, I reported it upstream to ocaml/dune.
Then I looked up the issue ... and found it was on a previous diffast PR! 😅
ocaml/dune#12535 - Polite ping @Alizter

Copy link
Member

@jmid jmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting aside

  • an impressive list of opam-2.0 errors (a known issue, not a problem) and
  • Windows dune crashes

this should be good to merge, thanks!

@Alizter
Copy link

Alizter commented Nov 19, 2025

Dune is choking on the install layout in this case because of this part:
https://github.com/codinuum/diffast/blob/1ed0209581c3ae71f36df15f662760e97d743f56/src/cli/cli/dune#L24-L34

When creating install artifacts on Windows (cygwin and msys2) we are stripping the .exe extension. This means we get conflicting installation artifacts due to the install stanza above.

let create =
  let drop_suffix name =
    if Sys.win32
    then Option.value ~default:name (String.drop_suffix name ~suffix:".exe")
    else name
  in
  fun (context : Context.t)
    ~(local_bins : origin Appendable_list.t Filename.Map.t Memo.Lazy.t) ->
    let local_bins =
      Memo.lazy_ (fun () ->
        let+ local_bins = Memo.Lazy.force local_bins in
        Filename.Map.to_list_map local_bins ~f:(fun name sources ->
          let sources = Appendable_list.to_list sources in
          drop_suffix name, Origin sources)
        |> Filename.Map.of_list_exn)
    in
    { context; local_bins }
;;

Granted we could do a better job at validating the issue here, but I am wondering if this is the install layout that was expected? My suggestion would be to call this something like diffast_.exe or diffast0.exe so it won't conflict with the script. As far as I can tell, the script is a small wrapper around the binary anyway. Though that will have its own issues on Windows.

@codinuum
Copy link
Contributor Author

@Alizter Thank you for the suggestion. I will try renaming relevant files and lines for the next revision.

"sha256=be973fe1316a3d72672c03680305ca8a4ad947ed07a8c3eeea8380faec9e52c0"
"md5=edb85aaf77cd22aaa8f6ce3889bf241d"
]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}
available: os != "win32" # temporarily silence file clash errors on Cygwin/MSys2 MinGW

OK, thanks both!

Now that there's a reproducer and a way forward for both dune and diffast I suggest marking the latter unavailable for this release (... and perhaps the previous?) until the install stanza has been reworked in the next release.

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.

4 participants