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
Based on the common understanding of "dependency", you would expect that referencing Parts::TruckEngine from inside Building::House would be allowed since building depends on vehicle, which depends on parts, which contains Parts::TruckEngine. But this would in fact fail since Packwerk does not consider dependencies transitively, so you would have to change the app/models/building package like so:
This is fine for three packages like this, but the problem scales badly with number of packages. We now have nearly 100 packages in our core monolith and the number of times dependencies are duplicated in package.yml files is getting out of hand.
I'd like to propose that Packwerk consider dependencies transitively, such that the change to app/models/building/package.yml would not be necessary. This seems like it shouldn't be hard to do.
Any thoughts?
The text was updated successfully, but these errors were encountered:
If you have three packages (based on the ones in the Packwerk intro video):
Based on the common understanding of "dependency", you would expect that referencing
Parts::TruckEngine
from insideBuilding::House
would be allowed sincebuilding
depends onvehicle
, which depends onparts
, which containsParts::TruckEngine
. But this would in fact fail since Packwerk does not consider dependencies transitively, so you would have to change theapp/models/building
package like so:# app/models/building/package.yml enforce_depencencies: true dependencies: - app/models/vehicle +- app/models/parts
This is fine for three packages like this, but the problem scales badly with number of packages. We now have nearly 100 packages in our core monolith and the number of times dependencies are duplicated in
package.yml
files is getting out of hand.I'd like to propose that Packwerk consider dependencies transitively, such that the change to
app/models/building/package.yml
would not be necessary. This seems like it shouldn't be hard to do.Any thoughts?
The text was updated successfully, but these errors were encountered: