Skip to content

@NamedInterface not detected on composed annotation #1139

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

Closed
ajax-semenov-y opened this issue Apr 4, 2025 · 3 comments
Closed

@NamedInterface not detected on composed annotation #1139

ajax-semenov-y opened this issue Apr 4, 2025 · 3 comments
Assignees
Labels
in: core Core module meta model type: bug Something isn't working
Milestone

Comments

@ajax-semenov-y
Copy link

ajax-semenov-y commented Apr 4, 2025

Hello.

I have created a wrapper annotation for the @NamedInterface annotation, which looks like this:

@NamedInterface("module-api")
annotation class ModuleApi

When I annotate a class with @ModuleApi, it does not recognize it as marked with @NamedInterface, causing the test to fail.

@odrotbohm as you recommended in #1118 (comment) I've tested this with 1.3.4 and it still does not work. I've created a reproduce: https://github.com/ajax-semenov-y/spring-modulith-issue/tree/named-interface-inheritance (Please make sure to check out the named-interface-inheritance branch).

This reproduce consists of three modules: module-a, module-b, and module-c. Module-a utilizes the ModuleA class from module-a, which is annotated with @ModuleApi. Running the test located in ApplicationArchUnitTest in the root src will result in failure. If you replace @ModuleApi with @NamedInterface, the test will pass.

@odrotbohm
Copy link
Member

Lovely, thanks for that! I'll have a look ASAP.

@odrotbohm odrotbohm self-assigned this Apr 4, 2025
@odrotbohm odrotbohm added in: core Core module meta model type: bug Something isn't working labels Apr 4, 2025
@odrotbohm odrotbohm changed the title The @NamedInterface does not work as a meta-annotation. @NamedInterface not detected on composed annotation Apr 4, 2025
@odrotbohm odrotbohm added this to the 1.4 RC1 milestone Apr 4, 2025
@odrotbohm
Copy link
Member

This is fixed in the 1.4 snapshots and back-ported into 1.3 and 1.2.

@ajax-semenov-y
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Core module meta model type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants