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 error
Transitive 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]
the error mentions hkjc-daml-bet-0.1.0 and product-engine-validation-2.1.2, which are not named directly in the daml.yaml file you shared, so I assume they are included transitively through the hkjc-daml-payout{1,2}.dar files.
It’s hard to tell without access to the daml.yaml files for hkjc-daml-payout{1,2}, but it looks like the 1 and 2 versions were built with different .dars for hkjc-daml-bet-0.1.0 and product-engine-validation-2.1.2 which however shared the same version string. Do you have access to the dam.yaml files for hkjc-daml-payout{1,2} and/or the .dar files for hkjc-daml-bet-0.1.0 and product-engine-validation-2.1.2?
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.