Skip to content

Allow Module Load errors to be suppressed#2694

Closed
ChadKillingsworth wants to merge 1 commit intogoogle:masterfrom
ChadKillingsworth:module-load-warning
Closed

Allow Module Load errors to be suppressed#2694
ChadKillingsworth wants to merge 1 commit intogoogle:masterfrom
ChadKillingsworth:module-load-warning

Conversation

@ChadKillingsworth
Copy link
Copy Markdown
Contributor

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.

+ "visibility";

public static final DiagnosticGroup COMMON_JS_MODULE_LOAD =
DiagnosticGroups.registerGroup("commonJsModuleLoad",
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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