Status report: February 2019

This month I spent a bunch of time working on giving better error highlighting (of actual errors, now that we don’t highlight non-errors so much any more). The basic issue I was tackling was type differences. Things like numeric expressions, which in Haxe are always Floats being assigned to an Integer. This led me down a path of having to do better typing of expressions and some work toward top-down inference and monomorphs. I still have to deal with monomorphing of class fields/properties and structural sub-typing. Both of those are interesting and rather difficult to deal with. (You can look at the Haxe typer if you want a clue as to why.) At any rate, I was able to complete a substantial portion of work and made great headway.

What I worked on for our sponsor:

1) Type annotation cleanup: (ongoing)

  • Detect Float values being assigned to Int variables in variable declarations – including adding selectable quick fixes (such as “Wrap with Std.int()”). (merged – was in-review last month)
  • Detect incompatibility when initializing variables using type-tagged expressions (merged – was waiting for review);
  • Detect incompatibility when initializing variables using parenthesized expressions (merged – was waiting for review);
  • Detect incompatibility during assignment (merged – was in-progress)
  • Limited monomorph detection within a single method (merged – new)
  • Add one-click “quick-fixes” for automatic conversions to standard types, changing declared field type, etc. (merged – new)

What I worked on for the Community:

1) Add Haxe-specific tab settings page.

  • Refactor indent calculations; add “continuation” indenting (for multi-line expressions, parameter lists, etc.).

2) Some progress on the new UI for standard library locations. (It is going slow.)

Community Contributions:

None this month

Next month:

1) Finish tab settings pane.
2) Continue type annotation cleanup. (Sponsor priority)
3) Fix debugging C++ projects when build with Lime. (Currently looks like
an hxcpp issue.)
4) Add safeguards so that project rebuilds won’t erase directories outside
of the project tree.
4) Time for another release!
5) Fix class constructor being inappropriately renamed during class rename
refactoring. (FlowPlay list)
6) Continue UI for standard library locations.
7) Haxe 4 features?

Everybody have a great month.

-Eric

Status report: January 2019

Hi folks,

This month, while I spent a little bit of time understanding and finding how to fix class name refactoring, I realized that it wasn’t as high up my sponsor’s priority list as “Better error detection” was, so I switched gears back to the detection and have spent my time fixing those issues as I find them. The only one that was particularly pointed out in the work description was “var i : int = 10/2;”. I’ve fixed that and a number of other issues and am now working on the highlighted lines here:

Highlighting Type Errors

By the way, the inspections you see here are not limited to Float/Int comparisons; it applies to anything that is assignment [in]compatible. That said, the plugin doesn’t have any real unification support or monomorph type coercion yet.

What I worked on for our sponsors:

1) Type annotation cleanup: (ongoing)

  • Detect Float values being assigned to Int variables in variable declarations – including adding selectable quick fixes (such as “Wrap with Std.int()”). (complete – not reviewed — was in-progress last month)
  • Detect incompatibility when initializing variables using type-tagged expressions (complete – not reviewed);
  • Detect incompatibility when initializing variables using parenthesized expressions (complete – not reviewed);
  • Detect incompatibility during assignment (in-progress)

2) Renaming a class (refactoring) inappropriately renames the constructor. (in-progress)

What I worked on for the Community:

1) Fix review comments and merged “Extract Variable” and “Extract Constant” refactorings. (merged)

  • Added type-tag parsing (in general) and support it during extraction. (completed in January)
  • Detect type and use it to make better name suggestions. (completed in January)
  • Avoid using/allowing keywords as variable names/suggestions. (completed in January)
  • Stop infinite loop when a variable was being extracted to the class level. (completed in December)
  • Avoid Haxe keywords when making variable name suggestions. (complete in December)
  • Fixed multi-select (for renaming all occurrences simultaneously). (completed in December)
  • Fixed semi-colon detection and insertion. (completed in December)

2) Adding tab settings pane (in-progress):

  • Get pane to display. (complete)
  • Save settings and honor them. (complete, except for continuations)
  • Honor continuation settings. (in-progress)

3) Research and preliminary work on Issue #641 – where unexpected directories (e.g. root!) are being deleted.

4) Some progress on the new UI for standard library locations. (It is going slow.)

Community contributions:

1) Updated hxcpp-debugger code with code generated using hxjava 3.2.0 to get rid of warnings and messy class names (m0rkeulv). (merged)

Next month:

1) Finish tab settings pane.
2) Continue type annotation cleanup. (sponsor priority)
3) Fix class constructor being inappropriately renamed during class rename refactoring.
4) Fix debugging C++ projects when build with Lime. (Currently looks like an hxcpp issue.)
5) Time for another release!
6) Continue UI for standard library locations.
7) Haxe 4 features?

Have a great month, everybody!

-Eric