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

Add Gleam version #26

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add Gleam version #26

wants to merge 1 commit into from

Conversation

lpil
Copy link

@lpil lpil commented Jun 26, 2020

Also usable from other BEAM languages such as Erlang and Elixir.

Also usable from other BEAM languages such as Erlang and Elixir.
@keith-turner
Copy link
Owner

@lpil I will look at this in the next few days

@keith-turner
Copy link
Owner

@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.

@lpil
Copy link
Author

lpil commented Jul 12, 2020

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

@keith-turner
Copy link
Owner

@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

@lpil
Copy link
Author

lpil commented Jul 12, 2020

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.

@keith-turner
Copy link
Owner

@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'

@lpil
Copy link
Author

lpil commented Jul 12, 2020

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

@lpil
Copy link
Author

lpil commented Nov 12, 2020

Any joy here @keith-turner ?

@lpil
Copy link
Author

lpil commented Jan 18, 2021

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?

@lpil
Copy link
Author

lpil commented Mar 29, 2021

Hello @keith-turner , any progress here?

@keith-turner
Copy link
Owner

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.

@lpil
Copy link
Author

lpil commented Apr 6, 2021

Is running CI sufficient evidence? Alternatively are you able to run docker containers on your machine? I could provide either.

@lpil
Copy link
Author

lpil commented Apr 6, 2021

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.

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

2 participants