Skip to content
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

[clj] Add clj to modules in lfe.app.src #282

Closed
yurrriq opened this issue Sep 15, 2016 · 6 comments
Closed

[clj] Add clj to modules in lfe.app.src #282

yurrriq opened this issue Sep 15, 2016 · 6 comments

Comments

@yurrriq
Copy link
Contributor

yurrriq commented Sep 15, 2016

Without it, I can't use clj functions in a release. Could've sworn I did this, but "computer says no."

yurrriq added a commit to yurrriq/lfe that referenced this issue Sep 15, 2016
@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

Note: for whatever reason lfe doesn't seem to play nice with rebar3 in _checkouts/...

@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

There seems to be another issue at play here... when running a release:

1> cl:module_info().
** exception error: undefined function cl:module_info/0
2> clj:module_info().
** exception error: undefined function clj:module_info/0
3> lfe_doc:module_info().
[{module,lfe_doc},
 %% ...
]

@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

Even more curious, code:which(clj) returns the path to clj.beam...

@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

The following makes everything ok again:

4> code:ensure_modules_loaded([cl,clj]).
ok

@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

As a (possibly temporary) workaround, I've added

(let (('ok (code:ensure_modules_loaded '[clj]))))

to start/2 in my apps that depend on lfe at runtime.

Regardless we should add clj to modules in lfe.app.src.

@yurrriq
Copy link
Contributor Author

yurrriq commented Sep 15, 2016

Maybe we should make lfe.erl implement the application behaviour and call code:ensure_modules_loaded([cl,clj]) there...

oubiwann pushed a commit that referenced this issue Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant