Just opening GraphQL API in Elixir with Absinthe and realised I need Elixir 1.5.0 / OTP 20 to get the examples running. Is there an up to date version of the sample code anywhere or is there a surefire way of getting OTP 20 running on MacOSX 12.5.1
I’m using ASDF and it’s just spitting out the following and I am just staring blankly. I am not even sure I can get it running under Monterey.
The asdf_18.104.22.168 build has been deleted
Extracting source code
Building Erlang/OTP 22.214.171.124 (asdf_126.96.36.199), please wait...
You are natively building Erlang/OTP for a later version of MacOSX
than current version (12.5.1). You either need to
cross-build Erlang/OTP, or set the environment variable
MACOSX_DEPLOYMENT_TARGET to 12.5.1 (or a lower version).
make: *** No rule to make target `is_cross_configured'. Stop.
make: *** No rule to make target `all'. Stop.
Please see /Users/rl/.asdf/plugins/erlang/kerl-home/builds/asdf_188.8.131.52/otp_build_184.108.40.206.log for full details.
I got a ton of warnings, but I’m a rookie at Elixir so I’m not versed in knowing what to ignore and how to fix others yet. I’ll give another try
warning: :crypto.strong_rand_bytes/1 defined in application :crypto is used by the current application but the current application does not depend on :crypto. To fix this, you must do one of:
1. If :crypto is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs
2. If :crypto is a dependency, make sure it is listed under "def deps" in your mix.exs
3. In case you don't want to add a requirement to :crypto, you may optionally skip this warning by adding [xref: [exclude: [:crypto]]] to your "def project" in mix.exs
Invalid call found at 3 locations:
Been a while since I last saw one of these, maybe somebody else knows what to do exactly but I think you’re better off doing pt. 2 (just include it in your app and call it a day).
If something is wrong after, try mix deps.get and mix compile and let us know.
99% of everything in Erlang/Elixir is backwards compatible. There were some tremors after migrating to OTP 24 some time ago – related to removed builtin crypto functions – but I think most active libraries added conditional code and it’s fine now.
Ok, I quit. I’m just going to continue with the book and see where I actually fallover. I think I was expecting a skeleton PlateSlate application too but instead it’s an umbrella app with lots of child apps that don’t even have Absinthe as a dependency. Don’t know.
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 d_graph
drwxr-xr-x@ 8 rl staff 256 30 Aug 22:38 graph_commons
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 graph_compute
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 native_graph
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 property_graph
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 rdf_graph
drwxr-xr-x@ 7 rl staff 224 30 Aug 22:38 tinker_graph
+1 on @dimitarvp’s reply above me. Do note before installing an Erlang version you may want to check first passing variable (KERL_CONFIGURE_OPTIONS...) before installing it. Pulled my hair out from not reading the readme in full.
I have asdf installed and I use it for Node and Ruby already. I also have it set up for another project. The umbrella app included in the source file just complains about a ton of stuff I have I think my issue is that what’s in the zip file is not what I am expecting. There is no PlateSlate application in there, nor is there any sign of ecto as a dependency in there either.
One of my apps is using…
Erlang/OTP 25 [erts-13.1.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
[debug] Loading Initial Jobs from Config
[debug] Adding job
[debug] Adding job
Interactive Elixir (1.13.1) - press Ctrl+C to exit (type h() ENTER for help)
Am I going nuts. Not sure if the zip is missing stuff or am I just missing the plot.
Nope I’m working on getting more into it. Sometimes you just need to quit on one line of enquiry and try another. In the end it was my fault.
I guess the other zip was for the Exploring Graphs Beta book which is on my radar after this. Never touched GraphQL and it’s nice to see Chapter One touched on my pain points an creating RESTful APIs in Rails.