Open sigurdm opened 3 months ago
I think this is the main problem
This is already broken for some non-standard setups if the file isn't at exactly the hardcoded path. We could fix this for unexpected paths under the root package, but as Jake mentioned this causes a problem when the package config is outside of any package.
My first hacky idea is to add a synthetic package for this, I think we discover the package config when building the package graph so we should have the information we need. We'll also need to communicate that path through to the above lines, so we probably need to add it as another field on both PackageGraph
and TargetGraph
.
True, we could go the synthetic package route similar to how we handle SDK sources. Not sure what we want to call it, $workspace
?
Hmm, build_runner doesn't work at all for packages using pub workspaces. https://github.com/dart-lang/build/blob/039aecaab190c70077f69e72f090675c8df04685/build_runner_core/lib/src/package_graph/package_graph.dart#L221-L227
I'm not sure how we wouldn't have hit this earlier though...
Hmm, build_runner doesn't work at all for packages using pub workspaces.
This was a local issue, I still had some .packages
files tripping things up.
Currently one has to manually restart build_runner on each
pub get
when using workspaces.Context being discussed in https://github.com/dart-lang/build/pull/3717