Daml build fail: Transitive dependencies with same unit id but conflicting package ids
- skylornaOP
I want to depend on both dars at the same time, but I got this kind of error,
Transitive dependencies with same unit id but conflicting package ids: hkjc-daml-bet-0.1.0 [c1af3d3e880d1147663339fb75d341263fe783315d7680f6eb531b11d27b71e5,cfe6a2c4a922 89e0f1cd23c8a7878c3aff4d06c43350cbaae02ffc9647c9072d], product-engine-validation-2.1.2 [26648e5442c58665045f7ff78d07183673781c76730161dfa432d679f 78d706d,388fcd1683695705debaa080ec0263296f65b18f8fd8a3a48d96f0e2c1243b74]
The following is the content of my yaml file, how should I avoid this errorsdk-version: 2.5.0 name: intro6 source: daml version: 1.0.0 dependencies: - daml-prim - daml-stdlib - daml-script - daml-trigger data-dependencies: - ./dar/hkjc-daml-payout1.dar - ./dar/hkjc-daml-payout2.dar build-options: - '--package' - 'hkjc-daml-payout1 with (PayoutSummary as PayoutSummary1)' - '--package' - 'hkjc-daml-payout2 with (PayoutSummary as PayoutSummary2)' sandbox-options: - --wall-clock-time - bernhard 1
Hi @skylorna , have a look at this docs section: Reference: Daml Packages — Daml SDK 2.6.3 documentation. You need to configure “Module Prefixes” in your daml.yaml.
- skylorna
thank you very much
- skylorna
I changed it to this and still get the same error
sdk-version: 2.5.0 name: intro6 source: daml version: 1.0.0 dependencies: - daml-prim - daml-stdlib - daml-script - daml-trigger data-dependencies: - ./dar/hkjc-daml-payout1.dar - ./dar/hkjc-daml-payout2.dar # build-options: # - '--package' # - 'hkjc-daml-payout1 with (PayoutSummary as PayoutSummary1)' # - '--package' # - 'hkjc-daml-payout2 with (PayoutSummary as PayoutSummary2)' module-prefixes: hkjc-daml-payout1: payout1 hkjc-daml-payout2: payout2 sandbox-options: - --wall-clock-timeTransitive dependencies with same unit id but conflicting package ids: hkjc-daml-bet-0.1.0 [c1af3d3e880d1147663339fb75d341263fe783315d7680f6eb531b11d27b71e5,cfe6a2c4a92289e0f1cd23c8a7878c3aff4d06c43350cbaae02ffc9647c9072d], product-engine-validation-2.1.2 [26648e5442c58665045f7ff78d07183673781c76730161dfa432d679f78d706d,388fcd1683695705debaa080ec0263296f65b18f8fd8a3a48d96f0e2c1243b74]
- akrmn
hi @skylorna,
the error mentions
hkjc-daml-bet-0.1.0andproduct-engine-validation-2.1.2, which are not named directly in thedaml.yamlfile you shared, so I assume they are included transitively through thehkjc-daml-payout{1,2}.darfiles.It’s hard to tell without access to the
daml.yamlfiles forhkjc-daml-payout{1,2}, but it looks like the1and2versions were built with different.dars forhkjc-daml-bet-0.1.0andproduct-engine-validation-2.1.2which however shared the same version string. Do you have access to thedam.yamlfiles forhkjc-daml-payout{1,2}and/or the.darfiles forhkjc-daml-bet-0.1.0andproduct-engine-validation-2.1.2? - skylorna
Hi @akrmn ,
this is the daml.yaml forhkjc-daml-payout{1,2}sdk-version: 2.5.0 name: hkjc-daml-bet version: 0.1.0 source: daml dependencies: - daml-prim - daml-stdlib - daml-script data-dependencies: - ../../../../txn-ledger/bet-daml/.daml/dist/txn-3.1.7.dar - ../../../../txn-ledger/itrls-cpc/commingle/cpc-daml/dar/wagering-event-product-management.dar - ../../../../txn-ledger/bet-daml/dar/product-engine-validation.dar - ../../../../txn-ledger/bet-daml/dar/cpc-partner-management.dar start-navigator: true codegen: js: output-directory: ui/daml.js npm-scope: daml.js # Remove this line when running against a ledger without user management. init-script: Setup:setuphkjc-daml-payout depends on many other dar files, and these dependent dar files themselves also depend on other dar files.
hkjc-daml-payout1.dar decompression is hkjc-daml-bet-0.1.0
- skylorna
When the PKIDs of two dar files are inconsistent, the name and version in daml.yaml must not be the same, or this problem will occur if the two dar files are dependenced at the same time.

