Listen for EVFEVENT signals from server #2926
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This PR will make C4i check the joblog after an action command has run for information about EVFEVENT file.
The joblog is checked for messages starting with
EVFEVENT:
, and if found, will extract the library and object from the message text.This allows the server to tell C4i where the object was created and thus where the EVFEVENT file is located.
This change comes from a discussion in issue #2910 about building using a build tool on the IBM i, where the build tool may determine the target library. The change allows for better locating the EVFEVENT files generated and thus better diagnostics handling.
How to test this PR
Test setup:
testcl.clle
containing a deliberate error, e.g.dcl &var *charX 1
TEST1
with the following command:CRTBNDCL QRPLOBJ/&NAME SRCSTMF('&FULLPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE)
(This action will prohibit C4i from extracting the library and object since
PGM()
is missing, simulating a user build command.)TEST1
intoTEST2
and insert the following command before the line containingCRTBNDCL...
:runsql 'call SYSTOOLS.LPRINTF( ''EVFEVENT: QRPLOBJ ,testcl'' )' commit(*none)
(This action will add a message to the joblog, indicating the location of the EVFEVENT file.)
QGPL
Test on branch
master
:rmvm qgpl/evfevent testcl
TEST1
on sourcetestcl.clle
. The action will fail and no diagnostics are shown. This error will appear:rmvm qgpl/evfevent testcl
TEST2
on sourcetestcl.clle
. Same result as in step 2.Test on this branch/PR:
rmvm qgpl/evfevent testcl
TEST1
on sourcetestcl.clle
. The action will still fail and diagnostics are still not shown.rmvm qgpl/evfevent testcl
TEST2
on sourcetestcl.clle
. The action will still fail, but diagnostics are now shown!Checklist
console.log
s I added