the-carlisle-group / Acre-Desktop

A simple Dyalog APL IDE plugin that introduces "projects" and allows you to keep your source code in Unicode text files.
MIT License
11 stars 1 forks source link

In 18.0, making use of acre's OnAfterSave option crashes SALTUtils #222

Closed aplteam closed 3 years ago

aplteam commented 4 years ago

My setup.dyalog contains this statement:

{}⎕se.acre.AfterSave '⎕SE.OnAfterSave'

In 18.0 this makes SALTUtils crash on line 1020, which is line [16] of the "Hook" function.

Obviosly the new hooking mechanism introduced in version 18.0 works fine for the "Fix" event but not at all for the "AfterFix" event.

This might need collaboration with Dyalog to get fixed.

PhilLast commented 4 years ago

Do you mean the call to ⎕SE.acre.AfterSave itself causes the crash or subsequent edits?

Can you send Session output )SI etc.

PhilLast commented 4 years ago

@PaulMansour I wanted to bring this to your attention because there's a decision to be made here.

Kai has identified a problem where the latest changes to SALTUtils in Dyalog 18.0 crashes acre.

I still have the previous version 18.0.37283. If I download and use the new I will also see the problem but won't be able to use acre to fix it.

This must be Dyalog's proxy "interface" to the Fix and AfterFix events. Acre 8.0.x differentiates between; on the one hand all Dyalog versions up to 17.1 that still use essentially the same code as I wrote back in 2007 with an enhancement a couple of years old to allow SALT a look in when acre doesn't recognise the item; and 18.0 that uses Adam's first version of the interface.

The current method of differentiating versions to take advantage of enhancements relies only on the major and minor version numbers; not the patch nor the build; so sees no difference between 18.0.37283 and the latest. To change that would almost certainly cause other worse problems.

My suggestion is that I

PhilLast commented 4 years ago

Of the above four bullet points I have done all but the third. SALTUtils.EditorFix is only invoked when the edited item is not within any tracked acre project.

In other words I have done as little as possible merely reverting to what is essentially the same behaviour that has been current since acre 3 which is hardly different from acre 1.

I should like to implement Dyalog's interface but will await guidance.