vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Dependency issue with the extension for Iceberg Apache project

Open pvary opened this issue 7 months ago • 2 comments

Trying to use VSCode with the extension to build/test the Apache Iceberg project, but the dependency handling is not working as expected. The gradle projects view shows all the gradle projects in Iceberg, and the dependencies are correctly highlighted.

OTOH when I try to open I got Java errors, like:

[{
	"resource": "/workspaces/iceberg/aliyun",
	"owner": "_generated_diagnostic_collection_name_#5",
	"code": "0",
	"severity": 8,
	"message": "The project was not built due to \"aliyun does not exist\". Fix the problem, then try refreshing this project and building it since it may be inconsistent",
	"source": "Java",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 1
}]

It might be an issue how the dependecies are handled, as the project has a aliyun directory, which contains a sub-project called: iceberg-aliyun

Repro PR: https://github.com/apache/iceberg/pull/13034

Any suggestions, ideas to make this work would be helpful. Thanks, Peter

pvary avatar May 14 '25 15:05 pvary

I tried importing the project locally and there's definitely a lot of errors. Not the one you're mentioning but way too many others. I noticed that mainly it fails to resolve artifacts that have been "relocated". Could you try also installing Gradle for Java. This contains the Gradle build server capability, which builds differently from the out-of-box support provided in vscode-java. However, vscode-java is able to delegate to it if its presence is detected.

More details about it are at https://devblogs.microsoft.com/java/new-build-server-for-gradle/ .

rgrunber avatar May 15 '25 15:05 rgrunber

Hi, I'm also looking at this with @pvary (see https://github.com/apache/iceberg/pull/13034).

We were playing with a devcontainer setup. The gradle extension is installed via the java language extension pack.

Gradle is able to load things. However, the redhat.java extension is not.

There are further details here: https://github.com/apache/iceberg/pull/13034#issuecomment-2884284949

It almost seems like the redhat.java plugin isn't able to handle the project renames (e.g., aliyun --> iceberg-aliyun: https://github.com/apache/iceberg/blob/31c315f695aad544a096a5a2ffdde54a97b90b28/settings.gradle#L52), though from my understanding it was supposed to receive project information from the gradle extension, which appears to be working, so ... 🤷

bpkroth avatar May 15 '25 15:05 bpkroth