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

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

Closed
fullofcaffeine opened this issue Mar 30, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@fullofcaffeine
Copy link

commented Mar 30, 2019

I don't know whether this is a lix or haxeshim issue (or, less-likely a vshaxe eval-debugger issue).

  • vshaxe v2.8.0
  • vscode v1.32.3 (linux)
  • Linux Mint 18.3
  • Lix 15.3.6
  • Haxe 4RC2

I have a local lix scope in my project set to Haxe 4RC2. In vshaxe, there's no custom config for the haxe executable (default is just haxe). After lix downloading everything, completion works as expected in vshaxe.

Here's a dump of my vshaxe settings.json:

global settings:

{
 "haxe.enableCompilationServer": false
}

workspace settings:

{
  "haxe.displayConfigurations": [["build-frontend.hxml"],["build-backend.hxml"]],
}

Then, I have the following launch.json for the workspace, to configure the eval-debugger debugging launch target:

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Haxe Interpreter",
			"type": "haxe-eval",
			"request": "launch",
		}
	]
}

When I go the Debug section of vscode and launch the debug build:

vshaxe1

It ends up failing with the following message:

classpath src is not a directory or cannot be read from

vshaxe2

The src directory is present in the workspace, it's part of my project's directory's tree:

├── app.js
├── build-backend.hxml
├── build-frontend.hxml
├── haxelib.json
├── haxe_libraries
├── makefile
├── node_modules
├── package.json
├── README.md
├── release_haxelib.sh
├── src //<--- here
├── webpack.config.js
└── yarn.lock

Also, as you may see, I have two hxmls, as this projects includes code for the frontend and the backend of the app. Right now, build-backend.hxml is only a placeholder as I haven't got to implementing it yet, so both files have the following contents:

-lib haxe-loader
-lib react

-cp src
-js app.js
-main App

-D react_hot

Perhaps this a Haxeshim bug? Any insights and or workarounds would be greatly appreciated.

There's some additional information in the discussion here and here.

Thanks!

@kevinresol

This comment has been minimized.

Copy link
Member

commented Mar 30, 2019

Would be nice if you can reduce this to minimum and put it on a separate repo.

@fullofcaffeine

This comment has been minimized.

Copy link
Author

commented Apr 4, 2019

Here's a minimalist project to reproduce the problem: https://github.com/fullofcaffeine/haxe-vscode-lix-macro-debugger. Main.hx has the Main class and a simple expression macro. cc @kevinresol

Haxe 4RC2 is installed globally by Lix (It seems the eval-debugger extension can't find a scoped Lix-installed Haxe, and tells me I have an old version of Haxe and that the eval-debugger requires at Haxe 4RC2, so I had to install Haxe 4 RC2 globally, see: https://www.collabshot.com/show/c7ddfe) and @ a local scope using Lix.

  • Scenario 1 - without Lix:

If I force-set Haxe to the unwrapped/native binary @ /usr/bin/haxe, the eval debugger works fine:
issue1

I left this as a default setting in https://github.com/fullofcaffeine/haxe-vscode-lix-macro-debugger/blob/master/.vscode/settings.json.

  • Scenario 2 - Using Lix.

I assume that to use Lix, it's just a matter of leaving the default haxe.executable setting in vshaxe so that the wrapped/shim version of Haxe is called instead. So, to test this scenario, remove the haxe.executable setting in: https://github.com/fullofcaffeine/haxe-vscode-lix-macro-debugger/blob/master/.vscode/settings.json or change it to 'haxe'. cc @Gama11

When using Lix, after clicking the Launch button in the top-left corner in the debug section, it fails and the following message is shown in the debug output pane:

classpath src is not a directory or cannot be read from.

issue2

It seems this could be a problem both with the eval-debugger and Lix. With eval-debugger for not using/finding the scoped Lix-installed Haxe and falling back to the global version, instead. With Lix because once eva-debugger finds it (the globally Lix-installed Haxe), it fails with the message above. It only works when vshaxe is setup to a global raw/unLixed installation of Haxe 4RC2.

@fullofcaffeine fullofcaffeine changed the title vshaxe's eval-debugger doesn't work with Lix/Haxeshim (Haxe 4RC2) vshaxe's eval-debugger doesn't work with Lix/Haxeshim (Haxe 4RC2, scoped _or_ global Lix-installed Haxe) Apr 4, 2019

@fullofcaffeine fullofcaffeine changed the title vshaxe's eval-debugger doesn't work with Lix/Haxeshim (Haxe 4RC2, scoped _or_ global Lix-installed Haxe) vshaxe's eval-debugger doesn't work with Lix/Haxeshim (Haxe 4RC2, scoped or global Lix-installed Haxe) Apr 4, 2019

@kevinresol

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

I cloned the repo and pressed the play button in the debug panel. It tells me:
eval-debugger requires Haxe 4.0.0-rc.2 or newer, found 4.0.0-rc.1+1fdd3d5

Obviously the project is using rc2 which is specified in .haxerc and that 4.0.0-rc.1+1fdd3d5 is specified my global lix scope.

@Gama11 how is haxe invoked by the debugger?

@kevinresol

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

With the linked PR I am able to run the debugger 😄

Screen Shot 2019-04-24 at 1 29 18 PM

@kevinresol kevinresol closed this Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.