-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8293977: jdk/modules/etc/VerifyModuleDelegation.java fail with jfx #10328
Conversation
👋 Welcome back lzhai! A progress list of the required criteria for merging this PR into |
@xiangzhai The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
I don't think the test should be changed until there is more information on the issue. jdk.unsupported.desktop should be mapped to the application class loader. Can you tell use which class loader that javafx.swing is mapped to? Has the module-loader-map.conf changed in your environment? I'm wondering if there is any residual configuration somewhere that is mapping the javafx.* modules the platform class loader. |
Hi @AlanBateman Thanks for your kind response!
According to the output:
app as the
Nope. https://github.com/loongson/jdk/blame/loongarch-port/make/conf/module-loader-map.conf And @dumasun also reproduced the issue for x86_64. Perhaps she could provide more information. Thanks, |
There must be configuration somewhere that is mapping the javafx.* modules to the platform class loader So I think the test is doing its job and has found an issue. Hopefully your colleague can provide more Info. |
The replication step on x86:
test inputs: Thanks, |
Is jdk-fx-jdk-20+15-56-g4020ed53dd6-linux_x64 your build or is it coming from somewhere else? Also can you confirm that make/conf/module-loader-map.conf has not been edit to map the javafx.* modules to the platform class loader? |
yes, jdk-fx-jdk-20+15-56-g4020ed53dd6-linux_x64 my build Is there something wrong with the way I test?
I donot edit make/conf/module-loader-map.conf. |
@magicus @kevinrushforth In the distant past, the javafx.* modules were mapped to the platform class loader. Do you recall how that worked with configure --with-import-modules? If someone uses jlink to create a run-time image that includes the javafx.* modules then they will be mapped to the application class loader. Somehow, using --with-import-modules we seem to end up with these modules in the value of PLATFORM_MODULE_NAMES used by build. I'm wondering if there is some residual configuration somewhere. |
I haven't built a JDK using the
I would guess that |
Thanks for this. In make/common/Modules.gmk, ReadSingleImportMetaData is adding to PLATFORM_MODULES. So I think this needs to re-examined as there should be no reason to have imported modules mapped to the boot or platform class loaders now. |
In that case, a solution might be to remove
or
|
Thanks for your hint! @dumasun is building jfx with the quick debug patch:
Thanks, |
jdk/modules/etc/VerifyModuleDelegation.java has passed for building jfx with the debug patch.
|
Thanks for your patch! So I will close this PR. Then create a new PR for the jfx repository instead? or just wait JDK-8294095. Also thank @dumasun for your good job! Cheers, |
@AlanBateman While this particular issue was closed now, this is perhaps yet another indication that the "import modules" thing is causing problems, and should be removed now that it is not used anymore. I created JDK-8294095 to explore this possibility. |
Other than the issue of adding the imported FX modules in the platform classes, they are successfully using the "import modules" feature. I don't see why it needs to be removed. |
See JDK-8294095 for a discussion on the rationale. In short, it is because imported modules are intrusive in the build system, and it advertises a kind of "generality" that it is not designed for. |
configure --with-import-modules is of its time. It probably should have been removed in JDK 11 but there are people using it now so I think we are stuck with it. It's way more intrusive than it should be. JDK 9/10 had its need but things have moved on significantly. So if it stays then maybe it could be changed so that the imported modules do not participate in the mapping to class loaders or the hashing. Instead, the import could just provide input into the jlink command used to create the final images. That should be a lot less intrusive and would give us the nice property that it would be equivalent to running jlink outside of the JDK build that produces a run-time image that contains the JavaFX or other imported modules. |
Hi,
@dumasun reported the issue:
Configured with jfx-ls-modular-sdk:
make run-test CONF=fastdebug TEST="jdk/modules/etc/VerifyModuleDelegation.java"
failed:Thanks,
Leslie Zhai
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10328/head:pull/10328
$ git checkout pull/10328
Update a local copy of the PR:
$ git checkout pull/10328
$ git pull https://git.openjdk.org/jdk pull/10328/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10328
View PR using the GUI difftool:
$ git pr show -t 10328
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10328.diff