Skip to content

Implement rule deprecation mechanism#829

Open
Sija wants to merge 5 commits into
masterfrom
implement-rules-deprecation
Open

Implement rule deprecation mechanism#829
Sija wants to merge 5 commits into
masterfrom
implement-rules-deprecation

Conversation

@Sija
Copy link
Copy Markdown
Member

@Sija Sija commented May 21, 2026

Refs #765

@Sija Sija self-assigned this May 21, 2026
@Sija
Copy link
Copy Markdown
Member Author

Sija commented May 21, 2026

Using Deprecated annotation seems neat, yet while this works, I'm not happy about the fact that deprecated class warnings show up when running specs or building the binary, and I'm not sure yet how to resolve this issue.

@veelenga @nobodywasishere @straight-shoota WDYT?

@Sija Sija changed the title Implement rules deprecation Implement rules deprecation mechanism May 21, 2026
@Sija Sija changed the title Implement rules deprecation mechanism Implement rule deprecation mechanism May 21, 2026
@straight-shoota
Copy link
Copy Markdown
Contributor

Yeah, it feels like this might be at the wrong layer. That's similar to the API docs for the rules, which don't serve as developer documentation, but user documentation.

The distinction here is that using these classes in the Ameba API is not (necessarily) deprecated.
But using the rules in your Ameba configuration is.

Excluding deprecation warnings with --exclude-warnings src/ would be too broad, and there's no fine-grained warning management.

I believe it would easier overall to not use @[Deprecated] annotation. What's the benefit of that anyway?
We could use a custom annotation (@[Ameba::DeprecatedRule]) which would achieve basically the same thing.

@Sija
Copy link
Copy Markdown
Member Author

Sija commented May 21, 2026

We could use a custom annotation (@[Ameba::DeprecatedRule]) which would achieve basically the same thing.

Good idea! I've updated the code with your suggestion.

@Sija Sija added the feature label May 21, 2026
@Sija Sija force-pushed the implement-rules-deprecation branch from e8dd7ec to 1586dc7 Compare May 22, 2026 00:06
@Sija Sija marked this pull request as ready for review May 22, 2026 00:07
@Sija Sija requested review from nobodywasishere and veelenga May 22, 2026 00:07
@Sija Sija force-pushed the implement-rules-deprecation branch from c800790 to b9b0922 Compare May 22, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants