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

Add support for Deprecated annotation #82

Open
jwoertink opened this issue Aug 14, 2023 · 1 comment
Open

Add support for Deprecated annotation #82

jwoertink opened this issue Aug 14, 2023 · 1 comment
Labels
feature request A new requested feature / option hacktoberfest Valid Issue for Hacktoberfest

Comments

@jwoertink
Copy link
Member

You may have a setting you want to deprecate:

@[Deprecate("This is no longer used")]
setting old_setting : String
@jwoertink jwoertink added the feature request A new requested feature / option label Aug 14, 2023
@jwoertink jwoertink changed the title Add support go Deprecated annotation Add support for Deprecated annotation Sep 15, 2023
@jwoertink
Copy link
Member Author

Turns out that this is not currently possible to do without a major refactor. Crystal has no way to detect annotations on a macro calls. So this annotation would have to be attached to a method, or instance variable, or module.

A "hack" could be something like this

macro setting(decl, ....)
  module MACRO_SETTING__%temp
  end

  {% ..... << {annotations:  MACRO_SETTING__%temp.resolve.annotations }%}
end

but this would also lead to some other issues... so for now I'll just have to figure out how to refactor this whole deal.

@jwoertink jwoertink added the hacktoberfest Valid Issue for Hacktoberfest label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new requested feature / option hacktoberfest Valid Issue for Hacktoberfest
Projects
None yet
Development

No branches or pull requests

1 participant