aantron/dream

example w-postgres is broken?

Closed this issue · 1 comments

First of all, Thank you for the awesome web framework.

I have to say, I am only an OCaml beginner.
Maybe I did something wrong but, in my eyes, it seems w-postgres is broken.

root@pop-os ~/Local/dream/example/w-postgres
 % esy i
info install 0.7.0 (using esy.json)
info checking https://github.com/ocaml/opam-repository for updates...
info checking https://github.com/esy-ocaml/esy-opam-override for updates...
info resolving esy packages: done                           
info solving esy constraints: done         
info resolving npm packages: done
.... fetching @opam/conf-libev@archive:http://dist.schmorp.de/libev/Attic/libev-4.27.tar.gz#sha1:b67aff18f6f1ffec4422e188c                                                                                                                          .... fetching esy-openssl@archive:https://www.openssl.org/source/openssl-1.1.1l.tar.gz#sha256:0b7a3e5e59c34827fe0c3a74b7ec                                                                                                                          info fetching: done                                  
.... installing @opam/conf-libev@archive:http://dist.schmorp.de/libev/Attic/libev-4.27.tar.gz#sha1:b67aff18f6f1ffec4422e18                                                                                                                          .... installing esy-openssl@archive:https://www.openssl.org/source/openssl-1.1.1l.tar.gz#sha256:0b7a3e5e59c34827fe0c3a74b7                                                                                                                          info installing: done                                            
root@pop-os ~/Local/dream/example/w-postgres
 % esy build
info esy build 0.7.0 (using esy.json)
info building @opam/logs@opam:0.7.0@46a3dffc
info building @opam/graphql-lwt@opam:0.14.0@d8dee284
info building @opam/dream-httpaf@opam:1.0.0~alpha2@3f76d4fc
info building @opam/graphql-lwt@opam:0.14.0@d8dee284: done
info building @opam/logs@opam:0.7.0@46a3dffc: done
info building @opam/multipart_form@opam:0.5.0@c3f7bba6
info building @opam/caqti@opam:1.9.0@e5055eb2
info building @opam/mirage-crypto-rng@opam:0.11.2@b3a0290a
info building @opam/mirage-crypto-rng@opam:0.11.2@b3a0290a: done
info building @opam/mirage-crypto-rng-lwt@opam:0.11.2@ec98ed6d
info building @opam/multipart_form@opam:0.5.0@c3f7bba6: done
info building @opam/multipart_form-lwt@opam:0.5.0@fd7b1bfd
info building @opam/caqti@opam:1.9.0@e5055eb2: done
info building @opam/caqti-driver-postgresql@opam:1.9.1@d35254d7
info building @opam/caqti-lwt@opam:1.9.0@05b9579d
info building @opam/mirage-crypto-rng-lwt@opam:0.11.2@ec98ed6d: done
info building @opam/multipart_form-lwt@opam:0.5.0@fd7b1bfd: done
info building @opam/caqti-lwt@opam:1.9.0@05b9579d: done
info building @opam/caqti-driver-postgresql@opam:1.9.1@d35254d7: done
info building @opam/dream-httpaf@opam:1.0.0~alpha2@3f76d4fc: done
info building @opam/dream@opam:1.0.0~alpha5@84e3f5ed
info building @opam/dream@opam:1.0.0~alpha5@84e3f5ed: done
File "postgres.eml.ml", line 8, characters 19-21:
Error: Unbound value t2
error: command failed: 'dune' 'build' '--root' '.' './postgres.exe' (exited with 1)
esy-build-package: exiting with errors above...
error: build failed with exit code: 1
  
esy: exiting due to errors above
root@pop-os ~/Local/dream/example/w-postgres

all i did esy i and esy build

also docker-comopose up also not working too.

0.594 Reading package lists...                                                                                            
1.245 Building dependency tree...                                                                                         
1.432 Reading state information...                                                                                        
1.519 E: Unable to locate package libssl1.1                                                                               
1.519 E: Couldn't find any package by glob 'libssl1.1'
1.519 E: Couldn't find any package by regex 'libssl1.1'
------
Dockerfile:25
--------------------
  23 |     
  24 |     RUN apt-get update
  25 | >>> RUN apt-get install -y libev4 libpq5 libssl1.1
  26 |     
  27 |     COPY --from=build /build/_esy/default/build/default/postgres.exe /bin/postgres
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install -y libev4 libpq5 libssl1.1" did not complete successfully: exit code: 100
ERROR: Service 'web' failed to build : Build failed

Is there anything I can do?

Thank you so much.

Thank you!

The local esy build is failing because Caqti has been upgraded, and released Dream was not yet adapted to it. However, it was adapted in #302, which has been merged into master. Could you try by cloning the latest Dream?

git clone https://github.com/aantron/dream.git --recursive

The Docker problem looks separate, will have to debug that.