wolfictl icon indicating copy to clipboard operation
wolfictl copied to clipboard

Dependency / build-order solver does not consider runtime deps .

Open smoser opened this issue 1 year ago • 1 comments

I noticed this when putting up a PR to wolfi that changed lots of packages.

It appeared to me that the solver did not consider runtime dependencies, but c-i was doing test immediately after build. So for a package P that depended on A for build and A and C for runtime, there was no guarantee that C would be built before P.

It is possible that this is acceptable, and the build/test should simply be changed to do "build all the things and then test all the things". I don't have a good argument against that, but the current process in github actions was 'make package/' and then 'make test/'.

smoser avatar Sep 30 '24 14:09 smoser

In elastic builds I believe all builds are done first, then tests.

We could adopt same for GHA builds too. Not sure how much work that would be.

xnox avatar Oct 05 '24 01:10 xnox

We are all over to elastic builds now, and per @jonjohnsonjr this is true:

In elastic builds I believe all builds are done first, then tests.

I dont have a good use case for runtime deps not being considered for build order. It seems like it would be nice to have, but also seems like it is somewhat happenstance and luck if Package A needs B in its build (in its build environment) and was only getting it because it listed Package C (which runtime depended on B), then it should list B in its build-depends.

smoser avatar Jul 10 '25 18:07 smoser

I'm closing this for now. If we end up with a case that shows me wrong, then we'll open another issue.

smoser avatar Jul 10 '25 18:07 smoser