Giter Site home page Giter Site logo

Comments (6)

JeffreyBenjaminBrown avatar JeffreyBenjaminBrown commented on May 10, 2024 1

No worries! I eventually got it working.

I've submitted a pull request that adds some introductory material to the README so that future users have an easier time.

from otp.

lpil avatar lpil commented on May 10, 2024

Hi @JeffreyBenjaminBrown , for that version of the stdlib you will need Gleam v0.16.0 which has that conditional compilation syntax

from otp.

JeffreyBenjaminBrown avatar JeffreyBenjaminBrown commented on May 10, 2024

Thanks for responding so fast, @lpil.

I upgraded to Gleam 16.1 and I'm still getting that error:

jeff@jbb-dell:otp-clone$ gleam --version
gleam 0.16.1

jeff@jbb-dell:otp-clone$ rebar3 --version
rebar 3.17.0 on Erlang/OTP 24 Erts 12.0.4

jeff@jbb-dell:otp-clone$ rebar3 shell
===> Verifying dependencies...

error: Syntax error
   ┌─ /home/jeff/code/concurrent-langs/gleam/by-others/otp-clone/_build/default/lib/gleam_stdlib/src/gleam/int.gleam:34:1
   │
34 │ if erlang {
   │ ^^ I was not expecting this.

Expected one of: An import, const, type, or function.

===> Unable to compile Gleam project

from otp.

lpil avatar lpil commented on May 10, 2024

Apologies, I got my versions mixed up. v0.17.0-rc1 is required. If you wish to wait until v0.17.0 is released in the next week or so then the previous version of the stdlib can be used.

from otp.

JeffreyBenjaminBrown avatar JeffreyBenjaminBrown commented on May 10, 2024

Thanks again! How?

Editing rebar.config to specify version 0.16 instead of 0.17 doesn't seem to do it -- it still downloads stdlib 0.17:

jeff@jbb-dell:otp$ rm _build/ -rf
jeff@jbb-dell:otp$ git --no-pager diff
diff --git a/rebar.config b/rebar.config
index 81b4670..bc0db09 100644
--- a/rebar.config
+++ b/rebar.config
@@ -8,6 +8,6 @@
 {project_plugins, [rebar_gleam]}.

 {deps, [
-    {gleam_stdlib, "~> 0.17"},
+    {gleam_stdlib, "~ 0.16"},
     {gleam_erlang, "~> 0.1"}
 ]}.
jeff@jbb-dell:otp$ rebar3 shell
===> Fetching rebar_gleam v0.1.0
===> Analyzing applications...
===> Compiling rebar_gleam
===> Verifying dependencies...
===> Fetching gleam_erlang v0.1.0
===> Fetching gleam_stdlib v0.17.0

error: Syntax error
   ┌─ /home/jeff/code/concurrent-langs/gleam/by-others/otp/_build/default/lib/gleam_stdlib/src/gleam/int.gleam:34:1
   │
34 │ if erlang {
   │ ^^ I was not expecting this.

Expected one of: An import, const, type, or function.

===> Unable to compile Gleam project
jeff@jbb-dell:otp$

I've tried spelling that in each of the following ways:

{gleam_stdlib, "0.16"},
{gleam_stdlib, "~ 0.16"},
{gleam_stdlib, "~< 0.16"},
{gleam_stdlib, "<~ 0.16"},
{gleam_stdlib, "= 0.16"},

all with the same outcome.

I'd upgrade to v17rc1 but I'm on NixOS and I still don't understand how to create my own packages.

from otp.

lpil avatar lpil commented on May 10, 2024

If you've a rebar.lock file I believe it'll use those versions over what is in the config, so you may wish to unlock that dep or delete the lock file entirely.

Sorry about the awkward UX here, we will be replacing rebar with a tool of our own design in the near future.

from otp.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.