Align allowed package names between build and dependencies.
See original GitHub issueI 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:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.”
@hurryabit , @bame-da This is a limitation by
ghc-pkg
. Valid package id’s forghc-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 patchghc-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.