codefori / codefori/vscode-ibmi

TypeError: Cannot read properties of undefined (reading 'library') when a PASE Action contains *EVENTF

Open
#3,410 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
418
Forks
160
Avg merge
4d 19h
Merged PRs (30d)
12

Description

### Summary

When an Action with `"environment": "pase"` contains `*EVENTF` in its command string, the extension throws an unhandled `TypeError` instead of loading the EVFEVENT file or reporting that it could not locate it. No diagnostics reach the Problems view, and the exception is the only feedback the user gets.

The documented lookup strategies for EVFEVENT do not appear to be reachable for PASE Actions. An identical compile issued through an ILE Action works correctly.

### Reproduction

Source `qtestsrc/test.pgm.rpgle`, deliberately broken so the compiler emits severity 30:

```
**free
ctl-opt option(*nodebugio:*srcstmt);
dcl-pi *n;
end-pi;
*inLR = TRUE; // TRUE is not defined -> RNF7030
return;
```

### Action that fails:

```
{
"extensions": ["GLOBAL"],
"name": "(make) Compile selected",
"command": "/QOpenSys/pkgs/bin/make &BASENAME BRANCH=&BRANCH ERR=*EVENTF",
"environment": "pase",
"deployFirst": true,
"type": "file"
}
```

### Output:

```
Running Action: (make) Compile selected
Working directory: /home/pg_leszek/builds/stream-m-cau
Commands:
/QOpenSys/pkgs/bin/make test.pgm.rpgle BRANCH=... ERR=*EVENTF
system "CRTRPGMOD MODULE(VSC2C28CA6/TEST) SRCSTMF('qtestsrc/test.pgm.rpgle') OPTION(*EVENTF *NODEBUGIO *SRCSTMT) ..."
RNS9308: Compilation stopped. Severity 30 errors found in program.
RNS9309: Compilation failed. Module TEST not created in library VSC2C28CA6.
make: *** [Makefile:310: test.pgm.rpgle] Error 255
TypeError: Cannot read properties of undefined (reading 'library')
```

The EVFEVENT member is created correctly — `VSC2C28CA6/EVFEVENT(TEST)`:

```
TIMESTAMP 0 20260811213638
PROCESSOR 0 000 1
FILEID 0 001 000000 059 /home/PG_LESZEK/builds/stream-m-cau/qtestsrc/test.pgm.rpgle 20260811213628 0
ERROR 0 001 1 000007 000007 009 000007 012 RNF7030 S 30 042 The name or indicator TRUE is not defined.
ERROR 0 001 1 000007 000007 009 000007 012 RNF7503 S 30 051 Expression contains an operand that is not defined.
ERROR 0 001 0 000000 000000 000 000000 000 RNS9308 T 50 057 Compilation stopped. Severity 30 errors found in program.
FILEEND 0 001 000009
```

### What was tried

Following the "EVFEVENT / Problems view" section of the docs:

1. `EVFEVENT: LIBRARY/OBJECT` message. Emitted from the Makefile via echo; visible in the Action output. → still TypeError. Presumably the extension reads the joblog, which an SSH/PASE Action does not return.

2. `MODULE(LIBRARY/OBJECT)` in the Action command. Injected as an unused make variable so the literal appears in the command string:
`make &BASENAME ... ERR=*EVENTF EVF='MODULE(&CURLIB/&NAME)'`, resolving to `MODULE(VSC2C28CA6/TEST)` — correct library, correct object, correct case. → still `TypeError`.
3. Same compile via an ILE Action (`CRTBNDRPG PGM(&CURLIB/&NAME) ... OPTION(*EVENTF)`), same library, same object name. → works, Problems view populated.

The library is known to the extension (it is the configured current library), so the information needed is available — it just never reaches the EVFEVENT lookup for PASE Actions.

### Expected behaviour

Two things, in order of importance:

1. No unhandled exception. If the EVFEVENT location cannot be determined, the extension should log a clear warning naming what it looked for, not throw a `TypeError`.

2. A supported way to point at the EVFEVENT member for build-system-driven compiles (make).

