-
Notifications
You must be signed in to change notification settings - Fork 71
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
Feature Request: Automatically reshim after a mix escript.install command successfully finishes #103
Comments
Yeah I have stumbled upon the same thing as well. I installed livebook and the command wasn't in the $PATH until I ran reshim command. |
Yes, this has bit me too. Seems like a general problem asdf has with additional binaries. For instance, something very similar happens with node.js and npm: https://asdf-vm.com/manage/core.html#reshim. This project clearly says in the README that you should reshim after building escripts. But it's still easy to miss until you learn the hard way. Rebuilding the escripts path seems easy enough, but it's not obvious to me how to trigger that. Any idea? |
I'm not entirely sure how the reshim thing works, and if it takes into consideration just the existence of the binaries or also is needed when binary file changes, but it seems like the easiest thing to do would be to
What we probably don't want to do is to run it after each and every command out there, but only limit it to things that can affect the binaries, so in this case "mix" command that's a binary itself in the bin/ path of Elixir installation... I don't know, this is not trivial. |
@axelson @kamidev @hubertlepicki, I don't have time to work on this myself right now, but a PR would be welcome. I think the asdf-nodejs plugin does something along these lines with the custom npm shim - https://github.com/asdf-vm/asdf-nodejs/blob/master/shims/npm That npm shim may not be working at the moment, but it should be possible to do something similar and get it working for |
I'll take a look at this. Perhaps a separate shim for escript would be enough? Or is there a reason we need to check mix deps.get, too? |
I don't think we need to reshim after a |
That's what I was thinking, too. I am playing around trying to get a forked project with an 'escript' shim (based on the npm example above) to run. I'll keep you updated if I make any progress. |
Sounds good!
…On Sat, Oct 30, 2021 at 8:31 AM Kami Development ***@***.***> wrote:
That's what I was thinking, too. I am playing around trying to get a
forked project with an 'escript' shim (based on the npm example above) to
run. I'll keep you updated if I make any progress.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACN5OBA6Y7UON6WOQEMF3UJRBZRANCNFSM45TBMUKQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
The current Livebook instructions say that if you're using asdf you need to run
asdf reshim elixir
after installing livebook as an escript:Source:
https://github.com/elixir-nx/livebook/blob/26226a42e0544fe3870c29bc68d752e7d6d3e63c/README.md#escript
Is it possible for asdf-elixir to detect that
asdf escript.install
has successfully installed an escript and then automatically reshim? If not that's fine, just figured I'd ask to remove a potential stumbling block. Escripts are always executable binaries so reshiming makes sense (to me). We'd probably have to do it when uninstalling an escript as well.The text was updated successfully, but these errors were encountered: