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

(hijack of) atdgen-codec-runtime, atd, atdgen-runtime, atds, atdj and atdgen (2.1.0) #15895

Closed
wants to merge 3 commits into from

Conversation

pirbo
Copy link
Contributor

@pirbo pirbo commented Feb 24, 2020

This is #15444 + the patch (edit) probably too much patches to be reasonable including

diff --git a/packages/atdgen/atdgen.2.1.0/opam b/packages/atdgen/atdgen.2.1.0/opam
index 7df47a164c..8ea9504f72 100644
--- a/packages/atdgen/atdgen.2.1.0/opam
+++ b/packages/atdgen/atdgen.2.1.0/opam
@@ -38,6 +38,7 @@ depends: [
   "atdgen-runtime" {>= "2.0.0"}
   "biniou" {>= "1.0.6"}
   "yojson" {>= "1.7.0"}
+  "atdgen-codec-runtime" {with-test}
 ]
 build: [
   ["dune" "subst"] {pinned}

in order to see if it improves the situation

CHANGES:

* Fix bug preventing generated code from compiling when using
  json adapters on recursive types.

* Improve automatic error messages shown in case of failed validation.
  Now include the validator's name or code.

* Add support for json adapters in the bucklescript backend. (ahrefs/atd#153)
@pirbo pirbo force-pushed the hijack-release-atd-2.1.0 branch from 745b87d to 003641f Compare February 24, 2020 15:09
Very clean fix would be to define a conf-scala package and put it as a dependency but this is above my will
@pirbo pirbo force-pushed the hijack-release-atd-2.1.0 branch from 003641f to 505e5b0 Compare February 24, 2020 16:00
@avsm
Copy link
Member

avsm commented Feb 26, 2020

cc @rgrinberg

@XVilka
Copy link
Contributor

XVilka commented Mar 6, 2020

Still some problems left, see e.g.:

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/4: [atdgen-codec-runtime: patch]
Processing  1/4: [atdgen-codec-runtime: dune build]
+ /home/opam/.opam/4.03/bin/dune "build" "-p" "atdgen-codec-runtime" "-j" "72" "@install" (CWD=/home/opam/.opam/4.03/.opam-switch/build/atdgen-codec-runtime.2.1.0)
-> compiled  atdgen-codec-runtime.2.1.0
-> installed atdgen-codec-runtime.2.1.0
Processing  3/4: [atdgen: patch]
Processing  3/4: [atdgen: dune subst]
+ /home/opam/.opam/4.03/bin/dune "subst" (CWD=/home/opam/.opam/4.03/.opam-switch/build/atdgen.2.1.0)
Processing  3/4: [atdgen: dune build]
+ /home/opam/.opam/4.03/bin/dune "build" "-p" "atdgen" "-j" "72" "@install" "@runtest" (CWD=/home/opam/.opam/4.03/.opam-switch/build/atdgen.2.1.0)
- test_atdgen_main alias atdgen/test/runtest (got signal SEGV)
- (cd _build/default/atdgen/test && ./test_atdgen_main.exe)
[ERROR] The compilation of atdgen failed at "/home/opam/.opam/4.03/bin/dune build -p atdgen -j 72 @install @runtest".

#=== ERROR while compiling atdgen.2.1.0 =======================================#
# context              2.0.6 | linux/x86_64 | ocaml-base-compiler.4.03.0 | pinned(https://github.com/ahrefs/atd/releases/download/2.1.0/atd-2.1.0.tbz)
# path                 ~/.opam/4.03/.opam-switch/build/atdgen.2.1.0
# command              ~/.opam/4.03/bin/dune build -p atdgen -j 72 @install @runtest
# exit-code            1
# env-file             ~/.opam/log/atdgen-29-ca91c7.env
# output-file          ~/.opam/log/atdgen-29-ca91c7.out
### output ###
# test_atdgen_main alias atdgen/test/runtest (got signal SEGV)
# (cd _build/default/atdgen/test && ./test_atdgen_main.exe)



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build atdgen 2.1.0
+- 
+- The following changes have been performed
| - install atdgen-codec-runtime 2.1.0
+- 
# Run eval $(opam env) to update the current shell environment

Also it tries to compile atdj-2.0.0 with atgen-2.1.0, which produces the error:

+ /home/opam/.opam/4.10/bin/jbuilder "build" "-p" "atdj" "-j" "72" (CWD=/home/opam/.opam/4.10/.opam-switch/build/atdj.2.0.0)
-       ocamlc atdj/src/.atdj_main.eobjs/atdj_util.{cmi,cmo,cmt} (exit 2)
- (cd _build/default && /home/opam/.opam/4.10/bin/ocamlc.opt -w -40 -w -27 -safe-string -g -bin-annot -I atdj/src/.atdj_main.eobjs -I /home/opam/.opam/4.10/lib/atd -I /home/opam/.opam/4.10/lib/easy-format -I /home/opam/.opam/4.10/lib/re -I /home/opam/.opam/4.10/lib/seq -no-alias-deps -o atdj/src/.atdj_main.eobjs/atdj_util.cmo -c -impl atdj/src/atdj_util.ml)
- File "atdj/src/atdj_util.ml", line 29, characters 26-27:
- 29 |               norm_ty env x
-                                ^
- Error: This expression has type Atd.Ast.type_expr option
-        but an expression was expected of type Atd.Ast.type_expr
[ERROR] The compilation of atdj failed at "/home/opam/.opam/4.10/bin/jbuilder build -p atdj -j 72".

#=== ERROR while compiling atdj.2.0.0 =========================================#
# context              2.0.6 | linux/x86_64 | ocaml-base-compiler.4.10.0 | file:///home/opam/opam-repository
# path                 ~/.opam/4.10/.opam-switch/build/atdj.2.0.0
# command              ~/.opam/4.10/bin/jbuilder build -p atdj -j 72
# exit-code            1
# env-file             ~/.opam/log/atdj-25-b36dbe.env
# output-file          ~/.opam/log/atdj-25-b36dbe.out
### output ###
#       ocamlc atdj/src/.atdj_main.eobjs/atdj_util.{cmi,cmo,cmt} (exit 2)
# (cd _build/default && /home/opam/.opam/4.10/bin/ocamlc.opt -w -40 -w -27 -safe-string -g -bin-annot -I atdj/src/.atdj_main.eobjs -I /home/opam/.opam/4.10/lib/atd -I /home/opam/.opam/4.10/lib/easy-format -I /home/opam/.opam/4.10/lib/re -I /home/opam/.opam/4.10/lib/seq -no-alias-deps -o atdj/src/.atdj_main.eobjs/atdj_util.cmo -c -impl atdj/src/atdj_util.ml)
# File "atdj/src/atdj_util.ml", line 29, characters 26-27:
# 29 |               norm_ty env x
#                                ^
# Error: This expression has type Atd.Ast.type_expr option
#        but an expression was expected of type Atd.Ast.type_expr

It might require adjusting some version requirements.

@rgrinberg
Copy link
Member

@pirbo let's not add any patches to the release. If there's a change you'd like to apply, just make an upstream PR and we'll sort it out.

@rgrinberg rgrinberg closed this Mar 7, 2020
@pirbo
Copy link
Contributor Author

pirbo commented Mar 8, 2020

I don't understand. All the patches I've introduced here were
1/ strictly to make the package compile, no new stuff
2/ submitted (and merged) upstream.
but we still need versions 2.1.0 to reach the repository somehow, unless you're planning to skip it and do some 2.1.1 /2.2.0 soon...

@rgrinberg
Copy link
Member

rgrinberg commented Mar 9, 2020

It's quite confusing for people when an upstream tag doesn't match the contents of a package in opam. It should be avoided as much as possible.

but we still need versions 2.1.0 to reach the repository somehow, unless you're planning to skip it and do some 2.1.1 /2.2.0 soon...

The plan is to release 2.1.1 (2.2.0 actually).

@XVilka
Copy link
Contributor

XVilka commented Mar 30, 2020

@pirbo did you have any luck with upstreaming this? The plain 2.2.0 release PR didn't work out, seems more fixes required.

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.

4 participants