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

Constraints decompress to use re.1.7.1 #11619

Merged
merged 14 commits into from
Mar 22, 2018
Merged

Conversation

dinosaure
Copy link
Contributor

It seems than re breaks compatibility.

@rgrinberg
Copy link
Member

Note that it's only because decompress builds with deprecation warnings as errors. This is ill-advised...

@camelus
Copy link
Contributor

camelus commented Mar 20, 2018

✅ All lint checks passed 91d564b
  • These packages passed lint tests: decompress.0.3, decompress.0.4, decompress.0.5, decompress.0.6, decompress.0.7

✅ Installability check (8507 → 8507)

@@ -33,7 +33,7 @@ depends: [
"ocamlfind" {build}
"base-bytes"
"alcotest" {test}
"re" {test}
"re" {test & = "1.7.1}
Copy link
Member

Choose a reason for hiding this comment

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

you're missing a " here at the end of 1.7.1

@dinosaure
Copy link
Contributor Author

@rgrinberg yeah but it's better to change opam file (on constraints) than *.tbz and checksum (just to change a _tags file) IMHO. I will change this behavior at the next release.

@hannesm
Copy link
Member

hannesm commented Mar 21, 2018

travis fails with the following issue:

[ERROR] Bad checksum for
        /home/travis/.opam/packages.dev/decompress.0.3/0.3.tar.gz:
          - e35c92aea4b3135e4b07bc75f0afb84c [expected result]
          - d7b0d5518b2bac2d1f529cd2717f6cb4 [actual result]
        This may be fixed by running `opam update`.

the CI has more checksum issues:

[ERROR] Bad checksum for
        /home/opam/.opam/packages.dev/decompress.0.4/0.4.tar.gz:
          - 32f4db760f033d1fcd139eb327d70a64 [expected result]
          - 6f4d14f6f9360ad8a0cc6e5e639c3302 [actual result]
        This may be fixed by running `opam update`.
[ERROR] Bad checksum for
        /home/opam/.opam/packages.dev/decompress.0.5/0.5.tar.gz:
          - 7bc7cd1fc1090f6d15114fdfe11e557d [expected result]
          - dc06817be812a9b671105b0a49990794 [actual result]
        This may be fixed by running `opam update`.

@dinosaure
Copy link
Contributor Author

Hmmhmm, I can an explanation about mismatch hash for decompress.0.5 but it's really weird about decompress.0.4 and decompress.0.3.

@dinosaure
Copy link
Contributor Author

It seems than GitHub has changed the way to generate their release archives (cf. this issue), it could be better to not use GitHub then ...

@rgrinberg
Copy link
Member

This issue is well known at this point. If you use topkg, you'll upload your own archives to github whose checksums will not change. So you'll avoid this problem. Perhaps you didn't use topkg for these old releases?

@dinosaure
Copy link
Contributor Author

Ah ok, so about decompress.0.3 and decompress.0.4, I used oasis ...

@dinosaure
Copy link
Contributor Author

Ok, so I really don't like to change checksum on packages but it's needed in this case. I uploaded *.tbz archives on GitHub (like what topkg do), did a diff between what people download before and what I packaged and update url file to point to these packages.

@kit-ty-kate
Copy link
Member

There is yet another failure (sorry):

#=== ERROR while installing decompress.0.3 ====================================#
# opam-version 1.2.2
# os           linux
# command      make test
# path         /home/travis/.opam/4.06.1/build/decompress.0.3
# compiler     4.06.1
# exit-code    2
# env-file     /home/travis/.opam/4.06.1/build/decompress.0.3/decompress-16689-6a9ed5.env
# stdout-file  /home/travis/.opam/4.06.1/build/decompress.0.3/decompress-16689-6a9ed5.out
# stderr-file  /home/travis/.opam/4.06.1/build/decompress.0.3/decompress-16689-6a9ed5.err
### stdout ###
# [...]
# Configuration "true: quiet, debug, tests", line 1, characters 20-25:
# Warning: the tag "tests" is not used in any flag or dependency declaration, so it will have no effect; it may be a typo. Otherwise you can use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
# /home/travis/.opam/4.06.1/bin/ocamlfind ocamlopt -shared -I lib lib/decompress.cmxa lib/decompress_common.cmx lib/decompress_adler32.cmx lib/decompress_heap.cmx lib/decompress_lz77.cmx lib/decompress_tree.cmx lib/decompress_deflate.cmx lib/decompress_huffman.cmx lib/decompress_window.cmx lib/decompress_inflate.cmx lib/decompress.cmx -o lib/decompress.cmxs
# /home/travis/.opam/4.06.1/bin/ocamlfind ocamldep -package re.str -package cstruct -package camlzip -package alcotest -modules lib_test/decompress_test.ml > lib_test/decompress_test.ml.depends
# /home/travis/.opam/4.06.1/bin/ocamlfind ocamlc -c -g -annot -bin-annot -safe-string -I lib -package re.str -package cstruct -package camlzip -package alcotest -I lib_test -I lib -o lib_test/decompress_test.cmo lib_test/decompress_test.ml
# + /home/travis/.opam/4.06.1/bin/ocamlfind ocamlc -c -g -annot -bin-annot -safe-string -I lib -package re.str -package cstruct -package camlzip -package alcotest -I lib_test -I lib -o lib_test/decompress_test.cmo lib_test/decompress_test.ml
# File "lib_test/decompress_test.ml", line 106, characters 50-53:
# Error: This expression has type string but an expression was expected of type
#          bytes
# Command exited with code 2.
### stderr ###
# [...]
# Warning 3: deprecated: String.uncapitalize
# Use String.uncapitalize_ascii instead.
# File "setup.ml", line 5847, characters 11-28:
# Warning 3: deprecated: String.capitalize
# Use String.capitalize_ascii instead.
# File "setup.ml", line 5848, characters 11-30:
# Warning 3: deprecated: String.uncapitalize
# Use String.uncapitalize_ascii instead.
# E: Failure("Command ''/home/travis/.opam/4.06.1/bin/ocamlbuild' lib/decompress.cma lib/decompress.cmxa lib/decompress.a lib/decompress.cmxs bin/dpipe.native lib_test/decompress_test.native -use-ocamlfind -tag debug -tag tests' terminated with error code 10")
# make: *** [build] Error 1

@hannesm
Copy link
Member

hannesm commented Mar 22, 2018

there are still some issues:
OCaml 4.02 (see https://travis-ci.org/ocaml/opam-repository/jobs/356605808) trying to build decompress.0.3:

# + /home/travis/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -safe-string -I lib -package re.str -package cstruct -package camlzip -package alcotest -I lib_test -I lib -o lib_test/decompress_test.cmo lib_test/decompress_test.ml
# File "lib_test/decompress_test.ml", line 106, characters 50-53:
# Error: This expression has type string but an expression was expected of type
#          Bytes.t = bytes
# Command exited with code 2.

OCaml 4.06 (see https://travis-ci.org/ocaml/opam-repository/jobs/356605803) trying to build decompress.0.5:

# + ocamlfind ocamlc -c -g -bin-annot -safe-string -package re.str -package camlzip -package alcotest -warn-error +1..49 -w A-4-41-44 -I test -I lib -o test/test.cmo test/test.ml
# File "test/test.ml", line 31, characters 10-34:
# Error (warning 3): deprecated: Bigarray.Array1.map_file
# Use [array1_of_genarray (Unix.map_file ...)] instead.
# Note that Bigarray.Array1.map_file raises Sys_error while
# Unix.map_file raises Unix_error.
# Command exited with code 2.

@dinosaure
Copy link
Contributor Author

Ok, the nightmare will be done soon. Currently, decompress.0.7 is the only version available on 4.06.0 (and you should use only this version - others versions had bugs). However, from what Travis said, tests of decompress.0.7 does not compile (because it uses Bigarray.Array1.map_file) - of course, it compiles without tests.

The plan is to not cut now decompress.0.7 and constraint it to compile only on < ocaml.4.06.0 (some projects like ocaml-git use this version). However, with some talks with @cfcs, it could be necessary to make a new release of decompress to improve API.

The idea, is to let (for a little time) decompress.0.7 available in any version of the compiler, prepare a new release of decompress (with the new API) and constraint decompress.0.7 and make new release at the same time. So if Travis is not happy, it's normal. Sorry for the noise ...

@hannesm
Copy link
Member

hannesm commented Mar 22, 2018

@dinosaure since only the tests are not working in decompress.0.7 with OCaml.4.06.*, you can as well remove the build-test section from the decompress 0.7 opam file in the opam-repository... then the CI will not complain as it won't attempt to build the tests!

@dinosaure
Copy link
Contributor Author

Good solutions, thanks 👍 !

@kit-ty-kate
Copy link
Member

Looks good enough. build-test have to be remove in decompress.0.4 as well but I'll do it an other PR, the CI is too slow and I want to move on right now.

Thanks !

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.

None yet

5 participants