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

Allow Module Load errors to be suppressed #2694

Closed

Conversation

ChadKillingsworth
Copy link
Collaborator

Recent changes promoted the ModuleLoader warnings for missing modules to errors. I need these to be suppressible now for certain cases. This reworks the commonJsModuleLoad diagnostic group to be just a general moduleLoad group so that they can be managed.

@@ -149,8 +150,9 @@ public DiagnosticGroup forName(String name) {
+ "underscore, "
+ "visibility";

public static final DiagnosticGroup COMMON_JS_MODULE_LOAD =
DiagnosticGroups.registerGroup("commonJsModuleLoad",
Copy link
Contributor

Choose a reason for hiding this comment

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

If anyone already has @suppress {commonJsModuleLoad} in their code then they'll have to change it, right? We should mention that in the release notes when we bring this in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did consider that - just didn't like even more groups.

Alternatively I can add a new one and remove the commonJs specific one from the advertised list.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good, we can just note it in the release notes.

@MatrixFrog
Copy link
Contributor

As it happens, I recently had to add options.setWarningLevel(DiagnosticGroup.forType(ModuleLoader.LOAD_WARNING), CheckLevel.OFF); to fix an internal tool. Now we can change that to just reference this group :)

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

Successfully merging this pull request may close these issues.

3 participants