Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since v0.0.12 vscode does not find modules #139

Open
miqmago opened this issue Jan 8, 2023 · 3 comments
Open

Since v0.0.12 vscode does not find modules #139

miqmago opened this issue Jan 8, 2023 · 3 comments

Comments

@miqmago
Copy link

miqmago commented Jan 8, 2023

With gradle 7.6 I had to downgrade to v0.0.11 in vscode.

Since v0.0.12 the application compiles and runs fine but vscode throws multiple errors:

module-info.java:

open module myGradle {
    requires javafx.controls;
    requires javafx.fxml;
    requires transitive javafx.graphics;
    ...
}

Errors:

  • javafx.controls cannot be resolved to a module Java(8389908)
  • javafx.fxml cannot be resolved to a module Java(8389908)
  • javafx.graphics cannot be resolved to a module Java(8389908)

In App.java:

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
...

Errors:

  • The type javafx.fxml.FXMLLoader is not accessible Java(16778666)
  • The type javafx.application.Application is not accessible Java(16778666)
  • ...
@megabyte6
Copy link

Same.
I'm still stuck on v0.0.11 because I couldn't use any later version no matter what I tried.
Is it an issue with VSCode or one of its plugins? Or is it the gradle plugin / gradle dependency manager?

@turlingdrome
Copy link

turlingdrome commented Apr 4, 2023

Same.

plugins {
    id 'org.openjfx.javafxplugin' version '0.0.13'
}

Setting the plugin to v0.0.12 or v.0.0.13 causes VSCode to report visibility errors for code provided by modules, not only the JavaFx classes. Example of the error: The type javafx.geometry.Insets is not accessible Java(16778666)

Reverting back to v0.0.11, the errors disappear (after running Clean Workspace>Reload and delete on the Java project).

Moving to v0.0.13 is necessary to avoid deprecated attributes now removed in Gradle 8.0, so this issue is becoming a block on upgrading Gradle.

I note that commit 02d36b8 updated the org.javamodularity:moduleplugin from 1.8.2 to 1.8.10, and that this is being bumped again to 1.8.12 in the upcoming v0.0.14 via issue #138. Need to see if that helps!

@megabyte6
Copy link

It seems to be an issue with the upstream Eclipse language server that's being used for vscode's java plugin.

Here are a couple temporary solutions I found online:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants