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

Acre's "Startup" #230

Closed aplteam closed 4 years ago

aplteam commented 4 years ago

Only now have I started to make use of acre's "Startup" parameter.

One thing that I find hard to accept is that when a function is executed by acre via this mechanism and it crashes, that acre keeps that to itself.

I think this is so severe that it should stop. At the moment it's not even reported to the session or the log.

The reason why I think that is should actually crash:

I have an automated build process for packages now. It builds all or selected packages. As part of it it executes RunBatchTest and stops if that does not return a 0, otherwise it carries on. Nobody is watching either session or log.

Later one just realizes that the package has not been built without any idea why.

Clearly when the user wants something being set up then she wants to know when that process failed.

PaulMansour commented 4 years ago

What is the Setup parameter? Do you mean Startup?

aplteam commented 4 years ago

Yes, I've corrected it into "Startup"

PaulMansour commented 4 years ago

I guess it could write a message to the session. What else do you want it to do?

Also, do you really want Startup even running when you are doing anything other than opening a project to develop it in Acre?

aplteam commented 4 years ago

I guess it could write a message to the session. What else do you want it to do?

I think it should crash.

Also, do you really want Startup even running when you are doing anything other than opening a project to develop it in Acre?

Yes: I open the project and then collect all dependencies in the Startup function.

More precisely: it uses Tatin to load the packages in question (they will go into #._tatin by naming convention) and tell Tatin to establish the required references within the project namespace.

I am doing this for development as well as for building, though building would then close the project.

PaulMansour commented 4 years ago

I think it should crash.

OK by me.

PhilLast commented 4 years ago

Just seen this.

At the moment it's not even reported to the session or the log.

Actually it is sent to the log. It was printed in both the log and the session and was signalled but inadvertently disappeared from the session and stopped signalling when it was emphasised by request by being boxed. (technical detail - messages starting in '!' cause the latter two events but boxing hides the '!' with a |')

Currently this is what appears in the log.

2020-09-11 07:52:42 .-------------------------------------. 2020-09-11 07:52:42 |!!! Trapped error in Startup - fred 0| 2020-09-11 07:52:42 '-------------------------------------'

Will correct at weekend.

aplteam commented 4 years ago

I tried again after having read Phil's post. Indeed it shows in the log. Even if I create sort of a value error (typo in the name) it is reported.

It's a mystery right now, but I can only say I surely looked at the log.

PhilLast commented 4 years ago

Having examined code will change this to include ⎕DM with only the latter boxed to reinstate the signalling.

2020-09-11 08:39:24 !!! Trapped error in Startup - fred 0
2020-09-11 08:39:24 .------------.
2020-09-11 08:39:24 |SYNTAX ERROR|
2020-09-11 08:39:24 |fred[1] .   |
2020-09-11 08:39:24 |         ∧  |
2020-09-11 08:39:24 '------------'
PhilLast commented 4 years ago

Done that.

      )clear
clear ws
      ]openproject testStartup
Please wait - Reading 3 files from .../acreProjects/testStartup
!!! Trapped error in Startup - testStartup 0
.------------------.
|SYNTAX ERROR      |
|testStartup[1] .  |
|                 ∧|
'------------------'
* Command Execution Failed: