Closed DestyNova closed 1 year ago
Thanks. There should be lots of other files for the links package installed by opam besides executables, such as examples and library files. So something is clearly wrong.
The code/configuration that does this is in the dune/dune-project files and there is nothing version-specific in these that I can see. So it may be this is a bug in dune and/or ocaml 5.
We just ran into this exact issue ourselves. Sorry for the long delay in looking into this. The problem is that changes were made to make Links compatible with OCaml 5.0 but version 0.9.7 predated these changes, and we did not constrain the opam metadata for older versions o flinks to require Ocaml < 5.0 (and we should). The next release will incorporate these changes, but for the moment all you can do if you want ot run links using OPAM is downgrade to OCaml 4.14.1 and reinstall. You can also check out the repository and build against ocaml 5.0 manually.
We aren't sure why the install silent;y fails/thinks it succeeded - if you use --verbose you can see that the build is failing due to a referene to a function library that went away between OCaml 4.14.1 and 5.0.
Thanks @jamescheney -- on a side note, do you have any plans to experiment with a WebAssembly backend rather than JS? In my brief tests the JS output was really big, like 5 MB, so I was thinking WebAssembly could help reduce load time (esp. on mobile devices). (*I say this without knowing almost anything about it.)
Not me personally, but I think this is on @dhil and/or @slindley's todo list. The javascript code generation is also pretty naive - currently little is done to pare down to just the library functions that a given program actually needs/uses, for example.
currently little is done to pare down to just the library functions that a given program actually needs/uses, for example.
Ah, makes sense. Maybe we could implement some tree shaking later and get some good results.
Indeed this is a longstanding issue #235
I've opened the PR on ocaml/opam-repository#24332 to address the silent installation failure issue on OCaml 5. Note that once merged, it will be impossible to install Links from OPAM with OCaml 5. To rectify this situation I will do a separate release which will be compatible with OCaml 5.
The PR has been merged. I will consider this issue fixed.
Hello, I followed the install instructions with opam 2.1.4 and Ocaml 5.0.0.
I ran this command:
This completed without error and installed
links-sqlite3
in$OPAM_SWITCH_PREFIX/lib
. However, it didn't add alinx
executable to$OPAM_SWITCH_PREFIX/bin
. When I check the installed package files, there's no output:However, under Ocaml 4.14.1,
linx
is produced and seems to work. There seems to be some breaking change in 5.0.0 wherebylinx
installation silently goes wrong.