Hi,
We are migrating our Eclipse-based integration from SonarLint 10.x to SonarLint 11.x.
Our application works with mainframe COBOL source members stored in z/OS PDS/Datasets. These files are accessed through an Eclipse EFS provider and are exposed as Eclipse IFile resources. They are not local filesystem files and are not part of a Git repository.
With SonarLint 10.x, analysis works correctly.
After upgrading to SonarLint 11.x, analysis starts but fails with the following exception:
java.nio.file.FileSystemNotFoundException: Provider “zosfs” not installed
The stack trace shows the exception occurring in:
BackendInputFile.getPath()
Path.of(clientFile.getUri())
and also
GitUtils.blameFromNativeCommand()
Path.of(uri)
The analyzed resource URI looks like:
zosfs://host:port/DATASET/MEMBER?PDSMEMBER
From debugging, it appears that SonarLint 11 passes the zosfs:// URI into the backend process, where BackendInputFile.getPath() calls Path.of(uri). Since the backend JVM does not have a Java FileSystemProvider for the zosfs scheme, Path.of() throws FileSystemNotFoundException.
Has the handling of Eclipse EFS-backed resources changed between SonarLint 10.x and 11.x?
Is SonarLint 11.x expected to support analysis of Eclipse IFile resources backed by non-file:// URI schemes (such as mainframe datasets), or is there a recommended approach for Eclipse plugins to provide these resources for analysis?
Any guidance would be appreciated.
Thank you.
Hello @Shreyash0770,
Welcome to the Community!
This is a known limitation tracked internally in this development ticket. However it was canceled last year due to the complexity and low interest in the feature.
The FileSystemNotFoundException: Provider 'zosfs' not installed occurs because when SonarLint’s backend (which runs as a separate JVM process) tries to resolve a non-file:// URI to a java.nio.file.Path, the custom filesystem provider (zosfs) registered in Eclipse’s JVM is not available in the backend process, they’re separate runtimes.
A couple of questions that would help:
- Are you on SonarLint for Eclipse 11.x, or specifically which version? Could you test with the latest (12.3) to see if the behavior changes?
- When the exception is thrown, does analysis fail entirely, or do you still get some results with errors logged?
Best regards,
Stevan
Hello @Stevan Vanderwerf,
Yes, I have tested multiple versions.
SonarLint 10.0.1 works correctly in our environment.
Starting from 10.2 (I believe the architectural changes were introduced after 10.2), I see the same issue.
I also tested with 12.4, and the behavior is unchanged.
FYI, I have already updated the deprecated SonarLint APIs to the newer APIs introduced after 10.2.
However, after upgrading:
Some options, such as Analyze Changed Files, are missing.
The available analysis options do not work correctly.
Analysis fails entirely.
For example, when running Analyze, we get:
java.nio.file.FileSystemNotFoundException: Provider “zosfs” not installed
Our resources are mainframe COBOL members exposed as Eclipse IFile resources through an Eclipse EFS provider (zosfs://), so this prevents analysis from completing successfully.