vscode-rpgle
vscode-rpgle copied to clipboard
Parsing of copybook members with dots in the name
Describe the bug We have a few copybooks that have a dot in the name, DATEUTL.PR and DATEUTL.DS are two of the most used copybook. I noticed that the log is showing it having trouble opening the member; it's not the correct member name.
To Reproduce Steps to reproduce the behavior:
- Create a member with a dot in the name.
- Open RPGLE source and add a line for the copybook member.
- Look at the Code for IBM i log, you may have to close and reopen the RPGLE member.
- Search if you have to for
SELECT LENGTH(srcdta) as LENGTH FROM ILEDITOR.[yourlib_yoursrcf_yourmbr] limit 1
Expected behavior Open the members with dots in their names.
Screenshots
Environment (please complete the following information):
- Extension version 1.3.1
- IBM i OS version 7.3
Additional context I can understand the problem might be scanning for the dot and stopping. Maybe there is a scan from the right regexp that can be used. I am wondering if this is a cause of a problem I have been trying to identify for an issue where the outline is not producing for some members. There are some cases when opening a member with the member that has a dot in its name is the last log entry.
What a fun bug! I will look into this.
@m-tyler Any chance you can provide a code sample for this so I can create a unit test for it?
#VS Code - Code for IBM i - Log - Case #.txt VSCCFII89.RPGLE.TXT
A source member that will recreate and the log (with extra stuff) that shows it creating the alias with the wrong name.
It can be any pattern of dot in the name and the copy member does not have to exist.
@m-tyler is this still an issue with newer versions of the language extension?
The member name is parse correctly now.