Closed kraabrsg closed 3 weeks ago
@kraabrsg reviewing your log file I am not certain I follow what is happening. You are opening a COBOL file, but the I see requests such as languageClient/stop
for language":"pl1"
six times although no PL/I file was opened. Finally I see IBM Z Open Editor extension has been deactivated for a restart.
, which will trigger cleanup of any temp folders created so far, which probably causes the error. (You can use the setting zowe.files.temporaryDownloadsFolder.cleanup
to prevent that.) Somehow though the COBOL language server process is still requesting files even though the editor is in shutdown mode. It seems that files that get downloaded might be deleted as part of that shutdown making the copybooks downloads random.
Why are you trying to shutdown our PL/I language server when you are editing COBOL programs? If you are editing Pl/I with a competitor product I recommend using a VS Code profile that does not have our extension installed and when editing COBOL use a different VS Code profile that uses our extension as is. (Or use my colleagues recommendation from the other issue of overriding the files associations so that our language server does not start.)
One more observation about the ZAPP file. I do not recommend pointing to copybook folders outside of the workspace in which the ZAPP file is located. All pathnames should be subfolders of the ZAPP file location. If the copybooks are in another workspace then there should be another ZAPP file in that workspace pointing to the subfolder there. Other users might be constructing their multi-root workspaces in different way storing the workspaces in different relative locations and then the ZAPP file path that has a relative path to parent folders will not work.
Hi @phaumer thanks for getting back on this.
Why are you trying to shutdown our PL/I language server when you are editing COBOL programs?
Well we have our own made pli extension (e.g. because of preprocessor, where is a programm used, hover for plibuiltin keywords to provide description etc.,), not a competitor product. With several extension, and an installer via a command the user can choose what to install (cobol, or pli, or both, alongside other options). We choosed to used the file associations, or better said, we changed the id of our pli language implementation...
As for the ZAPP files we have it now working. We have two local folders in the zapp file. The first is a user syncronized folder from the mainframe(pds). The other is a somewhat global folder, where we do a quick parse of cobol copybooks and load them locally from a server. This avoids mainframe requests via zosmf.
If we had to add mvs pds we need to tweak with your mentioned setting:
zowe.files.temporaryDownloadsFolder.cleanup
(thanks for that tip!)
Folder with workspacefile
.vscode folder
folder containing subfolder with user sync pds
cobol copybook folder 1
subfolder containing zapp file
zapp.json locations: "../.vscode/INC"
etc...
Closing this issue for now as the workaround is reassigning the file extensions to different language ids.
Development environment used
java -version
and paste the details here): echo %java_home% -> openjdk 17.0.2Problem Description
Detailed steps for reproducing the problem:
When opening a cobol file not all of the copybooks get parsed, it is rather random which copybooks are found. A correct zapp file is placed in the first folder, in a multiroot workspace.
zapp file
debug log:
errors, also mentionend in other github issues:
Files in the local folder are always found, but not the copybooks on the mainframe (after taking a look into this topic again, and it seems that the copybooks are missing because of
ZoweResourceResolver.downloadMVSDataset(RequestId:wnfwb): Error renaming temporary download file
see also screenshot above ) ...Is there a way to trigger a reparse from our custom vscode extension ? We are now doing
commands.executeCommand('zopeneditor.zapp.compiler.options.change');
(because we copy some copybooks from a server and that is after the cobol parser has parsed the file)
Thank you!