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

Export dtfj packages required for plugins #17064

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

pshipton
Copy link
Member

@pshipton pshipton commented Mar 29, 2023

Issue #16783

A test plugin installed via -Dcom.ibm.java.diagnostics.plugins uses the following classes:

import com.ibm.java.diagnostics.utils.IContext;
import com.ibm.java.diagnostics.utils.commands.BaseCommand;
import com.ibm.java.diagnostics.utils.commands.CommandException;
import com.ibm.java.diagnostics.utils.plugins.DTFJPlugin;

@pshipton
Copy link
Member Author

pshipton commented Mar 29, 2023

@keithc-ca I'm checking with Manqing if there are additional packages we should export, but what I've exported so far is enough to run the summaryInfo test plugin. Checking if you have any initial feedback.

@@ -29,7 +29,7 @@
requires openj9.dtfj;
requires java.logging;

exports com.ibm.jvm.dtfjview.commands to openj9.dtfj;
exports com.ibm.jvm.dtfjview.commands;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable, but I don't see any use in openj9.dtfj (as should be the case, otherwise there's a dependency cycle involving the two modules), so I don't know why it was added in the first place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further reflection, I'm reluctant to make this change. I think plugin commands should extend com.ibm.java.diagnostics.utils.commands.BaseCommand instead of com.ibm.jvm.dtfjview.commands.BaseJdmpviewCommand.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. I've made the update and confirmed a plugin that subclasses BaseCommand instead of BaseJdmpviewCommand still works.

@pshipton
Copy link
Member Author

pshipton commented Mar 30, 2023

Manqing didn't have any additional packages being used for a -Dcom.ibm.java.diagnostics.plugins plugin.

@pshipton pshipton marked this pull request as ready for review March 30, 2023 12:50
@pshipton pshipton changed the title Export dtfj, dtfjview packages used by plugins Export dtfj packages required for plugins Mar 30, 2023
@pshipton pshipton marked this pull request as draft March 30, 2023 17:50
@pshipton pshipton marked this pull request as ready for review March 30, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants