Pruning code in canton doc
App Development2 posts189 viewsLast activity May 2022
KC
kctamOP
May 2022Hi team,
I’m testing pruning in canton console (Operational Processes — Daml SDK 2.1.1 documentation). with a canton setup examples/01-simple-network. When I apply the sample code in the doc I see the following error messages.
cmd8.sc:30: reference to participants is ambiguous;
it is imported twice in the same scope by
import env._
and import _root_.ammonite.predef.ArgsPredef.{domainManagers, participants, participant2, domains, sequencers, mydomain, mediators, nodes, __replEnvironmentValue, participant1}
val participantsToPrune = participants.all
^
cmd8.sc:31: reference to domains is ambiguous;
it is imported twice in the same scope by
import env._
and import _root_.ammonite.predef.ArgsPredef.{domainManagers, participants, participant2, domains, sequencers, mydomain, mediators, nodes, __replEnvironmentValue, participant1}
val domainsToPrune = domains.all
^
Compilation Failed
Kindly advise how to address the ambiguity mentioned here.
Thanks.
kc
SO
soren
May 2022Hi KC
You can remove the line import env._ here because you are already running in the console environment with all the participants/domains bindings available.
I’ll make sure that we update the code snippet to reflect that.
Thanks for pointing this out.