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] Declaring typedef not working and ruins macro generation #59717

Open
dsvishchov opened this issue Dec 14, 2024 · 1 comment
Open

[macro] Declaring typedef not working and ruins macro generation #59717

dsvishchov opened this issue Dec 14, 2024 · 1 comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. feature-macros Implementation of the macros feature pkg-json The json macro package type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@dsvishchov
Copy link

When trying to declare a simple typedef generation stops at typede when typing and ruins macros generation at a whole, so nothing works unless this statement is removed/commented out.

For example:
builder.declareType('Test', DeclarationCode.fromString('typedef Test = int;'));

Dart version: 3.6.0 (same behavior was on 3.5.3 as well)

Monosnap actionable dart — test_macro 2024-12-14 10-37-52
@dart-github-bot
Copy link
Collaborator

Summary: typedef declaration within a macro using DeclarationCode.fromString fails in Dart 3.6.0 and 3.5.3, preventing subsequent macro generation. The issue occurs when using builder.declareType.

@dart-github-bot dart-github-bot added area-front-end Use area-front-end for front end / CFE / kernel format related issues. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Dec 14, 2024
@lrhn lrhn added area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. feature-macros Implementation of the macros feature pkg-json The json macro package and removed area-front-end Use area-front-end for front end / CFE / kernel format related issues. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. feature-macros Implementation of the macros feature pkg-json The json macro package type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
Development

No branches or pull requests

3 participants