ecoji
ecoji copied to clipboard
Add Gleam version
Also usable from other BEAM languages such as Erlang and Elixir.
@lpil I will look at this in the next few days
@lpil I tried building this and saw the following. I downloaded gleam-v0.10.0-linux-amd64.tar.gz from the github releases page.
$ gleam build
error: Unknown import
┌─ /home/AzureUser/git/ecoji/src/ecoji.gleam:2:8
│
2 │ import gleam/bit_builder.{BitBuilder}
│ ^^^^^^^^^^^^^^^^^ did you mean `ecoji/table`?
The module `ecoji` is trying to import the module `gleam/bit_builder`,
but it cannot be found.
Hi Keith! You'll need to use the rebar3 build tool to compile the project rather than using the raw compiler. If you have it installed running rebar3 eunit
will run the tests and rebar3 shell
will run an Erlang shell for the project.
There's language installation instructions on the website: https://gleam.run/getting-started/index.html
@lpil now I see the following error (I know nothing about erlang)
$ rebar3 shell
===> Verifying dependencies...
Compiling gleam/bitwise
Compiling gleam/function
Compiling gleam/string_builder
Compiling gleam/bit_string
Compiling gleam/order
Compiling gleam/bool
Compiling gleam/pair
Compiling gleam/io
Compiling gleam/option
Compiling gleam/regex
Compiling gleam/bit_builder
Compiling gleam/result
Compiling gleam/int
Compiling gleam/list
Compiling gleam/queue
Compiling gleam/map
Compiling gleam/set
Compiling gleam/should
Compiling gleam/float
Compiling gleam/iterator
Compiling gleam/atom
Compiling gleam/dynamic
Compiling gleam/string
Compiling gleam/base
Compiling ecoji/table
Compiling gleam/os
Compiling ecoji
Compiling ecoji_test
Compiling gleam/uri
Done!
===> Compiling gleam_stdlib
===> Compiling _build/default/lib/gleam_stdlib/src/gleam_stdlib.erl failed
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:2: can't find include lib "eunit/include/eunit.hrl"; Make sure eunit is in your app file's 'applications' list
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:16: undefined macro 'assertEqual/2'
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:17: undefined macro 'assertNotEqual/2'
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:18: undefined macro 'assertMatch/2'
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:19: undefined macro 'assertMatch/2'
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:4: function should_be_error/1 undefined
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:4: function should_be_ok/1 undefined
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:4: function should_equal/2 undefined
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:4: function should_not_equal/2 undefined
It looks like your Erlang installation is missing the eunit libraries. If you've installed Erlang using your operating system package manager there may be additional packages that need to be installed to be ready for development.
@lpil I am trying to run this on Ubuntu 18.04. I got a bit further after reading your comment I looked for other things to install and found apt install erlang-dev
. Still can not get to the point of running. Seeing the following error.
$ rebar3 shell
===> Verifying dependencies...
Compiling gleam/bitwise
Compiling gleam/function
Compiling gleam/string_builder
Compiling gleam/bit_string
Compiling gleam/order
Compiling gleam/bool
Compiling gleam/pair
Compiling gleam/io
Compiling gleam/option
Compiling gleam/regex
Compiling gleam/bit_builder
Compiling gleam/result
Compiling gleam/int
Compiling gleam/list
Compiling gleam/map
Compiling gleam/queue
Compiling gleam/set
Compiling gleam/should
Compiling gleam/float
Compiling gleam/iterator
Compiling gleam/atom
Compiling gleam/dynamic
Compiling gleam/string
Compiling ecoji/table
Compiling gleam/base
Compiling ecoji
Compiling ecoji_test
Compiling gleam/os
Compiling gleam/uri
Done!
===> Compiling gleam_stdlib
===> Compiling _build/default/lib/gleam_stdlib/src/gleam_stdlib.erl failed
_build/default/lib/gleam_stdlib/src/gleam_stdlib.erl:none: undefined parse transform 'eunit_autoexport'
That's another eunit related library that is missing. I'm afraid I don't know what packages would be required, I typically build Erlang from source
Any joy here @keith-turner ?
Hi @keith-turner , can we merge this? Perhaps the tests running on CI could be evidence of it working? Or we could test inside a docker container?
Hello @keith-turner , any progress here?
Hello @keith-turner , any progress here?
@lpil no I have never tried to build and run it again since when I was unable to run it before.
Is running CI sufficient evidence? Alternatively are you able to run docker containers on your machine? I could provide either.
A third option is that if you install Erlang using the .deb supplied by Erlang Solutions that will have all the libraries required.
Forth there seems to be an erlang-eunit package on Ubuntu, though I can't vouch for the suitability.