Skip to content

Commit

Permalink
make it compile again after merge
Browse files Browse the repository at this point in the history
--amend
  • Loading branch information
paulbrauner-da committed Sep 11, 2024
1 parent b9d62a8 commit 7f2495e
Show file tree
Hide file tree
Showing 24 changed files with 93 additions and 116 deletions.
2 changes: 1 addition & 1 deletion sdk/daml-lf/model-test-lib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ da_scala_binary(
lf_version = mangle_for_damlc(lf_version),
pkg_version = pkg_version,
) for lf_version in ENGINE_LF_VERSIONS for (pkg_version, _) in PKG_VERSIONS],
main_class = "com.daml.lf.model.test.Demo",
main_class = "com.digitalasset.daml.lf.model.test.Demo",
resources = ["//daml-script/runner:src/main/resources/logback.xml"],
scala_deps = [
"@maven//:org_scalacheck_scalacheck",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package com.digitalasset.daml.lf.model.test

import com.daml.bazeltools.BazelRunfiles.rlocation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package com.digitalasset.daml.lf.model.test

import com.daml.lf.model.test.{Ledgers => Conc, Symbolic => Sym}
import com.digitalasset.daml.lf.model.test.{Ledgers => Conc, Symbolic => Sym}
import com.microsoft.z3.{ArrayExpr, BoolSort, Context, IntSort}

object ConcreteToSymbolic {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import com.daml.bazeltools.BazelRunfiles.rlocation
import com.daml.grpc.adapter.{ExecutionSequencerFactory, PekkoExecutionSequencerPool}
import com.daml.lf.language.LanguageVersion
import com.daml.lf.model.test.LedgerRunner.ApiPorts
import com.digitalasset.canton.tracing.TraceContext
import com.digitalasset.daml.lf.language.LanguageVersion
import com.digitalasset.daml.lf.model.test.LedgerRunner.ApiPorts
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.stream.Materializer
import org.scalacheck.{Gen, Prop}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import cats.Applicative
import com.daml.lf.Spaces.Space
import com.daml.lf.Spaces.{Space => S}
import com.daml.lf.Spaces.Space.Instances._
import com.digitalasset.daml.lf.model.test.Spaces.Space
import com.digitalasset.daml.lf.model.test.Spaces.{Space => S}
import com.digitalasset.daml.lf.model.test.Spaces.Space.Instances._
import cats.syntax.all._
import com.daml.lf.language.LanguageVersion
import com.daml.lf.language.LanguageVersion.Features
import com.daml.lf.model.test.Skeletons._
import com.digitalasset.daml.lf.language.LanguageVersion
import com.digitalasset.daml.lf.language.LanguageVersion.Features
import com.digitalasset.daml.lf.model.test.Skeletons._

import Ordering.Implicits.infixOrderingOps

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import com.daml.lf.model.test.{Ledgers => L, Symbolic => S}
import com.digitalasset.daml.lf.model.test.{Ledgers => L, Symbolic => S}
import com.microsoft.z3.enumerations.Z3_lbool
import com.microsoft.z3.{Context, IntNum, Model}
import LedgerImplicits._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import cats.Monad
import org.scalacheck.Gen
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import org.scalacheck.Gen
import com.daml.lf.model.test.Ledgers._
import com.digitalasset.daml.lf.model.test.Ledgers._
import GenInstances._
import cats.implicits.toTraverseOps

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import cats.data.EitherT
import cats.implicits.toTraverseOps
import cats.instances.all._
import com.daml.lf.data.Ref
import com.daml.lf.engine.script.Disclosure
import com.daml.lf.engine.script.v2.ledgerinteraction.ScriptLedgerClient
import com.daml.lf.engine.script.v2.ledgerinteraction.ScriptLedgerClient.{
import com.digitalasset.daml.lf.data.Ref
import com.digitalasset.daml.lf.engine.script.Disclosure
import com.digitalasset.daml.lf.engine.script.v2.ledgerinteraction.ScriptLedgerClient
import com.digitalasset.daml.lf.engine.script.v2.ledgerinteraction.ScriptLedgerClient.{
CommandResult,
CommandWithMeta,
CreateResult,
ExerciseResult,
}
import com.daml.lf.model.test.LedgerImplicits._
import com.daml.lf.model.test.Ledgers._
import com.daml.lf.model.test.ToCommands.{
import com.digitalasset.daml.lf.model.test.LedgerImplicits._
import com.digitalasset.daml.lf.model.test.Ledgers._
import com.digitalasset.daml.lf.model.test.ToCommands.{
ContractIdMapping,
PartyIdMapping,
UniversalContractId,
UniversalWithKeyContractId,
}
import com.daml.lf.value.{Value => V}
import com.digitalasset.daml.lf.value.{Value => V}
import org.apache.pekko.stream.Materializer
import scalaz.OneAnd

Expand All @@ -38,8 +36,11 @@ object Interpreter {
case TranslationError(error) => error.toString
case SubmitFailure(failure) =>
failure match {
case ScriptLedgerClient.SubmitFailure(statusError: com.daml.lf.scenario.Error, _) =>
com.daml.lf.scenario.Pretty.prettyError(statusError).render(80)
case ScriptLedgerClient.SubmitFailure(
statusError: com.digitalasset.daml.lf.scenario.Error,
_,
) =>
com.digitalasset.daml.lf.scenario.Pretty.prettyError(statusError).render(80)
case _ => failure.toString
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import cats.TraverseFilter
import cats.data.{StateT, WriterT}
import cats.implicits.toTraverseOps
import com.daml.lf.model.test.Ledgers.PartyId
import com.daml.lf.model.test.{Ledgers => L, Skeletons => S}
import com.digitalasset.daml.lf.model.test.Ledgers.PartyId
import com.digitalasset.daml.lf.model.test.{Ledgers => L, Skeletons => S}
import org.scalacheck.Gen

object LedgerFixer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import com.daml.lf.model.test.Ledgers.{Participant, ParticipantId, PartyId}
import com.digitalasset.daml.lf.model.test.Ledgers.{Participant, ParticipantId, PartyId}

object LedgerImplicits {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import cats.implicits.toTraverseOps
import cats.instances.all._
import com.daml.grpc.adapter.ExecutionSequencerFactory
import com.daml.ledger.api.v2.{TransactionFilterOuterClass => proto}
import com.daml.ledger.javaapi
import com.daml.ledger.rxjava.DamlLedgerClient
import com.daml.lf.archive.{Dar, UniversalArchiveDecoder}
import com.daml.lf.data.Ref
import com.daml.lf.data.Ref.{PackageId, Party}
import com.daml.lf.engine.script.v2.ledgerinteraction.grpcLedgerClient.{
import com.digitalasset.daml.lf.archive.{Dar, UniversalArchiveDecoder}
import com.digitalasset.daml.lf.data.Ref
import com.digitalasset.daml.lf.data.Ref.{PackageId, Party}
import com.digitalasset.daml.lf.engine.script.v2.ledgerinteraction.grpcLedgerClient.{
AdminLedgerClient,
GrpcLedgerClient,
}
import com.daml.lf.engine.script.v2.ledgerinteraction.{IdeLedgerClient, ScriptLedgerClient}
import com.daml.lf.language.{Ast, LanguageMajorVersion, LanguageVersion}
import com.daml.lf.model.test.LedgerImplicits._
import com.daml.lf.model.test.LedgerRunner.ApiPorts
import com.daml.lf.model.test.Ledgers.{ParticipantId, Scenario}
import com.daml.lf.model.test.Projections.{PartyId, Projection}
import com.daml.lf.model.test.ToProjection.{ContractIdReverseMapping, PartyIdReverseMapping}
import com.daml.lf.speedy.{Compiler, RingBufferTraceLog, WarningLog}
import com.digitalasset.daml.lf.engine.script.v2.ledgerinteraction.{
IdeLedgerClient,
ScriptLedgerClient,
}
import com.digitalasset.daml.lf.language.{Ast, LanguageMajorVersion, LanguageVersion}
import com.digitalasset.daml.lf.model.test.LedgerImplicits._
import com.digitalasset.daml.lf.model.test.LedgerRunner.ApiPorts
import com.digitalasset.daml.lf.model.test.Ledgers.{ParticipantId, Scenario}
import com.digitalasset.daml.lf.model.test.Projections.{PartyId, Projection}
import com.digitalasset.daml.lf.model.test.ToProjection.{
ContractIdReverseMapping,
PartyIdReverseMapping,
}
import com.digitalasset.daml.lf.speedy.{Compiler, RingBufferTraceLog, WarningLog}
import com.daml.logging.ContextualizedLogger
import com.digitalasset.canton.ledger.client.configuration.{
CommandClientConfiguration,
Expand All @@ -34,6 +38,7 @@ import com.digitalasset.canton.ledger.client.configuration.{
}
import com.digitalasset.canton.logging.NamedLoggerFactory
import com.digitalasset.canton.tracing.TraceContext
import com.digitalasset.daml.lf.PureCompiledPackages
import com.google.protobuf.ByteString
import org.apache.pekko.stream.Materializer

Expand Down Expand Up @@ -208,9 +213,14 @@ private class CantonLedgerRunner(
participantId: ParticipantId,
party: Ref.Party,
): List[javaapi.data.TransactionTree] = {
val ledgerClients = ledgerClientsForProjections(participantId)
val ledgerEnd = ledgerClients.getStateClient
.getLedgerEnd()
.blockingGet()
ledgerClientsForProjections(participantId).getTransactionsClient
.getTransactionsTrees(
javaapi.data.ParticipantOffset.ParticipantBegin.getInstance(),
"",
ledgerEnd,
javaapi.data.TransactionFilter.fromProto(
proto.TransactionFilter
.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

object Ledgers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import scala.util.parsing.combinator._
import Ledgers._
import com.daml.lf.model.test.Lexer.Token
import com.digitalasset.daml.lf.model.test.Lexer.Token

import scala.annotation.nowarn
import scala.util.matching.Regex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import scala.annotation.nowarn

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

object Projections {
type PartySet = Set[PartyId]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package com.digitalasset.daml.lf.model.test

import com.daml.lf.model.test.Ledgers._
import com.daml.lf.model.test.SymbolicSolver
import com.digitalasset.daml.lf.model.test.Ledgers._
import com.digitalasset.daml.lf.model.test.SymbolicSolver
import org.scalacheck.Shrink

import scala.annotation.nowarn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import com.daml.lf.model.test.{Skeletons => Skel, Symbolic => Sym}
import com.digitalasset.daml.lf.model.test.{Skeletons => Skel, Symbolic => Sym}
import com.microsoft.z3.Context

import scala.annotation.nowarn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

object Skeletons {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package com.digitalasset.daml.lf.model.test

import cats.Applicative
import scala.collection.mutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.daml.lf
package model
package test
package com.digitalasset.daml.lf.model.test

import com.microsoft.z3._

Expand Down
Loading

0 comments on commit 7f2495e

Please sign in to comment.