Status Report: June 2018

Hi Folks,

June was kind of a slow month, results-wise, but plenty of stuff got worked on…

For my sponsors, most of my time went to dealing with the CPU Over-use issue, where the CPU is running at roughly 300% forever on a Mac.  I’ve been having trouble duplicating the issue exactly.  However, we were able to create a similar results by opening up a specific file, approximately 1000 lines long, with a few dozen imports (including OpenFL). I say “similar” because it’s not clear that it’s the same issue, in that the CPU runs high for a few minutes and then calms back down if no editing occurs. We agree that it *might* be the issue, so I’m addressing it.

In that vein, we found that the problem is the background annotations; specifically, the “Find Unused Imports” inspection. In profiling that code, I have found several hot-spots and have fixed a few of them, bringing the total run time down about 15%. That’s not enough to deal with the problem, though, and the other hot spots aren’t accessible (they are in IDEA’s code — accessing the file caches). Therefore, I’m looking to change the algorithm so that we don’t have to call into IDEA’s code so much.

As for other things that got done over the month, there have not been many checkins, but things have been happening…

What I did for our sponsors:
1) CPU Over-use bug.
1a) Duplicate the sponsor’s code environment on site.
1b) Also set it up for plugin development, so that I can debug and test changes in situ.
1c) Duplicate and profile the bug.
1d) Optimize critical code path, resulted in 15% run time reduction. (Continuing)

What I did for the Community:
1) Code review of Ilya’s latest semantic annotation rewrite — needs changes.
2) Code review for Mads’ build changes (using gradle) — not yet merged, but approved.
3) Checked in the example project showing hxcpp target debugging with openfl.
4) Worked on using HAXE_STD_LIB environment variable and associated UI and project changes (ongoing).

Contributions from the community:
1) Mads’ changes to use gradle instead of ant to build the plugin are complete, but not yet merged. (Waiting for the CPU Over-use bug to be finished; it has higher priority and changing to gradle may be disrupting to work flows.)

Next month:
– CPU Over-use: Finish optimizing and/or refactor “Find Unused Imports” inspection.
– Finish using HAXE_STD_LIB environment variable and be able to set it inside of IDEA.
– Fix bug where Neko (NME) is trying to be launched when custom or HXML configurations are specified.
– Release 11.3 (Stretch goal)
– More work toward parsing and syncing project files, leading to the automatic managing for compiler conditional definitions. (Stretch goal)

Status Report: May 2018

Hi folks,

May was an exciting month, what with the trip to the Haxe Summit this year. I was glad to meet with you and make the acquaintance of folks I’ve only known by name, thus far.

While I was there, I took the opportunity to spend time with our sponsors, Flowplay in their Seattle office, I spent a bit of time with Mark Aoyama, who mentioned a couple of frustrations he was having. It turned out that he was having speed issues that were due to another couple of plugins — that he doesn’t use — generating NPEs. When we removed them, his life was suddenly much better.  So, let that be a reminder to us all: don’t run plugins you don’t need; they slow down the overall IDEA environment and can cause unexpected issues.

Mark also pointed out that he would really like type completion when creating new methods. It was frustrating to him that completion wasn’t triggered by a ‘:’. He added it to the list of things to work on, and now it’s implemented. It is currently available in the new EAP build and will be in the next release which should come very soon.

Speaking of the EAP build, while we were all enjoying the spring weather in Seattle, Ilya Malanin was hard at work creating a new nightly build for the plugin (built against the latest *released* IDEA).  It is released onto the JetBrains’ plugin repository in the “EAP” channel.  You can enable it (and get notifications of new builds) inside of IDEA by following the directions for adding custom repositories.  Simply downloading it from the repository and installing from disk is useful, too, if you don’t like the integration.

Things I did for sponsors this month:
– Worked on CPU over-use issue on Mac.
– Added ‘:’ to the list of triggers when types are expected. (Context sensitive; not in select statements.) (Available in EAP build.)

Things I did for the community this month:
– Added UI for the location of the Haxe std library, instead of assuming it’s on the classpath. This is to eliminate a set of bugs, most notably on the Mac, where std library classes cannot be found. We still have to *use* this value when setting up SDKs, and it’s not yet merged into the development branch.
– Created an example/sample OpenFL project with a C++ target, primarily as a demonstration of hxcpp debugging. (Not yet merged into the main branch.)
– The usual batch of code reviews.

Community contributions
From Ilya Malanin:
– Nightly developer builds (from the “develop” branch) published to the EAP channel on the JetBrains plugin repository.
(https://plugins.jetbrains.com/plugin/6873-haxe-toolkit-support)
– Fixed “Find Usages” for properties.
– Support of “Find Usages” for constructors.
– Fully re-written semantic annotations, added a lot of new checks and quick fixes. Not yet merged.
– Fixed indents for fat arrow expressions.
– Fixed indents for anonymous structures fields and extends lists.
– Fixed NPE that occurred if current project SDK was not properly configured.
– Fixed parsing of anonymous type with empty body.
– Add anonymous types in anonymous types support
– Add anonymous structures names support
– Added chained anonymous fields recognition
– Add proper generics propagation for anonymous structures, typedefs and classes
– Add generic constraint support
– Add Null<T> support
– Add proper from-to declaration support, types infer and compatibility checks
– Fix referenced var-init support check

From Mads Lundemo:
– Gradle as our primary build environment for the plugin. Not yet merged into development.

Next month:
– Finish using HAXE_STD_LIB environment variable and be able to set it inside of IDEA.
– Fix bug where Neko (NME) is trying to be launched when custom or HXML configurations are specified.
– Review Ilya’s latest semantic annotation (5000 line+) rewrite.
– Release 11.3
– More work toward parsing and syncing project files, leading to the automatic managing for compiler conditional definitions.