Macros: resolveIdentifier does not resolve identifiers exported from other libraries #55910
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
cfe-feature-macros
Implement macros features in the CFE
feature-macros
Implementation of the macros feature
pkg-macros
The experimental package:_macros library
If library
main
imports a libraryA
, andA
exports a libraryB
, and a macro is augmentingmain
, then it can resolve identifiers fromA
but notB
.This example tries to resolve identifiers from
args
package.args/args.dart
does not declareArgParser
class but exports it fromsrc/arg_parser.dart
. A macro fails to resolve this identifier inargs/args.dart
, but successfully resolves it inargs/src/arg_parser.dart
(and it's not a proper way because libraries undersrc
are considered private).main.dart:
macro.dart:
Output of
dart --enable-experiment=macros run lib/main.dart
:pubspec.yaml
dart info
This is reproducible for me on:
3.5.0-180.2.beta
.3.5.0-202
with the latestmacros
package it supports:0.1.1-main.0
The text was updated successfully, but these errors were encountered: