Git Product home page Git Product logo

Comments (6)

talentdeficit avatar talentdeficit commented on August 23, 2024

what version of erlang did you try this under? specifically, what's the output of erlang:system_info(otp_release)?

from jsx.

 avatar commented on August 23, 2024

"17" of course.
I also just tried jsxn, decoding works, encoding gives the same error (since its' really just calling jsx).

from jsx.

talentdeficit avatar talentdeficit commented on August 23, 2024

i'm unable to reproduce your error with either the v2.0 tag or develop's HEAD. what does jsx:encode(#{}) return?

from jsx.

 avatar commented on August 23, 2024

I just created a blank relx project (named tomato) with one dependency; jsx. I run make, it pulls jsx 2.0 into deps, creates a release in _rel.
Then I run it with _rel/bin/tomato console and I do the following

Exec: /Users/ahmad/Desktop/tomato/_rel/erts-6.0/bin/erlexec -boot /Users/ahmad/Desktop/tomato/_rel/releases/1/tomato -env ERL_LIBS /Users/ahmad/Desktop/tomato/_rel/releases/1/lib -config /Users/ahmad/Desktop/tomato/_rel/releases/1/sys.config -args_file /Users/ahmad/Desktop/tomato/_rel/releases/1/vm.args -- console
Root: /Users/ahmad/Desktop/tomato/_rel
Erlang/OTP 17 [erts-6.0] [source-07b8f44] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V6.0  (abort with ^G)
(tomato@127.0.0.1)1> jsx:encode(#{}).
** exception error: bad argument
     in function  jsx_parser:value/4 (src/jsx_parser.erl, line 125)
(tomato@127.0.0.1)2> 

Maybe the git pull isn't pulling master? But the _rel/lib/jsx-2.0 has the source in it looks like its the same as master. Unless I'm missing something.

I zipped up the whole tomato project as is here http://saywe.bitbuilder.com/tomato.zip

from jsx.

 avatar commented on August 23, 2024

Akhaa!
I did a plain rebar compile went into ebin and did it from there, and it worked.
Something is up with the way relx calls rebar compile. Maybe it's triggering the JSX_NOMAPS somehow.

from jsx.

talentdeficit avatar talentdeficit commented on August 23, 2024

i'll have to check what relx is doing. thanks for bringing this to my attention

from jsx.

Related Issues (20)

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.