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 bootstrap script expects zero argument constructor #2189

Closed
TimWhiting opened this issue Apr 4, 2022 · 10 comments
Closed

Macro bootstrap script expects zero argument constructor #2189

TimWhiting opened this issue Apr 4, 2022 · 10 comments
Assignees
Labels
static-metaprogramming Issues related to static metaprogramming

Comments

@TimWhiting
Copy link

@jakemac53 I was experimenting with the macro example on the language repo and ran into an error in the bootstrap script assigning to this map. It seems that there is some support for macro arguments maybe(?), but this made it so I could not experiment with them.
Macro Function() --> Function is probably how it has to change.
https://github.com/dart-lang/sdk/blob/6d543de174a229597184ee2404b7d53e328d731c/pkg/_fe_analyzer_shared/lib/src/macros/bootstrap.dart#L173

@jakemac53
Copy link
Contributor

Yes, looks like that will need to change to just Function. The CFE also does not support arguments yet though (I know I saw a TODO in there recently).

@jakemac53
Copy link
Contributor

Note that this code is also currently being modified, probably want to wait until https://dart-review.googlesource.com/c/sdk/+/239466 lands to change this just to avoid more conflicts

@TimWhiting
Copy link
Author

Note that this code is also currently being modified, probably want to wait until https://dart-review.googlesource.com/c/sdk/+/239466 lands to change this just to avoid more conflicts

I'll let you make any changes here. I don't have a dart-sdk set up for contributing right now. Just didn't know if you were aware of this.

@jakemac53
Copy link
Contributor

I wasn't, although I am sure it would have come up once we tried to add the functionality to the CFE 👍 . But I can get ahead of things and fix it soon.

@devoncarew
Copy link
Member

@jakemac53 - where should we track issues related to macros? In the language repo? Here, as an issue in area-front-end?

@jakemac53 jakemac53 transferred this issue from dart-lang/sdk Apr 5, 2022
@jakemac53 jakemac53 added the static-metaprogramming Issues related to static metaprogramming label Apr 5, 2022
@jakemac53
Copy link
Contributor

I went ahead and moved this to the language repo, as that is where everything is currently tracked. Although this is more of an implementation thing and the change will be in the SDK. So we could create a label there or something? But it might be easier to keep everything in the language repo.

@devoncarew
Copy link
Member

Yeah, I think once we start productionizing things, we'll probably want an area-macros label in the sdk repo.

@jakemac53
Copy link
Contributor

That sounds good to me

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Apr 6, 2022
Bug:dart-lang/language#2189
Change-Id: I89978d216a906357938ad509e4b0e5e390abe6d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240420
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
@jakemac53
Copy link
Contributor

This should be fixed by https://dart-review.googlesource.com/c/sdk/+/240420

@jakemac53
Copy link
Contributor

(but note that the CFE still doesn't support it)

@jakemac53 jakemac53 self-assigned this May 8, 2023
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
Projects
Development

No branches or pull requests

3 participants