Comments (6)
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.
Hi @JeffreyBenjaminBrown , for that version of the stdlib you will need Gleam v0.16.0 which has that conditional compilation syntax
from otp.
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.
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.
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.
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)
- Implement supervisor.supervisor function for starting supervisor type children HOT 2
- Unable to compile gleam_otp in a Phoenix app HOT 3
- Why HOT 1
- Seemingly outdated documentation for `untyped_send` HOT 1
- Proper error logging when actors crash HOT 4
- Feature request: Function equivalent to elixir's `Task.async_stream` HOT 7
- Bug: actor not unmonitoring finished task HOT 1
- Naming of abstractions HOT 1
- [Feature] DynamicSupervisor please HOT 8
- Documentation outdated HOT 3
- Max restart intensity defaults are reversed from Erlang HOT 1
- [Discussion] Allow `actor` to change its selector after creation HOT 6
- [Bug] Cannot not be compile after add `gleam_otp` HOT 3
- [feat] an equivalent for `gen_statem` HOT 9
- Possible Bug: `try_await_forever` letting panic through HOT 15
- Current main breaks builds of gleam-elli HOT 5
- Current status of gleam/otp/actor HOT 2
- New Feature: Registry HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otp.