Skip to content
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

Deprecate TypeNode#has_attribute? and remove references to "attribute" #9950

Merged
merged 3 commits into from Jan 19, 2021

Conversation

HertzDevil
Copy link
Contributor

Resolves #9943.

@straight-shoota
Copy link
Member

TypeNode#has_attribute? is part of the public API and would need to be deprecated before complete removal. So the documentation should stay (supplemented by @[Deprecated("Use #annotation instead")]), and the implementation should issue a deprecation notice.
The implementation can be based on annotation, the AST methods can be removed right away.

@HertzDevil
Copy link
Contributor Author

If there is a better way of reporting warnings from the macro interpreter please let me know (Crystal is able to report deprecated macros defined in Crystal code, but src/compiler/crystal/macros.cr is purely documentation and doesn't actually define these methods).

@HertzDevil HertzDevil changed the title Remove TypeNode#has_attribute? and references to "attribute" Deprecate TypeNode#has_attribute? and remove references to "attribute" Nov 21, 2020
@bcardiff bcardiff added this to the 0.36.0 milestone Jan 18, 2021
@bcardiff bcardiff merged commit 92fc087 into crystal-lang:master Jan 19, 2021
@HertzDevil HertzDevil deleted the refactor/remove-attributes branch January 27, 2021 07:43
@HertzDevil HertzDevil restored the refactor/remove-attributes branch January 27, 2021 07:44
@HertzDevil HertzDevil deleted the refactor/remove-attributes branch January 27, 2021 07:44
@HertzDevil HertzDevil restored the refactor/remove-attributes branch January 27, 2021 07:45
@HertzDevil HertzDevil deleted the refactor/remove-attributes branch January 27, 2021 07:46
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.

Replace attributes (e.g. TypeNode#has_attribute?) with annotations
3 participants