Optionally, honouring the EVFEVENT: marker on stdout for PASE Actions would cover this case with no new configuration.


|Context|Version|
|-|-|
|Code for IBM i version|3.0.12|
|Visual Studio Code version|1.130.0|
|Operating System|win32_x64|

Active extensions

```
Azure Resources (vscode-azureresourcegroups): 0.12.7
Bob Cozzi's CL Prompter and Formatter for IBM i (clprompter): 1.0.16
Bob Cozzi's IBM i RPGLE / RPG IV to RPG Free Format (rpgiv2free): 1.12.44
CL (vscode-clle): 1.2.6
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 10.0.0
Db2 for IBM i (vscode-db2i): 2.0.2
ESLint (vscode-eslint): 3.0.34
Emmet (emmet): 10.0.0
Error Lens (errorlens): 3.28.0
Extension Authoring (extension-editing): 10.0.0
Git (git): 10.0.0
Git Base (git-base): 10.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
IBM i Debug (ibmidebug): 3.0.4
IBM i FileSystem (vscode-ibmi-fs): 1.0.7
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.5
IBM i Renderer (vscode-displayfile): 0.1.3
IBM i Testing (vscode-ibmi-testing): 1.3.4
JSON Language Features (json-language-features): 10.0.0
JavaScript and TypeScript Language Features (typescript-language-features): 10.0.0
Merge Conflict (merge-conflict): 10.0.0
Microsoft Account (microsoft-authentication): 0.0.1
NPM support for VS Code (npm): 10.0.0
Node Debug Auto-attach (debug-auto-launch): 10.0.0
RPGLE (vscode-rpgle): 0.33.9
Remote - SSH (remote-ssh): 0.106.2
Remote - Tunnels (remote-server): 1.5.3
Remote Explorer (remote-explorer): 0.5.0
Server Ready Action (debug-server-ready): 10.0.0
Terminal Suggest for VS Code (terminal-suggest): 1.0.1
YAML (vscode-yaml): 1.24.0
```


Remote system

|Setting|Value|
|-|-|
|IBM i OS|V7R5M0|
|Tech Refresh|7|
|CCSID Origin|870|
|Runtime CCSID|870|
|SQL runner|Yes|
|SQL|Enabled
|Source dates|Enabled

### Enabled features

|/QOpenSys/pkgs/bin|/usr/bin|/QOpenSys/usr/bin|/QIBM/ProdData/IBMiDebugService/bin|/QOpenSys/QIBM/ProdData/JavaVM/jdk80|/QOpenSys/QIBM/ProdData/JavaVM/jdk11|
|-|-|-|-|-|-|
|bash|attr|openssl|startDebugService.sh|64bit|64bit|
|find|iconv|||||
|git|setccsid|||||
|grep|uname|||||
|ls||||||
|md5sum||||||
|sha256sum||||||
|sort||||||
|stat||||||
|tar||||||

Shell env

```bash
BUILDLIB=VSC2C28CA6
CURLIB=VSC2C28CA6
HOME=/home/PG_LESZEK
HOST=nsdrtst.intra.kdpw.com.pl
LIBLS=QTEMP QGPL MCAUDEV VSC2C28CA6
LOGIN=pg_leszek
LOGNAME=pg_leszek
MAIL=/var/spool/mail/pg_leszek
OLDPWD=/home/PG_LESZEK
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/QOpenSys/usr/bin:/usr/bin
PWD=/home/PG_LESZEK
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.250.249.122 60239 22
SSH_CONNECTION=10.250.249.122 60239 10.250.50.129 22
TZ=-1,M3.5.0,M10.5.0/03:00:00
USER=pg_leszek
USERNAME=pg_leszek
WORKDIR=/home/PG_LESZEK
_=/QOpenSys/pkgs/bin/env
```

Variants

```json
{
"american": "#@$",
"local": "#@$",
"qsysNameRegex": {}
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the PASE Action with ERR=*EVENTF and compare its EVFEVENT lookup path with the working ILE Action path. Trace the EVFEVENT lookup and Problems view handling, then verify that an unavailable location produces a clear warning rather than a TypeError and that a supported location or stdout marker loads diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.