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

Invoke haxe in cwd #6

Merged
merged 2 commits into from
Apr 24, 2019
Merged

Invoke haxe in cwd #6

merged 2 commits into from
Apr 24, 2019

Conversation

kevinresol
Copy link
Contributor

@kevinresol kevinresol commented Apr 24, 2019

@Gama11
Copy link
Member

Gama11 commented Apr 24, 2019

But why? We already specify --cwd, which seems to work fine for local Haxelib repos.

@Gama11
Copy link
Member

Gama11 commented Apr 24, 2019

(and that is also how what the language server does for display requests)

@kevinresol
Copy link
Contributor Author

kevinresol commented Apr 24, 2019

When lix is installed, the haxe command does not point to the haxe compiler binary but haxeshim which is a script that checks for the configured haxe version in .haxerc in cwd and invoke the actual haxe compiler. So it has to be invoked in the correct directory (instead of passing the cwd as an arg).

Anyway I think this is more correct as it mimic the behaviour of running the haxe command in cli manually.

@kevinresol
Copy link
Contributor Author

kevinresol commented Apr 24, 2019

(and that is also how what the language server does for display requests)

In that case this patch should also be applied there. And perhaps that would solve some lix-related problems.

@Gama11
Copy link
Member

Gama11 commented Apr 24, 2019

Well, what confused me is that it seems to work ok for the language server, but not eval-debugger?

@nadako Is there a particular reason we don't just set the cwd / would tha even work for us?

@kevinresol
Copy link
Contributor Author

I guess it "works" because it invoked haxe in lix's global scope instead of the project-specified one? Perhaps that's why there are problems sometimes, which might be due to incompatible haxe version with some libraries.

@kevinresol
Copy link
Contributor Author

Is there a particular reason we don't just set the cwd

It seems to me that it simply because cwd doesn't matter for the haxe compiler (it is the case if the haxe compiler never access the process's cwd). The --cwd flag is completely irrelevant in this context.

@nadako
Copy link
Member

nadako commented Apr 24, 2019

@nadako Is there a particular reason we don't just set the cwd / would tha even work for us?

I don't remember ^^ But in general, if we ever want to share haxe server across e.g. workspace folders, we'd still need to do --cmd.

@kevinresol
Copy link
Contributor Author

kevinresol commented Apr 24, 2019

if we ever want to share haxe server across e.g. workspace folders

FWIW, Lix users want to use the project's specified haxe version for each workspace. So unless the haxe version are exactly the same they shouldn't be shared.

@Gama11
Copy link
Member

Gama11 commented Apr 24, 2019

Anyway, if this helps, I'll just merge it for now. I don't have a Lix setup, so I trust that it works. :)

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.

vshaxe's eval-debugger doesn't work with Lix/Haxeshim (Haxe 4RC2, scoped or global Lix-installed Haxe)
3 participants