Haxe Toolkit Support 1.4.0 released (supports Intellij 2023)

Hi,

Just want to let people know I have made a release of the haxe intellij plugin and it is now available on Jetbrains marketplace. (you no longer need to install it manually from github)

Current release works with:
Intellij community / ultimate 2022.3.1 → 2023.2 (eap)
Android Studio Giraffe (RC1) → Android Studio hedgehog (canary 9)

Note that some of the more modern features of haxe as still missing/unsupported, for instance abstract classes

8 Likes

Thanks for all the feedback and bug reports, there has been quite a lot of fixes and improvements since the initial release (1.4.0) I have published a few new releases on the marketplace so it can be beneficial to check for updates. there’s also some yet to be released changes available as beta builds if you want to be bleeding edge, check out github for the latest betas (as of writing 1.4.3 beta 2 is the latest)

1 Like

Version 1.4.5 is now live on github and jetbrains marketplace.

2 Likes

Oh. My!!! Thank you so much! Been waiting for this one since… don’t know, 3 years ago :smiley: . So happy it’s here. Although I like editing in VS Code, refactoring support there is still behind IJ. They made progress but there are still issues with my setup as I load multiple projects in the same workspace. Thank you so much!!! Do I repeat myself? That’s because I’m HAPPY.

1 Like

Ah, nevermind. It doesn’t work :frowning: It’s stuck indexing with 1 thread at 100% forever. I removed the affected module from the project, and it got stuck at the next.

Sorry for the lack of response, i somehow missed your reply. What version of the plugin did you use when you experienced these issues? a lot has changed since 1.4.5, at the time of writing the current version is 1.4.14. i remember fixing a bug that for some users made the plugin get stuck in some kind of infinite loop resolving haxe libraries but i don’t recall the version in witch it was fixed.

If there’s anyway to reproduce your problem pleas let me know

@Kyliathy I think I found and solved what might have been the issue you experienced, I have just built a new release that should make larger and more complex project load faster, any chance you could test this release ?

UPDATE:: use 1.4.16 link below (1.4.15 contains a caching bug)

1 Like

Just a heads up, there was a critical bug in 1.4.15 that would break type checking due to a cache not beeing cleared. version 1.4.16 fixes this (and a few other things)
hopfully it will be live on jetbrains market place tomorrow

1 Like

Hi there :slight_smile: Not sure if you’re still developing this extension, but it still doesn’t work for me. It gets stuck on indexing one of the modules. Any debug logs I could send you?

Is the problematic module a public repo that i can test or is it closed source ?

some other basic info on you setup could help troubleshooting.

  • What version of the plugin are you running ?
  • What version of intellij are you running?
  • What Operating system are you using?
  • Is the code stored on some kind if remote device, NAS file-share etc or on a local drive?
  • how large is your project (files) and how many dependencies are loaded ?

The latest version as of writing is 1.4.21 and it seems like it works for most people as the feedback i get is usually minor bugs and errors being logged.

you can generate a log archive and send me, i feel the final zip has a bit much telemetry and info for my personal liking, it contains project names and file paths that may or may not say something about what your working on and for whom. but if you don’t mind that being part of the logs then his zip file can be of help.

1 Like

Is there any chance that this plugin will be supported by other products (i.e. PhpStorm, WebStorm) ?

Not sure, i dont think so.

The plugin heavily relies on the Java plugin code and it does not look like this is available in any other IDE except IntelliJ Community/Ultimate and Android studio. I tried to just tweak the build settings to try to build for PhpStorm but i get a build exception

BuildException: Cannot find builtin plugin ‘com.intellij.java’

If i remove that dependency/plugin it fails to build due to missing classes, and as far as i can tell the java plugin is bundled with the IDE so there’s no way to import it in any other IDE as far as i know.

OK. Thanks for trying anyway.

Version 1.4.25 is now released and available on jetbrains marketplace.

2 Likes

I think i have found your parser/indexing issue Kyliathy, there are 2 issues and i have fixed one of them.
The next release should hopefully solve your problem.

in short the problem is caused by how nested objectLiterals are parsed (solved) and how nested generics are parsed (working on tracking down the cause on this one). the parser would do n^2 operations for every level in a nested structure when it should be closer to linear.

1 Like

@Kyliathy version 1.4.26 should fix your indexing issue, it will probably go live sometime next week on the jetbrains marketplace, but if you want to try it out before that, then here’s the github download link

UPDATE: Its live on Jetbrains marketplace now

1 Like

@m0rkeulv thank you for keeping tabs on this issue! Really appreciated :slight_smile:

Unfortunately, it still gets stuck. Yes, the project is closed source but I’m willing to debug this with you. (later edit: but it gets stuck on a public library, see below). We can have a remote session, or you can place some verbose logging and I can send you the logs.

For example, now it’s stuck at:

image

Actually that’s not really a “closed source” file, it’s simply the hxformat.json, have no idea why it would get stuck on that. Makes me believe that it’s not really at that :slight_smile:

For example now I restarted the IDE and it’s stuck at:

image

I restarted a couple of more times and now it’s always that AllTests.hx file.

That file is a part of the Buddy library for Unit testing in Haxe. You can see the version above. It’s public.

@Kyliathy Got a link to the library? i can probably do some testing myself if its a public one, but both 1.4.26 and 1.4.27 should improve indexing significantly, your lib has to have another corner case I have not seen

1 Like

i tried to add Buddy (https://lib.haxe.org/p/buddy/) to a project and it was indexed in probably less than a second, could you make sure you got 1.4.27 installed and then invalidate caches to be sure there’s nothing old laying around causing problems. (looking at the AllTests.hx files it got the structure that would cause problem for pre 1.4.26 versions)

1 Like

as a side note, not sure how well buddy will work with the plugin, it uses macros to transform code

this macro

				switch getFunction(f) {
					case null:
						var change = macro describe($s, function() $f);
						e.expr = change.expr;
						injectAsync(e);
					case fun if(fun.args.length == 0):
						var change = macro describe($s, $sync($f));
						e.expr = change.expr;
						f.iter(injectAsync);
					default:
						var change = macro describe($s, $async($f));
						e.expr = change.expr;
						f.iter(injectAsync);
				}

would transform this

		describe("Testing before with short lambda", {
			beforeAll(() -> {});
			beforeEach(() -> {});
			beforeEach((done) -> done());
		});

into this,

		describe("Testing before with short lambda", Sync(()->{
			beforeAll(Sync(() -> {}));
			beforeEach(Sync(() -> {}));
			beforeEach(Sync((done) -> done()));
		}));

however since the plugin only have static analysis it will mark these arguments as errors. as Sync is an EnumValue and what the method signature wants, while the non-transformed is providing functions.

1 Like