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

JLOptions.julia_bin incorrect when embedding #18437

Closed
twadleigh opened this issue Sep 10, 2016 · 7 comments
Closed

JLOptions.julia_bin incorrect when embedding #18437

twadleigh opened this issue Sep 10, 2016 · 7 comments
Labels
embedding Embedding Julia using the C API

Comments

@twadleigh
Copy link
Contributor

For instance, inserting

jl_eval_string("println(Base.JLOptions())");

into the embedding example yields in part:

  julia_bin = "C:\\tw\\julia\\usr\\bin\\embedding.exe",

the embedding executable, and not the julia exectuable.

@yuyichao
Copy link
Contributor

IMHO, this seems like the right thing to do.

@twadleigh
Copy link
Contributor Author

twadleigh commented Sep 10, 2016

@yuyichao, except that at one point in the past I seem to recall @vtjnash saying that that field was supposed to be the path to the julia executable for the purpose of spawning other julia processes ala distributed computing. That may or may not be the case, however, if it is, in fact, meant to represent the path of the executable, julia or otherwise, then, at the very least, it is mis-named.

My real motive in opening this issue, however, is less about the interpretation/calculation of this field and more to lay more solid groundwork for justifying some tweaks to the way that julia does path-guessing in jl_init that generalize to the embedding case (cf. #18421).

@yuyichao
Copy link
Contributor

the path to the julia executable for the purpose of spawning other julia processes ala distributed computing

No. We are not using it for that purpose (AFAIK no one is using it).

@twadleigh
Copy link
Contributor Author

@yuyichao I didn't think we were. I do know for a fact that there is not a single reference to that field (outside where it is defined and set) anywhere in the julia repo. Of course, in that case, it begs the question as to whether that field should even exist.

What I'm really doing, though, is preempting at least one reason that was given at one point for not preferring tweaks to path-guessing that work for both the usual and the embedding cases.

@yuyichao
Copy link
Contributor

What julia_bin contains doesn't have to be related to how we find JULIA_HOME. It does seem that the value is never used anywhere directly and can probably be removed.

I know there's multiple ways to query the current executable name, libuv also provides the wrapper for that, which is probably why it is used. Is there an easy way to figure out the full path of the current library?

@twadleigh
Copy link
Contributor Author

twadleigh commented Sep 10, 2016

In short, yes.

@tkelman tkelman added the embedding Embedding Julia using the C API label Sep 12, 2016
@ihnorton
Copy link
Member

ihnorton commented Jun 1, 2017

Fixed by #21299, #21427, and family. If this is still an issue, comment and we can reopen.

@ihnorton ihnorton closed this as completed Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedding Embedding Julia using the C API
Projects
None yet
Development

No branches or pull requests

4 participants