Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include package name in manifest file #3805

Merged
merged 1 commit into from
Dec 10, 2019
Merged

Include package name in manifest file #3805

merged 1 commit into from
Dec 10, 2019

Conversation

cocreature
Copy link
Contributor

@cocreature cocreature commented Dec 10, 2019

Currently, we generate the depends field in the ghc-pkg config file
based on the file name of the DARs in the dependencies field in
daml.yaml. This falls apart when you use the -o option to daml build since ghc-pkg will complain about missing packages.

This PR adds the name to the manifest so that we can generate the
depends field based on that but I’ll leave that change for a
separate PR.

See https://github.com/digital-asset/daml/blob/master/compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Dar.hs#L289

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags, if appropriate
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

Currently, we generate the `depends` field in the ghc-pkg config file
based on the file name of the DARs in the `dependencies` field in
`daml.yaml`. This falls apart when you use the -o option to `daml
build` since `ghc-pkg` will complain about missing packages.

This PR adds the name to the manifest so that we can generate the
`depends` field based on that but I’ll leave that change for a
separate PR.
@cocreature cocreature requested review from a user and nickchapman-da December 10, 2019 14:48
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@cocreature cocreature merged commit 4413ecc into master Dec 10, 2019
@cocreature cocreature deleted the manifest-pkgname branch December 10, 2019 16:12
cocreature added a commit that referenced this pull request Dec 11, 2019
Previously, we derived this based on the DAR name which breaks if you
use -o with rather confusing error messages. Now, we read it from the
`Name` field in the manifest that we added in
#3805.
cocreature added a commit that referenced this pull request Dec 11, 2019
Previously, we derived this based on the DAR name which breaks if you
use -o with rather confusing error messages. Now, we read it from the
`Name` field in the manifest that we added in
#3805.

CHANGELOG_BEGIN

- [DAML Compiler] Fix an issue where transitive package dependencies
  resulted in packages not being found, if the DAR name was changed with
  `-o`.

CHANGELOG_END
cocreature added a commit that referenced this pull request Dec 11, 2019
* Fix package names in depends field in pkg configs

Previously, we derived this based on the DAR name which breaks if you
use -o with rather confusing error messages. Now, we read it from the
`Name` field in the manifest that we added in
#3805.

CHANGELOG_BEGIN

- [DAML Compiler] Fix an issue where transitive package dependencies
  resulted in packages not being found, if the DAR name was changed with
  `-o`.

CHANGELOG_END

* Fix package dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant