daml/daml-assistant
Moritz Kiefer 29ed16b4cc
Improve handling of exposed-modules with data-dependencies (#5330)
* Improve handling of exposed-modules with data-dependencies

Previously, we tried to rename all modules of a dependency via
--package. This fails if some of those modules are not exported. This
was trivial to hit as a user since the ``daml-trigger`` library made
use of this.

This PR adds a few things to improve the situation:

1. We only rename modules that are exposed. This fixes the issue if
   you don’t actually reference a non-exposed module from your
   data-dependency.
2. I’ve removed the exposed-modules from daml-trigger. I don’t think
   they are essential here given that the module name has `Internal`
   in the name and it’s too easy to have something that actually
   references the non-exposed module since the types are reexported.
3. I’ve added documentation that mentions this issue.
4. I’ve added a warning if your exposed-modules are excluding some
   modules. Maybe worth turning this into an error in the future.

changelog_begin
changelog_end

* Update compiler/damlc/lib/DA/Cli/Damlc/Packaging.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
2020-04-01 13:57:52 +02:00
..
daml-helper Make new sandbox the default. (#5295) 2020-03-31 12:50:21 +00:00
daml-project-config/DA/Daml/Project replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00
daml-sdk Organize maven coordinates (#5272) 2020-04-01 11:41:18 +02:00
exe/DA/Daml Whitelist fetch-dar command in assistant telemetry (#5261) 2020-03-30 10:39:55 +02:00
integration-tests Improve handling of exposed-modules with data-dependencies (#5330) 2020-04-01 13:57:52 +02:00
scala-daml-project-config Organize maven coordinates (#5272) 2020-04-01 11:41:18 +02:00
src/DA/Daml/Assistant replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00
test/DA/Daml/Assistant Move 'withEnv', call it from daml2ts tests (#5276) 2020-03-30 17:20:47 +00:00
BUILD.bazel Move 'withEnv', call it from daml2ts tests (#5276) 2020-03-30 17:20:47 +00:00
daml-project-config.cabal update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
get-daml.sh replace DAML Authors with DA in copyright headers (#5228) 2020-03-27 01:26:10 +01:00