Since 1.0.0 in July there have been eight more releases, the latest being 1.0.8. Between them they add up to around 300 documented changes. Listing them all would make this post enormous, so here are just the highlights. Almost all of it came from running the extension against real solutions and from your reports.
New in 1.0.7 and 1.0.8: editing large generated modules
Two quick follow-ups to 1.0.6, focused on what happens just after you type in a big generated module:
- Fixed: an edit could leave the extension reading the module wrongly until the file was reopened — a removed END kept its old extent,
ACCEPTcould be misread asCCEPT, and a new PROCEDURE line went unnoticed — so folding, the outline, hover and diagnostics could work from the wrong structure. Each edit now gives exactly what reading the whole file would. - Fixed: a discarded-return-value warning no longer keeps a variable’s old type after you change its declaration.
- Diagnostics after an edit are ready in about a third of the time: on a 61,000-line generated module, about 2.3 s instead of about 7 s.
- Hover, completion and Go to Definition no longer wait behind the background check, which removes the occasional multi-second hover. On the same 61,000-line module, a hover just after typing nearby went from about half a second to about 0.21 s.
- The re-check after an edit no longer has steps that slow down with the square of the module’s size, an edit re-reads only the lines it changed, and hovering a local variable reads only that procedure’s data.
Hover, F12, references and completion now agree
The biggest theme of 1.0.6. Hover, Go to Definition, Go to Implementation, Find All References and completion used to resolve a name through separate code paths, and they did not always give the same answer. Now they do:
SELFandPARENTresolve to the procedure’s own local class, even when every procedure in the module declares aThisWindow- Go to Implementation (Ctrl+F12) opens the body the call actually runs: the local override (
ThisWindow.Run()opens the window’s ownRun), the overload that matches the arguments, a method inherited from several levels up, and colon-named objects likeRelate:Customer.Open() - Chained members like
SELF.Order.AddItem(...), and theCustomer:Namestyle of field qualification, both resolve properly - Hovering
END,ELSE,OForTOtells you which structure it belongs to and links back to where that structure starts
Navigating across a solution and its DLLs
- Find All References, F12 and rename work across DLL boundaries, and reach class implementations compiled through
LINK()that are not listed in the .cwproj - Show Call Hierarchy (Shift+Alt+H) works on procedures, methods and routines
- Navigation to GOTO and loop labels,
INCLUDE('file','section')names, and F12 from a MAP declaration to its implementation - Generated code reads correctly: the MAP shapes the templates emit, procedure names shared between an EXE and its DLLs, prefixes longer than eight characters, and prototypes an INCLUDE brings into a MAP
Builds, configuration and Run
- Build and Run use the configuration and Clarion version that are actually in force, and show them in the Clarion Tools pane. A configuration you set yourself is no longer overwritten at startup, and the Clarion IDE is told about it
- Every build writes what it is building, in which configuration, and the exact MSBuild command line
- Run and Debug start the startup project without needing a file open, work with any default terminal, and accept a custom
clarion.run.command - Source files added to or removed from a project are picked up without a reload, and folders with spaces in their names build correctly
- The
%THISDIR%,%WinUserApplicationData%and%WinCommonApplicationData%redirection macros are now supported
Diagnostics
- Every one of the 24 checks has its own on/off setting and a severity of your choice
- New checks: an INCLUDE or MEMBER naming a file that cannot be found, a PRIVATE procedure called from another module, MAP prototype shapes, VIEW JOIN fields, and (opt-in) calls to procedures declared nowhere
- Clarion: Unresolved File References lists every INCLUDE or MEMBER file that cannot be found
Completion and editing
- Completion lists the closest names first (locals, then module and global data, then everything else), offers EQUATEs from other files, routine labels after
DO, and FILE fields afterOrders. - Rename (F2) opens immediately, and decides whether to refuse based on where the symbol is declared, so generated code stays protected
Speed
- Tokenizing a file is about three times faster, and background checking stops as soon as you start typing
- Hover stays fast in very large generated modules, including straight after an edit. On a 60,000-line module it used to take up to 18 seconds after an edit
- The remaining slow cold starts on large programs are gone, and startup work now shows as progress in the status bar
Many thanks to @geircodes for a long run of contributions, and to everyone who reported issues, especially Bill Atchison and ClarionLive.
Full details are in the changelog. Install or update from the VS Code Marketplace.
As always, feedback, bug reports and feature suggestions are very welcome. If something is slow, enable clarion.log.performance.enabled, reproduce it, and paste the Clarion Language Server output into an issue.