pub icon indicating copy to clipboard operation
pub copied to clipboard

vendored package _macros broke executable caching for entry points

Open mraleph opened this issue 1 year ago • 1 comments

PackageGraph._isPackageCached has the following code:

https://github.com/dart-lang/pub/blob/3894534bdcbdf0308486152bacf19cd69110c559/lib/src/package_graph.dart#L81

This codes does not work for vendored packages like _macros because it checks whether location of a vendored package lands inside the cache.

This means executables for packages like build_runner which have indirect dependency on _macros are currently not cached and are always recompiled (including calling pub to download dependencies).

This completely breaks offline development workflow (which is how I discovered this) but also seems to be plain wasteful.

cc @sigurdm @jakemac53

mraleph avatar Sep 16 '24 13:09 mraleph

Yeah - sdk packages should be considered cached as well.

Nice find - thanks!

sigurdm avatar Sep 18 '24 18:09 sigurdm