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

add result to dependencies to a few packages #24853

Closed
haochenx opened this issue Nov 26, 2023 · 3 comments · Fixed by #24955
Closed

add result to dependencies to a few packages #24853

haochenx opened this issue Nov 26, 2023 · 3 comments · Fixed by #24955

Comments

@haochenx
Copy link
Member

Seems that there are some packages which should have declared a dependency to result but haven't yet building due to transitive dependency via the angstrom package. They will be broken after #24828.

The list of packages are:

bechamel-js.0.3.0 (failed: Library "result" not found.)
bechamel-js.0.4.0 (failed: Library "result" not found.)
bechamel-js.0.5.0 (failed: Library "result" not found.)

piaf.0.1.0 (failed: Library "result" not found.)

session-cohttp-async.0.4.0 (failed: Library "result" not found.)
session-cohttp-async.0.4.1 (failed: Library "result" not found.)
session-cohttp-lwt.0.4.0 (failed: Library "result" not found.)
session-cohttp-lwt.0.4.1 (failed: Library "result" not found.)
session-cookie-async.0.1.8 (failed: Library "result" not found.)
session-cookie-lwt.0.1.8 (failed: Library "result" not found.)

multipart_form.0.1.0 (failed: Library "result" not found.)
multipart_form.0.4.1 (failed: Library "result" not found.)
multipart_form.0.5.0 (failed: Library "result" not found.)

fat-filesystem.0.13.0 (failed: Library "result" not found.)

There is also an odd one that singled out, namely crunch.2.2.0 (failed: This pattern matches values of type ('a, 'b) result):

#=== ERROR while compiling crunch.2.2.0 =======================================#
# context              2.2.0~alpha3 | linux/x86_64 | ocaml-base-compiler.5.1.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.1/.opam-switch/build/crunch.2.2.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p crunch -j 31
# exit-code            1
# env-file             ~/.opam/log/crunch-7-39d1db.env
# output-file          ~/.opam/log/crunch-7-39d1db.out
### output ###
# (cd _build/default/test && ../../install/default/bin/ocaml-crunch t1 -o t1.ml)
# Generating t1.ml
# Generating t1.mli
# (cd _build/default && /home/opam/.opam/5.1/bin/ocamlc.opt -w -40 -g -bin-annot -I test/.consumer.eobjs/byte -I /home/opam/.opam/5.1/lib/bigarray-compat -I /home/opam/.opam/5.1/lib/bytes -I /home/opam/.opam/5.1/lib/cstruct -I /home/opam/.opam/5.1/lib/fmt -I /home/opam/.opam/5.1/lib/io-page -I /home/opam/.opam/5.1/lib/io-page-unix -I /home/opam/.opam/5.1/lib/lwt -I /home/opam/.opam/5.1/lib/lwt/unix -I /home/opam/.opam/5.1/lib/mirage-device -I /home/opam/.opam/5.1/lib/mirage-kv -I /home/opam/.opam/5.1/lib/mirage-kv-lwt -I /home/opam/.opam/5.1/lib/ocaml/threads -I /home/opam/.opam/5.1/lib/ocaml/unix -I /home/opam/.opam/5.1/lib/ocplib-endian -I /home/opam/.opam/5.1/lib/ocplib-endian/bigstring -no-alias-deps -o test/.consumer.eobjs/byte/consumer.cmo -c -impl test/consumer.ml)
# File "test/consumer.ml", line 10, characters 6-10:
# 10 |     | Ok s ->
#            ^^^^
# Error: This pattern matches values of type ('a, 'b) result
#        but a pattern was expected which matches values of type
#          (T1.page_aligned_buffer list, T1.error) Result.result
#        Result.result is abstract because no corresponding cmi file was found in path.
# (cd _build/default && /home/opam/.opam/5.1/bin/ocamlopt.opt -w -40 -g -I test/.consumer.eobjs/byte -I test/.consumer.eobjs/native -I /home/opam/.opam/5.1/lib/bigarray-compat -I /home/opam/.opam/5.1/lib/bytes -I /home/opam/.opam/5.1/lib/cstruct -I /home/opam/.opam/5.1/lib/fmt -I /home/opam/.opam/5.1/lib/io-page -I /home/opam/.opam/5.1/lib/io-page-unix -I /home/opam/.opam/5.1/lib/lwt -I /home/opam/.opam/5.1/lib/lwt/unix -I /home/opam/.opam/5.1/lib/mirage-device -I /home/opam/.opam/5.1/lib/mirage-kv -I /home/opam/.opam/5.1/lib/mirage-kv-lwt -I /home/opam/.opam/5.1/lib/ocaml/threads -I /home/opam/.opam/5.1/lib/ocaml/unix -I /home/opam/.opam/5.1/lib/ocplib-endian -I /home/opam/.opam/5.1/lib/ocplib-endian/bigstring -intf-suffix .ml -no-alias-deps -o test/.consumer.eobjs/native/t1.cmx -c -impl test/t1.ml)
# File "test/t1.ml", line 1:
# Error: The implementation test/t1.ml
#        does not match the interface test/.consumer.eobjs/byte/t1.cmi: 
#        Values do not match:
#          val read :
#            unit ->
#            string ->
#            int64 ->
#            int64 ->
#            (Cstruct.t list, [> `Unknown_key of string ]) result Lwt.t
#        is not included in
#          val read :
#            t ->
#            string ->
#            int64 ->
#            int64 -> (page_aligned_buffer list, error) Result.result io
#        The type
#          unit ->
#          string ->
#          int64 ->
#          int64 -> (Cstruct.t list, [> `Unknown_key of string ]) result Lwt.t
#        is not compatible with the type
#          t ->
#          string ->
#          int64 -> int64 -> (page_aligned_buffer list, error) Result.result io
#        Type (Cstruct.t list, [> `Unknown_key of string ]) result Lwt.t
#        is not compatible with type
#          (page_aligned_buffer list, error) Result.result io =
#            (page_aligned_buffer list, error) Result.result Lwt.t
#        Type (Cstruct.t list, [> `Unknown_key of string ]) result
#        is not compatible with type
#          (page_aligned_buffer list, error) Result.result
#        File "src/mirage_kv.mli", lines 46-47, characters 2-47:
#          Expected declaration
#        File "test/t1.ml", line 83, characters 4-8: Actual declaration
@mseri
Copy link
Member

mseri commented Nov 29, 2023

I suggest that we do add a bound inside result itself, as I mentioned here: #24263

@haochenx
Copy link
Member Author

will be fixed by: #24868

@mseri
Copy link
Member

mseri commented Dec 4, 2023

we probably need an upper bound on angstrom here if the transitive dependency came from there since if they don't link against the package they probably will not work also if result is installed

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 a pull request may close this issue.

2 participants