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

Fix spawner not being found when under a release #19

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

g-andrade
Copy link
Contributor

Cool library!

I ran into an issue with spawner not being found (enoent error) when calling Exile.Process.start_link/2.

The spawner path is evaluated at compile time:

@spawner_path :filename.join(:code.priv_dir(:exile), "spawner")

And therefore spawner fails to launch from a release when the compiled code folders are no longer available (for example, from within a Docker container).

Resolving the path at run time fixed the issue for me.

Info:

  • Exile version: 0.2.0
  • OTP 25.3, Elixir 1.14.4

Since the spawner path was hardcoded at compile time, it would fail to
launch from a release when the compiled code folder was no longer available
(for example, within a Docker image).

Fix this by resolving the path at run time.
@g-andrade g-andrade changed the base branch from master to dev April 26, 2023 11:15
@akash-akya
Copy link
Owner

@g-andrade Good catch! I don't know how I missed it.
Thanks for the contributions!

@akash-akya akash-akya merged commit 6ed5259 into akash-akya:dev Apr 26, 2023
@g-andrade g-andrade deleted the fix/priv-path-under-mix-release branch April 26, 2023 20:44
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

Successfully merging this pull request may close these issues.

2 participants