question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Align allowed package names between build and dependencies.

See original GitHub issue

I can compile a project with name 1_Foo, but not use it as a data-dependency. I get

ghc-pkg: 0: Parse of field '
unexpected all digits in portion of unqualified component name

MyProject
' failed.
damlc: callProcess: /Users/bernhardelsner/.daml/sdk/1.5.0-snapshot.20200902.5118.0.2b3cf1b3/damlc/resources/ghc-pkg "recache" "--global-package-db=.daml/package-database/1.8/package.conf.d" "--expand-pkgroot" (exit 1): failed

We should either restrict project names, or fix dependencies with such names. The latter would be better as projects with _ in their name may already exist “out there”, but either is fine.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
bame-dacommented, Dec 10, 2020

Could we make it a warning? Something like “Package names/versions should have format [RegExp]. You may be able to compile packages with different formats, but you will not be able to use them as dependencies in other projects. Unsupported package names or versions may start causing compilation errors without warning.”

1reaction
robin-dacommented, Dec 9, 2020

@hurryabit , @bame-da This is a limitation by ghc-pkg. Valid package id’s for ghc-pkg are specified by : https://downloads.haskell.org/~ghc/latest/docs/html/libraries/Cabal-3.2.0.0/Distribution-Types-PackageId.html. In particular, _ is not allowed in package names. My suggestion is to disallow underscores as well since we don’t want to patch ghc-pkg. This would however be a breaking change in DAML-LF. Thus, we could simply throw an error when parsing the package id from the daml.yaml and leave DAML-LF untouched.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven repackage transitive dependencies - Stack Overflow
In most cases it is better to try to align the dependencies so that you use the same versions in most places and...
Read more >
Sharing dependency versions between projects
A version catalog is a list of dependencies, represented as dependency coordinates, that a user can pick from when declaring dependencies in a...
Read more >
Managing Transitive Dependencies - API Manual
Dependency version alignment allows different modules belonging to the same logical group (a platform) to have identical versions in a dependency graph.
Read more >
The build2 Package Manager
This document describes bpkg , the build2 package dependency manager. For the package manager command line interface refer to the bpkg(1) man pages....
Read more >
Go Modules Reference - The Go Programming Language
The go command starts by searching the build list for modules with paths that are prefixes of the package path. For example, if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found