You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When constructing a package graph, we only consider regular dependencies for packages that aren't the root package. I think this is fairly reasonable in general (after all, dev-dependencies aren't transitive), but it sometimes makes it counterintuitive as expected builders are not applied.
Consider a buildera writing hidden outputs and b writing to source, assuming that both auto-apply to dependents. b may read the hidden outputs from a. Now, let's say a user has a multi-package project with a root package root and a package dep, where root depends on dep from path.
Now, if root has a dev-dependency on a and b; and dep has a dev-dependency on a, one might assume that hidden files from a are generated for the target in dep. However, they aren't! For me, I was quite surprised to see that b couldn't read expected files in dep and it took me a while to figure out that dep needs a regular dependency for this to work (real-world use case).
Now, I'm wondering if we could loosen up these restrictions a bit. Maybe we can consider dev_dependencies from packages reachable through a path dependency as those typically are part of the same project? Another approach may be to consider dev-dependencies from non-root packages if they are a transitive regular dependency of the root package?
I assume this is a fairly rare scenario so it might not be worth it at all, I'm just wondering if this is worth considering.
The text was updated successfully, but these errors were encountered:
When constructing a package graph, we only consider regular dependencies for packages that aren't the root package. I think this is fairly reasonable in general (after all, dev-dependencies aren't transitive), but it sometimes makes it counterintuitive as expected builders are not applied.
Consider a builder
a
writing hidden outputs andb
writing to source, assuming that both auto-apply to dependents.b
may read the hidden outputs froma
. Now, let's say a user has a multi-package project with a root packageroot
and a packagedep
, whereroot
depends ondep
from path.Now, if
root
has a dev-dependency ona
andb
; anddep
has a dev-dependency ona
, one might assume that hidden files froma
are generated for the target indep
. However, they aren't! For me, I was quite surprised to see thatb
couldn't read expected files indep
and it took me a while to figure out thatdep
needs a regular dependency for this to work (real-world use case).Now, I'm wondering if we could loosen up these restrictions a bit. Maybe we can consider
dev_dependencies
from packages reachable through apath
dependency as those typically are part of the same project? Another approach may be to consider dev-dependencies from non-root packages if they are a transitive regular dependency of the root package?I assume this is a fairly rare scenario so it might not be worth it at all, I'm just wondering if this is worth considering.
The text was updated successfully, but these errors were encountered: