Skip to content

Commit

Permalink
Remove damli completely (digital-asset#481)
Browse files Browse the repository at this point in the history
The only command that we still had in damli which afaik isn’t
something anyone uses (and if it is, we should move it do damlc).
  • Loading branch information
moritzkiefer-da authored and martin-drhu-da committed Apr 15, 2019
1 parent 1a70bf6 commit dff9f17
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 216 deletions.
7 changes: 0 additions & 7 deletions BAZEL-haskell.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ bring the macros `haskell_toolchain`, `haskell_import`, `haskell_cc_import` and

Lastly, there are some aliases defined here. For example,
```
alias(
name = "damli",
actual = "//daml-foundations/daml-tools/da-hs-damli-app:damli"
)
```
and
```
alias(
name = "damlc",
actual = "//daml-foundations/daml-tools/da-hs-damlc-app"
Expand Down
2 changes: 1 addition & 1 deletion BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ describe the individual attributes.
```
daml(
name = "it-daml",
# The main DAML file. This file will be passed to damli.
# The main DAML file. This file will be passed to damlc.
main_src = "src/it/resources/TestAll.daml",
# Other DAML files that may be imported by the main DAML file.
srcs = glob(["src/it/resources/**/*.daml"]),
Expand Down
15 changes: 0 additions & 15 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,6 @@ genrule(
# Common aliases
#

alias(
name = "damli",
actual = "//daml-foundations/daml-tools/da-hs-damli-app:damli",
)

alias(
name = "damli@ghci",
actual = "//daml-foundations/daml-tools/da-hs-damli-app:damli@ghci",
)

alias(
name = "damli-dist",
actual = "//daml-foundations/daml-tools/da-hs-damli-app:dist",
)

alias(
name = "damlc",
actual = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app",
Expand Down
2 changes: 1 addition & 1 deletion daml-foundations/daml-ghc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ installation of the packages for type checking.

Currently a package database is provided together with the `damlc` Bazel rule and `bazel run damlc`
loads this database by default. This package database is also shipped together with
`da-hs-damli-app.tar.gz` and `da-hs-damlc-app.tar.gz` for the SDK and the platform and is contained
`da-hs-damlc-app.tar.gz` for the SDK and the platform and is contained
in the directory `resources/package-db/gen/`.

### Building the package database
Expand Down
9 changes: 1 addition & 8 deletions daml-foundations/daml-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ are linked where available.

## DAML Command Line Interface

* `da-hs-daml-cli` is the Haskell library behind `damli` and `damlc`
* `da-hs-daml-cli` is the Haskell library behind `damlc`
* `da-hs-damlc-app` provides `damlc`
* `da-hs-damli-app` provides `damli`
* `damlc-jar:damlc.jar` packages up `damlc` for distribution inside a jar.

You can execute these directly with just
Expand All @@ -16,12 +15,6 @@ You can execute these directly with just
$ bazel run damlc -- <command line options>
```

or

```
$ bazel run damli -- <command line options>
```

due to the brief aliases specified in the `BUILD` file in the
root of our repository.

Expand Down
4 changes: 2 additions & 2 deletions daml-foundations/daml-tools/da-hs-daml-cli/DA/Cli/Damlc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import qualified Control.Monad.Managed as Managed
import qualified "cryptonite" Crypto.Hash as Crypto
import Codec.Archive.Zip
import qualified Da.DamlLf as PLF
import DA.Cli.Damli.BuildInfo
import DA.Cli.Damli.Command.Damldoc (cmdDamlDoc)
import DA.Cli.Damlc.BuildInfo
import DA.Cli.Damlc.Command.Damldoc (cmdDamlDoc)
import DA.Cli.Options
import DA.Cli.Output
import DA.Cli.Args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0

module DA.Cli.Damli.Base
module DA.Cli.Damlc.Base
( module DA.Cli.Options
, module DA.Cli.Output
, module DA.Prelude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{-# LANGUAGE OverloadedStrings #-}

module DA.Cli.Damli.BuildInfo
module DA.Cli.Damlc.BuildInfo
( buildInfo
) where

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

{-# LANGUAGE OverloadedStrings #-}

module DA.Cli.Damli.Command.Damldoc(cmdDamlDoc, cmdRenderDoc) where
module DA.Cli.Damlc.Command.Damldoc(cmdDamlDoc, cmdRenderDoc) where

import DA.Cli.Damli.Base(Command)
import DA.Cli.Damlc.Base(Command)
import DA.Cli.Options
import DA.Daml.GHC.Damldoc.Driver

Expand Down
37 changes: 0 additions & 37 deletions daml-foundations/daml-tools/da-hs-daml-cli/DA/Cli/Damli.hs

This file was deleted.

This file was deleted.

5 changes: 1 addition & 4 deletions daml-foundations/daml-tools/da-hs-daml-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
This package defines the DAML cli utilities,
and specifically `damli`, which is meant for
internal use and offers a variety of commands
including various debugging ones, and `damlc`,
which is what we will ship as the DAML compiler.
specifically `damlc`.
34 changes: 0 additions & 34 deletions daml-foundations/daml-tools/da-hs-damli-app/BUILD.bazel

This file was deleted.

3 changes: 0 additions & 3 deletions daml-foundations/daml-tools/da-hs-damli-app/LICENSE

This file was deleted.

4 changes: 0 additions & 4 deletions daml-foundations/daml-tools/da-hs-damli-app/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions daml-foundations/daml-tools/da-hs-damli-app/src/Main.hs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class DamlConnection {

this.connection.trace(Trace.Verbose, new ConsoleTracer());
} else {
// drain stderr in order to not block damli.
// drain stderr in order to not block damlc.
this.process.stderr.on('readable', () => { this.process.stderr.read() });
}

Expand Down
4 changes: 2 additions & 2 deletions daml-lf/tests/daml-lf-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -eu

DAML_LF_REPL=$1
DAMLI=$2
DAMLC=$2
MAIN=$3
TMPDIR=$(mktemp -d)

Expand All @@ -19,7 +19,7 @@ case "${MAIN##*.}" in
$DAML_LF_REPL testAll "$MAIN"
;;
daml)
$DAMLI export-lf-v1 "$MAIN" -o $TMPDIR/out.dalf
$DAMLC export-lf-v1 "$MAIN" -o $TMPDIR/out.dalf
$DAML_LF_REPL testAll $TMPDIR/out.dalf
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions daml-lf/tests/scenario/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -eu
export LC_ALL="en_US.UTF-8"

REPL=$1
DAMLI=$2
DAMLC=$2
TESTMAIN=$3
TESTDIR="$(dirname $TESTMAIN)"
TESTDALF="$TESTDIR/Main.dalf"
Expand All @@ -21,7 +21,7 @@ TARGET="1.3"

REGEX_HIDE_HASHES="s,@[a-z0-9]{8},@XXXXXXXX,g"

$DAMLI compile --debug --target $TARGET $TESTMAIN -o $TESTDALF
$DAMLC compile --debug --target $TARGET $TESTMAIN -o $TESTDALF

$REPL test Test:run $TESTDALF $GHC_PRIM_DALF | sed '1d' | sed -E "$REGEX_HIDE_HASHES" > ${TESTDIR}/ACTUAL.ledger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import scala.sys.error
import scala.sys.process.Process

/**
* Run the HEAD version of damli from source, to create a DAR file from a DAML file.
* Run the HEAD version of damlc from source, to create a DAR file from a DAML file.
*/
object HeadDamli {
object HeadDamlc {
private val packageName = "Test"

def run(damlPath: String): (File, Unit => Unit) = {
Expand All @@ -27,10 +27,10 @@ object HeadDamli {

// DAML -> DAR
val exitCode = Process(
s"bazel run damli -- package $damlPath $packageName --output ${darFile.getAbsolutePath}").!
s"bazel run damlc -- package $damlPath $packageName --output ${darFile.getAbsolutePath}").!
if (exitCode != 0) {
shutdown(())
error(s"Dar packager: error while running DAMLI package for $damlPath: exit code $exitCode")
error(s"Dar packager: error while running damlc package for $damlPath: exit code $exitCode")
}

(darFile, shutdown)
Expand Down
6 changes: 0 additions & 6 deletions rules_daml/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ exports_files(
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_binary")
load("//rules_daml:daml.bzl", "daml_sandbox_version")

alias(
name = "damli",
actual = "//daml-foundations/daml-tools/da-hs-damli-app:damli",
visibility = ["//visibility:public"],
)

alias(
name = "codegen",
actual = "//language-support/scala/codegen:codegen-main",
Expand Down

0 comments on commit dff9f17

Please sign in to comment.