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

Avoid including daml-stdlib and daml-prim twice #4222

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

cocreature
Copy link
Contributor

This fixes #4114 and cleans up the situation around
data-dependencies and dependencies as described in #4218.

There is still more work to be done here mostly around ironing out all
the edge cases and producing useful error messages instead of
silentely doing the wrong thing but I’ll leave that to a separate PR.

To test this, I’ve fixed the packaging tests to no longer deduplicate
package ids (which means they would return the wrong number if
daml-prim ends up in there twice) and I addded a test where we have 3
projects:

  • lib
  • a which depends on lib
  • b which depends on lib via dependencies and 'a' via
    data-dependencies.

changelog_begin
changelog_end

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
  • 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.

This fixes #4114 and cleans up the situation around
`data-dependencies` and `dependencies` as described in #4218.

There is still more work to be done here mostly around ironing out all
the edge cases and producing useful error messages instead of
silentely doing the wrong thing but I’ll leave that to a separate PR.

To test this, I’ve fixed the packaging tests to no longer deduplicate
package ids (which means they would return the wrong number if
daml-prim ends up in there twice) and I addded a test where we have 3
projects:

- `lib`
- `a` which depends on `lib`
- `b` which depends on `lib` via `dependencies` and 'a' via
  `data-dependencies`.

changelog_begin
changelog_end
@cocreature cocreature requested review from a user and nickchapman-da January 27, 2020 13:19
@cocreature cocreature requested a review from hurryabit as a code owner January 27, 2020 13:19
]
writeFileUTF8 (tmpDir </> "lib" </> "Lib.daml") $ unlines
[ "daml 1.2 module Lib where"
, "inc : Int -> Int"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you think left-pad was the most useless library, think again!

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.

Awesome! Thank you very much!

@@ -40,7 +42,7 @@ import SdkVersion
data Env = Env
{ envPkgs :: MS.Map UnitId LF.Package
, envGetUnitId :: LF.PackageRef -> UnitId
, envStablePackages :: MS.Map LF.PackageId (UnitId, LF.ModuleName)
Copy link

Choose a reason for hiding this comment

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

nice :-)

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.

daml-stdlib/daml-prim should not get included twice
1 participant