How is the order computed for building models in `daml build --all`
- Michael_SchaefferOP 2
I’m using
daml build --allto build three models, with the followingmulti-package.yamlfile:packages: - ./testv1 - ./testv2 - ./scriptsThe only dependency between the three is a dependency of
scriptsontestv1.Building with the above file yields the following error:
$ ./build.sh target INFO: Building Daml models. Running multi-package build of all packages in /Users/mikeschaeffer/daml-interface-simple-demo. 2024-04-03 14:42:49.92 [INFO] [multi-package build] Building /Users/mikeschaeffer/daml-interface-simple-demo/scripts damlc: ../testv1/.daml/dist/test-0.0.1.dar: openBinaryFile: does not exist (No such file or directory) File: /Users/mikeschaeffer/daml-interface-simple-demo/scripts ....This implies that it’s attempting to build
scriptsbeforetestv1. If I reverse the ordering, like this, the build progresses properly and succeeds:packages: - ./scripts - ./testv1 - ./testv2This raises a couple questions:
- Is it expected that packages are built in the reverse of the order in which they are declared in
multi-package.yaml? - Does package ordering in
daml build --allwork for dependencies in general, or just data dependencies? - Maybe the most important - What is the proper way to express this sort of dependency to
daml build --all?
- Is it expected that packages are built in the reverse of the order in which they are declared in
- samuel-williams-da1 1
Hi Michael
Unfortunately this behaviour is a bug, currently multi-build is only respecting data-dependencies for build order. This should be fixed soon.
As for the reverse build order, that is surprising - I’ve not seen this in testing. I will take a look. - Michael_Schaeffer
@samuel-williams-da1 Has this bug been fixed?