quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.36k stars 2.56k forks source link

Report actionable error when extension `@Recorder` is in the wrong module. #27550

Closed kdubb closed 1 year ago

kdubb commented 1 year ago

Description

When building an extension that uses a Recorder for runtime initialization and that recorder is in the deployment module it reports LinkageErrors with no context to help fix the issue.

Apparently this is an incorrect configuration. The build should check and report this with a build error that lets the user know how to fix it.

Suggested error:

Runtime recorders must be in an extension's runtime module, `MyExtensionRecorder` is located in the deployment module.

Implementation ideas

No response

kdubb commented 1 year ago

You can see the error(s) on this branch. Run maven install in the OpenFGA client extension.

quarkus-bot[bot] commented 1 year ago

/cc @Sanne, @aloubyansky, @gsmet, @radcortez, @stuartwdouglas