forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of packages in damlc visual (digital-asset#5789)
* Fix handling of packages in damlc visual Previously we just ran the analysis on the modules of the main package. This failed for obvious reasons as soon as you reference a template from another package which happens pretty frequently (e.g. for anything that uses finlib). This PR fixes this to run the analysis on the whole World which is self-contained. This required a bunch of reshuffling to make sure that we always reference fully qualified identifiers but most of it is very mechanical. Note that currently you cannot distinguish between templates with identical names in the resulting graph (they will be separate but you have no idea which one is which). This was already an issue before if you have the same template name in different modules so I consider this an orthogonal issue. This fixes the expected failure we already had and I added another test that checks that colliding template names do at least show up as separate nodes in the graph. I also manually tested this against ex-bond-issuance. Disclaimier: I’m aware that the code is very messy but I tried to resist the urge to rewrite it completely and only change what was necessary. fixes digital-asset#5776 changelog_begin - [DAML Compiler] ``damlc visual`` now works properly in projects consisting of multiple packages. changelog_end * Rename templateChoiceId to templateId changelog_begin changelog_end
- Loading branch information
1 parent
4c99f67
commit 8f9cdee
Showing
7 changed files
with
184 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ da_haskell_library( | |
"containers", | ||
"extra", | ||
"filepath", | ||
"mtl", | ||
"open-browser", | ||
"text", | ||
"safe", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.