daml/compiler
Moritz Kiefer 2ccbd7f865
Add a module-prefixes field to rename all modules in a pkg (#6105)
* Add a module-prefixes field to rename all modules in a pkg

This PR adds a `module-prefixes` field to `daml.yaml` a a shorthand
for specifying a `--package` flag that renames all modules in a
package to have the same prefix.

The docs are updated to describe how you can use this field and there
is a test case that makes sure it works.

fixes #4948

changelog_begin

- [DAML Compiler] You can now use the new ``module-prefixes`` field in
  ``daml.yaml`` to add a prefix to all modules from a dependency. This
  is particularly useful for handling colliding module names during
  upgrades. See
  https://docs.daml.com/daml/reference/packages.html#handling-module-name-collisions
  for more information.

changelog_end

* Update compiler/damlc/daml-opts/daml-opts-types/DA/Daml/Options/Packaging/Metadata.hs

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

* Improve docs and fix broken suggestion

changelog_begin
changelog_end

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-05-28 10:57:00 +00:00
..
daml-extension Remove deprecated vscode-resource scheme (#6008) 2020-05-18 18:28:17 +02:00
daml-lf-ast Add a module-prefixes field to rename all modules in a pkg (#6105) 2020-05-28 10:57:00 +00:00
daml-lf-proto Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
daml-lf-reader replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00
daml-lf-tools Run simplifier in topological order. (#6013) 2020-05-19 14:16:52 +00:00
daml-lf-verify WIP: Draft version constraint generation (#5472) 2020-05-20 08:08:18 +02:00
daml-licenses replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00
damlc Add a module-prefixes field to rename all modules in a pkg (#6105) 2020-05-28 10:57:00 +00:00
ghcide Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
hie-core Get ghcide from the new upstream repo (#2867) 2019-09-11 08:57:48 +02:00
lsp-tests Turn warnings for module name/record name mismatches into errors (#5266) 2020-03-30 10:21:53 +00:00
repl-service Add control to speedy compiler to choose if stack-trace support occurs at runtime. (#6070) 2020-05-22 16:36:03 +01:00
scenario-service DAML-LF: Kill RelativeContractId (#5991) 2020-05-25 22:30:45 +02:00
README.md open-sourcing daml 2019-04-04 09:33:38 +01:00

DAML Compiler

This directory contains several libraries used by and the executable for the DAML compiler.

Libraries

  • daml-lf-ast: The DAML-LF AST and type checker.