Skip to content

Commit

Permalink
Use com.daml as root package (digital-asset#5343)
Browse files Browse the repository at this point in the history
Packages com.digitalasset.daml and com.daml have been unified under com.daml

Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.

CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
  • Loading branch information
gerolf-da authored Apr 5, 2020
1 parent 0b63db4 commit a2d785e
Show file tree
Hide file tree
Showing 1,512 changed files with 6,576 additions and 6,731 deletions.
12 changes: 6 additions & 6 deletions BAZEL-JVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ da
│ └── src
│ ├── main
│ │ └── scala
│ │ └── com/digitalasset/module
│ │ └── com/daml/module
│ │ ├── Main.scala
│ │ ⋮
│ └── test
│ └── scala
│ └── com/digitalasset/module
│ └── com/daml/module
│ ├── SomeSpec.scala
│ ⋮
├── module2
Expand Down Expand Up @@ -268,13 +268,13 @@ da
│ └── src
│ ├── main
│ │ └── scala
│ │ └── com/digitalasset/module
│ │ └── com/daml/module
│ │ ├── BUILD.bazel
│ │ ├── Main.scala
│ │ ⋮
│ └── test
│ └── scala
│ └── com/digitalasset/module
│ └── com/daml/module
│ ├── BUILD.bazel
│ ├── SomeSpec.scala
│ ⋮
Expand Down Expand Up @@ -307,12 +307,12 @@ da
│ └── src
│ ├── main
│ │ └── scala
│ │ └── com/digitalasset/module
│ │ └── com/daml/module
│ │ ├── Main.scala
│ │ ⋮
│ └── test
│ └── scala
│ └── com/digitalasset/module
│ └── com/daml/module
│ ├── SomeSpec.scala
│ ⋮
└── module2
Expand Down
6 changes: 3 additions & 3 deletions BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ are:
- `data`:
Files that are needed at runtime. In order to access such files at runtime
you should use the utility library in
`com.digitalasset.testing.BuildSystemSupport`.
`com.daml.testing.BuildSystemSupport`.
### Scala Test Cases
Expand Down Expand Up @@ -873,13 +873,13 @@ daml(
# The directory prefix under which to create the DAR tree.
target_dir = "target/scala-2.12/resource_managed/it/dars",
# The group ID.
group = "com.digitalasset.sample",
group = "com.daml.sample",
# The artifact ID.
artifact = "test-all",
# The package version.
version = "0.1",
# The package name.
package = "com.digitalasset.sample",
package = "com.daml.sample",
)
```
Expand Down
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ azure-cron.yml @garyverhaegen-da
/daml-lf/data-scalacheck/ @S11001001
/daml-lf/transaction-scalacheck/ @S11001001
/daml-lf/validation/ @remyhaemmerle-da
/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/ @S11001001
/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/value/ @S11001001
/daml-lf/transaction/src/main/scala/com/daml/lf/transaction/ @S11001001
/daml-lf/transaction/src/main/scala/com/daml/lf/value/ @S11001001

/ledger-service/ @leo-da @S11001001

Expand Down
2 changes: 1 addition & 1 deletion bazel_tools/client_server/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports_files(["client_input_file"])
da_scala_binary(
name = "server",
srcs = ["server.scala"],
main_class = "com.digitalasset.bazeltools.clientservertest.tests.Main",
main_class = "com.daml.bazeltools.clientservertest.tests.Main",
deps = [
"@maven//:com_github_scopt_scopt_2_12",
],
Expand Down
2 changes: 1 addition & 1 deletion bazel_tools/client_server/tests/server.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.bazeltools.clientservertest.tests
package com.daml.bazeltools.clientservertest.tests

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

package com.digitalasset.daml.bazeltools
package com.daml.bazeltools

import java.nio.file.{Path, Paths}

Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Mangling.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import Data.Word
-- in the proto encoding/decoding code.
--
-- IMPORTANT: keep in sync with
-- `com.digitalasset.daml.lf.data.Ref.DottedName.fromSegments`
-- `com.daml.lf.data.Ref.DottedName.fromSegments`

isAsciiLetter :: Char -> Bool
isAsciiLetter c = isAsciiLower c || isAsciiUpper c
Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Archive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module DA.Daml.LF.Proto3.Archive

import Control.Lens (over, _Left)
import qualified "cryptonite" Crypto.Hash as Crypto
import qualified Com.Digitalasset.DamlLfDev.DamlLf as ProtoLF
import qualified Com.Daml.DamlLfDev.DamlLf as ProtoLF
import Control.Monad
import Data.List
import DA.Pretty
Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Decode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module DA.Daml.LF.Proto3.Decode
, decodePayload
) where

import Com.Digitalasset.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
import Com.Daml.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
import DA.Daml.LF.Ast (Package, PackageRef)
import DA.Daml.LF.Proto3.Error
import qualified DA.Daml.LF.Proto3.DecodeV1 as DecodeV1
Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/DecodeV1.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Data.Int
import Text.Read
import Data.List
import DA.Daml.LF.Mangling
import qualified Com.Digitalasset.DamlLfDev.DamlLf1 as LF1
import qualified Com.Daml.DamlLfDev.DamlLf1 as LF1
import qualified Data.NameMap as NM
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Encode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module DA.Daml.LF.Proto3.Encode
) where

import qualified Data.Text.Lazy as TL
import Com.Digitalasset.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
import Com.Daml.DamlLfDev.DamlLf (ArchivePayload(..), ArchivePayloadSum(..))
import DA.Daml.LF.Ast
import qualified DA.Daml.LF.Proto3.EncodeV1 as EncodeV1

Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/EncodeV1.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import DA.Pretty
import DA.Daml.LF.Ast
import DA.Daml.LF.Mangling
import qualified DA.Daml.LF.Proto3.Util as Util
import qualified Com.Digitalasset.DamlLfDev.DamlLf1 as P
import qualified Com.Daml.DamlLfDev.DamlLf1 as P

import qualified Proto3.Suite as P (Enumerated (..))

Expand Down
2 changes: 1 addition & 1 deletion compiler/daml-lf-proto/src/DA/Daml/LF/Proto3/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Data.Int
import qualified Data.Text.Lazy as TL
import GHC.Generics

import qualified Com.Digitalasset.DamlLfDev.DamlLf1 as P
import qualified Com.Daml.DamlLfDev.DamlLf1 as P

class EitherLike a b e where
toEither :: e -> Either a b
Expand Down
2 changes: 1 addition & 1 deletion compiler/damlc/lib/DA/Cli/Damlc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import qualified DA.Service.Logger as Logger
import qualified DA.Service.Logger.Impl.GCP as Logger.GCP
import qualified DA.Service.Logger.Impl.IO as Logger.IO
import DA.Signals
import qualified Com.Digitalasset.DamlLfDev.DamlLf as PLF
import qualified Com.Daml.DamlLfDev.DamlLf as PLF
import qualified Data.Aeson.Encode.Pretty as Aeson.Pretty
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BSC
Expand Down
2 changes: 1 addition & 1 deletion compiler/repl-service/protos/repl_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
syntax = "proto3";

option java_multiple_files = true;
option java_package = "com.digitalasset.daml.lf.repl";
option java_package = "com.daml.lf.repl";
option java_outer_classname = "ReplServiceProto";

package replservice;
Expand Down
2 changes: 1 addition & 1 deletion compiler/repl-service/server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ genrule(
da_scala_binary(
name = "repl-service-raw",
srcs = glob(["src/main/scala/**/*.scala"]),
main_class = "com.digitalasset.daml.lf.repl.ReplServiceMain",
main_class = "com.daml.lf.repl.ReplServiceMain",
resources = ["src/main/resources/logback.xml"],
runtime_deps = [
"@maven//:ch_qos_logback_logback_classic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<appender-ref ref="STDERR"/>
</root>
<logger name="daml.tracelog" level="DEBUG" />
<logger name="com.digitalasset.auth" level="WARN" />
<logger name="com.daml.auth" level="WARN" />
</configuration>
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.daml.lf.repl
package com.daml.lf.repl

import akka.actor.ActorSystem
import akka.stream._
import com.digitalasset.api.util.TimeProvider
import com.digitalasset.auth.TokenHolder
import com.digitalasset.daml.lf.PureCompiledPackages
import com.digitalasset.daml.lf.archive.Decode
import com.digitalasset.daml.lf.data.Ref._
import com.digitalasset.daml.lf.engine.script._
import com.digitalasset.daml.lf.language.Ast._
import com.digitalasset.daml.lf.language.{Ast, LanguageVersion}
import com.digitalasset.daml.lf.speedy.SExpr._
import com.digitalasset.daml.lf.speedy.{Compiler, SValue, SExpr}
import com.digitalasset.grpc.adapter.{AkkaExecutionSequencerPool, ExecutionSequencerFactory}
import com.digitalasset.ledger.api.refinements.ApiTypes.{ApplicationId}
import com.digitalasset.ledger.api.tls.TlsConfiguration
import com.digitalasset.ledger.client.configuration.{
import com.daml.api.util.TimeProvider
import com.daml.auth.TokenHolder
import com.daml.lf.PureCompiledPackages
import com.daml.lf.archive.Decode
import com.daml.lf.data.Ref._
import com.daml.lf.engine.script._
import com.daml.lf.language.Ast._
import com.daml.lf.language.{Ast, LanguageVersion}
import com.daml.lf.speedy.SExpr._
import com.daml.lf.speedy.{Compiler, SValue, SExpr}
import com.daml.grpc.adapter.{AkkaExecutionSequencerPool, ExecutionSequencerFactory}
import com.daml.ledger.api.refinements.ApiTypes.{ApplicationId}
import com.daml.ledger.api.tls.TlsConfiguration
import com.daml.ledger.client.configuration.{
CommandClientConfiguration,
LedgerClientConfiguration,
LedgerIdRequirement
Expand Down
2 changes: 1 addition & 1 deletion compiler/scenario-service/protos/scenario_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
syntax = "proto3";

option java_multiple_files = true;
option java_package = "com.digitalasset.daml.lf.scenario.api.v1";
option java_package = "com.daml.lf.scenario.api.v1";
option java_outer_classname = "ScenarioServiceProto";

package scenarioservice;
Expand Down
2 changes: 1 addition & 1 deletion compiler/scenario-service/server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ genrule(
da_scala_binary(
name = "scenario-service-raw",
srcs = glob(["src/main/scala/**/*.scala"]),
main_class = "com.digitalasset.daml.lf.scenario.ScenarioServiceMain",
main_class = "com.daml.lf.scenario.ScenarioServiceMain",
resources = glob(["src/main/resources/*"]),
runtime_deps = [
"@maven//:ch_qos_logback_logback_classic",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.daml.lf.scenario
package com.daml.lf.scenario

import java.net.{InetAddress, InetSocketAddress}
import java.util.logging.{Level, Logger}

import com.digitalasset.daml.lf.archive.Decode.ParseError
import com.digitalasset.daml.lf.scenario.api.v1.{Map => _, _}
import com.daml.lf.archive.Decode.ParseError
import com.daml.lf.scenario.api.v1.{Map => _, _}
import io.grpc.stub.StreamObserver
import io.grpc.{Status, StatusRuntimeException}
import io.grpc.netty.NettyServerBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.daml.lf
package com.daml.lf
package scenario

import com.digitalasset.daml.lf.archive.Decode
import com.digitalasset.daml.lf.archive.Decode.ParseError
import com.digitalasset.daml.lf.data.Ref.{Identifier, ModuleName, PackageId, QualifiedName}
import com.digitalasset.daml.lf.language.{Ast, LanguageVersion}
import com.digitalasset.daml.lf.scenario.api.v1.{ScenarioModule => ProtoScenarioModule}
import com.digitalasset.daml.lf.speedy.Compiler
import com.digitalasset.daml.lf.speedy.ScenarioRunner
import com.digitalasset.daml.lf.speedy.SError._
import com.digitalasset.daml.lf.speedy.Speedy
import com.digitalasset.daml.lf.speedy.SExpr
import com.digitalasset.daml.lf.speedy.SValue
import com.digitalasset.daml.lf.types.Ledger.Ledger
import com.digitalasset.daml.lf.PureCompiledPackages
import com.digitalasset.daml.lf.speedy.SExpr.{LfDefRef, SDefinitionRef}
import com.digitalasset.daml.lf.validation.Validation
import com.daml.lf.archive.Decode
import com.daml.lf.archive.Decode.ParseError
import com.daml.lf.data.Ref.{Identifier, ModuleName, PackageId, QualifiedName}
import com.daml.lf.language.{Ast, LanguageVersion}
import com.daml.lf.scenario.api.v1.{ScenarioModule => ProtoScenarioModule}
import com.daml.lf.speedy.Compiler
import com.daml.lf.speedy.ScenarioRunner
import com.daml.lf.speedy.SError._
import com.daml.lf.speedy.Speedy
import com.daml.lf.speedy.SExpr
import com.daml.lf.speedy.SValue
import com.daml.lf.types.Ledger.Ledger
import com.daml.lf.PureCompiledPackages
import com.daml.lf.speedy.SExpr.{LfDefRef, SDefinitionRef}
import com.daml.lf.validation.Validation
import com.google.protobuf.ByteString
import com.digitalasset.daml.lf.transaction.VersionTimeline
import com.daml.lf.transaction.VersionTimeline

/**
* Scenario interpretation context: maintains a set of modules and external packages, with which
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.daml.lf.scenario

import com.digitalasset.daml.lf.data.{Numeric, Ref}
import com.digitalasset.daml.lf.scenario.api.v1
import com.digitalasset.daml.lf.scenario.api.v1.{List => _, _}
import com.digitalasset.daml.lf.speedy.{
SError,
SValue,
Speedy,
PartialTransaction => SPartialTransaction
}
import com.digitalasset.daml.lf.transaction.{Node => N, Transaction => Tx}
import com.digitalasset.daml.lf.types.Ledger
import com.digitalasset.daml.lf.value.{Value => V}
package com.daml.lf.scenario

import com.daml.lf.data.{Numeric, Ref}
import com.daml.lf.scenario.api.v1
import com.daml.lf.scenario.api.v1.{List => _, _}
import com.daml.lf.speedy.{SError, SValue, Speedy, PartialTransaction => SPartialTransaction}
import com.daml.lf.transaction.{Node => N, Transaction => Tx}
import com.daml.lf.types.Ledger
import com.daml.lf.value.{Value => V}

import scala.collection.JavaConverters._

Expand Down
2 changes: 1 addition & 1 deletion daml-assistant/daml-helper/src/DA/Daml/Helper/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ getTokFromFile tokFileM = do
Just tokFile -> do
-- This postprocessing step which allows trailing newlines
-- matches the behavior of the Scala token reader in
-- com.digitalasset.auth.TokenHolder.
-- com.daml.auth.TokenHolder.
tok <- intercalate "\n" . lines <$> readFileUTF8 tokFile
return (Just (Token tok))

Expand Down
2 changes: 1 addition & 1 deletion daml-assistant/daml-sdk/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ da_scala_library(

da_scala_binary(
name = "sdk",
main_class = "com.digitalasset.daml.sdk.SdkMain",
main_class = "com.daml.sdk.SdkMain",
tags = ["maven_coordinates=com.daml:sdk:__VERSION__"],
visibility = ["//visibility:public"],
deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

package com.digitalasset.daml.sdk
package com.daml.sdk

import com.digitalasset.codegen.{CodegenMain => Codegen}
import com.digitalasset.daml.lf.engine.script.{RunnerMain => Script, TestMain => TestScript}
import com.digitalasset.daml.lf.engine.trigger.{RunnerMain => Trigger}
import com.digitalasset.extractor.{Main => Extractor}
import com.digitalasset.http.{Main => JsonApi}
import com.digitalasset.navigator.{NavigatorBackend => Navigator}
import com.digitalasset.platform.sandbox.{SandboxMain => SandboxClassic}
import com.digitalasset.platform.sandboxnext.{Main => Sandbox}
import com.daml.codegen.{CodegenMain => Codegen}
import com.daml.lf.engine.script.{RunnerMain => Script, TestMain => TestScript}
import com.daml.lf.engine.trigger.{RunnerMain => Trigger}
import com.daml.extractor.{Main => Extractor}
import com.daml.http.{Main => JsonApi}
import com.daml.navigator.{NavigatorBackend => Navigator}
import com.daml.platform.sandbox.{SandboxMain => SandboxClassic}
import com.daml.platform.sandboxnext.{Main => Sandbox}

object SdkMain {
def main(args: Array[String]): Unit = {
Expand Down
Loading

0 comments on commit a2d785e

Please sign in to comment.