Skip to content

[7.0] Add a more helpful error message when validator init fails#111

Open
PaintNinja wants to merge 1 commit intoMinecraftForge:masterfrom
PaintNinja:7.0-better-ap-init-error
Open

[7.0] Add a more helpful error message when validator init fails#111
PaintNinja wants to merge 1 commit intoMinecraftForge:masterfrom
PaintNinja:7.0-better-ap-init-error

Conversation

@PaintNinja
Copy link
Copy Markdown
Contributor

Fixes #109. Thanks to @basdxz for finding the root cause of the issue.

@PaintNinja PaintNinja changed the title [7.0]Add a more helpful error message when validator init fails [7.0] Add a more helpful error message when validator init fails Apr 6, 2026
@LexManos
Copy link
Copy Markdown
Member

LexManos commented Apr 6, 2026

Instead of throwing an error, would it be better to allow the annotation processor to be applied (since we do it by default in the mdk) and just disable itself if it detects this case?

@PaintNinja
Copy link
Copy Markdown
Contributor Author

Possibly, but you'd still be paying the overhead of the compiler setting up the AP environment and sending each source file to it.

The MDK is unaffected by this issue as far as I'm aware, as Forge transitively includes EventBus and there's no module-info in the MDK. To trigger the issue, you need to run the AP on a project that is missing EventBus or where the project being validated has an explicit module but missing requires statement.

@LexManos
Copy link
Copy Markdown
Member

LexManos commented Apr 6, 2026

Fair enough. Haven't looked into this part of the compiler so not sure how much of a cost it is vs having no APs.

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

Successfully merging this pull request may close these issues.

Validator Error on empty class in explicit module without a requires on EB

2 participants