-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issues running a Clojerl release #83
Comments
My kerl builds are old, so I'll update those and work back through some recent Erlang versions and see if I witness any different behaviour ... |
On Erlang 22.3 it crashes with this error: =INFO REPORT==== 10-Jul-2020::00:00:41.214853 ===
application: ports
exited: {bad_return,
{{'ports.app',start,[normal,[]]},
{'EXIT',
{undef,
[{'ports.app',start,[normal,[]],[]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,277}]}]}}}}
type: permanent I also tried removing the interactive mode from the Update: This error is simply due to the fact that the |
@oubiwann Do you have a public repository that would allow to reproduce the behaviour? I've been using the |
Just pushed the code here: Since I can't test using the release script, I've been starting up the REPL (using (application/ensure_all_started :ports)
(ports.echo/echo "hey, it's a thing") Note that I currently have the log level set to debug, so you'll see more sent to stdout than you might be used to ;-) |
So, I think that second error I pasted in the comment is actually a red herring: it seems that With that realization, I've re-tested with Erlang 23.0 and 22.3 and get the same error (the one pasted in the ticket description). Note that I couldn't get clojerl to run with my current rebar3 install on Erlang 20.3 or 21.3. (Maybe I need to compile rebar3 on a per-kerl install basis?) Also: I pushed a couple of tweaks to that repo (there was a minor regression in the sys config file). |
Oh wait!! I didn't add the ENV var (I was testing by manually editing files, which didn't work ... but I probably missed something.) (ports@spacemac)1> 'ports.echo':echo("hey, it's a thing").
"hey, it's a thing" I'm running with the release |
[#83] Update .app files with modules before creating a release
Update: This comment has been converted to a ticket here: #85 In LFE, it's possible to switch from the Erlang shell to the LFE REPL by simply starting up the REPL. Is that something that Clojerl supports? Ah, yes! > 'clojure.main':main([<<"-r">>]). Clojure 0.6.0
clje.user=> Looks like I can run a REPL directly if instead of doing this: CODE_LOADING_MODE=interactive $(PROJ_BIN) console I do this: CODE_LOADING_MODE=interactive $(PROJ_BIN) start
$(PROJ_BIN) eval "'clojure.main':main([<<\"-r\">>])"
$(PROJ_BIN) attach; |
Update: This comment has been converted to a ticket here: #86 Hrm, maybe more than just the call to If I make my test echo call: clje.user=> (ports.echo/echo "hey, it's a thing") I get this: clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> clje.user=> If I switch to starting up a release console, and then start the Clojure REPL manually via an Erlang call, I see more of what's going on, getting this after making the Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> ports.echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> orts.echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> rts.echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> ts.echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> s.echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> .echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> echo/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> cho/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> ho/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> o/echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> /echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> echo "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> cho "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> ho "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> o "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> "hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> hey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> ey, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> y, it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> , it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> it's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> t's a thing")
Couldn't unread to erlang.io.PushbackReader: :badargclje.user=>
's a thing")
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
Couldn't unread to erlang.io.PushbackReader: :badarg
clje.user=> a thing")
clje.user=> a thing")
clje.user=> thing")
clje.user=> thing")
clje.user=> hing")
clje.user=> ing")
clje.user=> ng")
clje.user=> g")
clje.user=> ")
clje.user=> )
clje.user=>
clje.user=> |
That is a good point and a good thing to have. I would rather address this in a different issue though 😄. Would it be possible for you to open a different issue for this? 🙏 |
@jfacorro Absolutely! Sorry, got into stream-of-consciousness mode ;-) |
I created two tickets for the above comments, and now will test the latest updates to the plugin (I might already have them, though -- I've been running the rebar3 clojerl plugin off of master for the past day ...) |
Hrm, looks like I'm running into a new problem with the latest plugin code in master: If I don't compile the Clojerl code before I run a release, I get the same error I mentioned above ( If I do compile first (which worked above), I now get an error:
But maybe I haven't updated my workflow to what it should be? Here's a sample set of tasks I do for a completely clean build:
|
Ah! It works if I remove I think we're good to close this issue! |
Thanks SO MUCH for all your help, Juan! ❤️ |
No problem! I'm very happy to help if it means Clojerl is getting used 😄. |
This is a follow up to the discovery work that @jfacorro did here:
Basically, when I try to run a Clojerl application using the script resulting from
rebar3 release
(e.g., executing./_build/default/rel/NAME/bin/NAME console
), I get an error like the following:As a sanity check, I was able to run this application from the Clojerl REPL just fine:
The one difference I can note between the issue above and what Juan was seeing (in the comments at the above links) is that my
vm.args
does have the-mode interactive
line present. I confirmed that it was actually inbuild/default/rel/ports/releases/0.1.0/vm.arg
, too.The text was updated successfully, but these errors were encountered: