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

Macro annotation information in yaml files next steps #3923

Open
davidmorgan opened this issue Jun 19, 2024 · 3 comments
Open

Macro annotation information in yaml files next steps #3923

davidmorgan opened this issue Jun 19, 2024 · 3 comments
Labels
static-metaprogramming Issues related to static metaprogramming

Comments

@davidmorgan
Copy link
Contributor

Per #3728 there is a plan to pull macro data--information about which annotations trigger macro execution, and exactly what they trigger--into yaml files and from there into package_config.json so it's available to all the tools.

That discussion hasn't quite finished yet but it does seem we know enough to start looking at how to build it.

@jakemac53 suggested talking to the pub team :)

@jonasfj who would be a good person to talk to, please?

Assuming the feature makes sense and gets approved :) I guess we'll need some specification for the new yaml, then new code so that the information ends up in package_config.json and more new code to usefully read it from there.

I mention now because I'll be in AAR next Mon + Tue (morning only) in case that gives an opportunity to discuss in person.

Thanks.

@davidmorgan davidmorgan added static-metaprogramming Issues related to static metaprogramming size-medium labels Jun 19, 2024
@davidmorgan davidmorgan added this to the Macros Breaking Changes milestone Jun 19, 2024
@bwilkerson
Copy link
Member

We will likely want to extend some IDE functionality to better support this (after the format is stable). For example, we currently support code completion in both the pubspec.yaml and analysis_options.yaml files, so it seems reasonable to support it in this file as well. We also have error checking for both existing files, so it might (depending on the data in the file) make sense to error check this file as well (things like valid file paths, for example).

@davidmorgan
Copy link
Contributor Author

Thanks Brian. The details aren't finalized yet as to whether there will be any new files, or just pack everything into existing pubspec.yaml and package_config.json. Either way, yes, there are likely to be IDE considerations. Thanks!

@davidmorgan davidmorgan removed this from the Macros Breaking Changes milestone Jun 27, 2024
@davidmorgan
Copy link
Contributor Author

@jonasfj and I chatted about this one.

Jonas has an old proposal for adding a key+value config to pubspec.yaml+package_config.json that seems like a surprisingly good fit.

Jonas, could you please share that doc w/Jake and I? I can't find it :) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static-metaprogramming Issues related to static metaprogramming
2 participants