This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
Having an invalid package dependency that looks like an opam-versioned package
|
||||
gives a good user message rather. It is very likely that users will type
|
||||
foo.1.2.3 for a package version due to the convention in opam.
|
||||
In this case we could also hint at the correct syntax for dune-project files.
|
||||
|
||||
$ . ./helpers.sh
|
||||
$ mkrepo
|
||||
$ mkpkg foo 1.2.3
|
||||
$ cat > dune-project <<EOF
|
||||
> (lang dune 3.13)
|
||||
> (package
|
||||
> (name invalid)
|
||||
> (depends foo.1.2.3))
|
||||
> EOF
|
||||
$ add_mock_repo_if_needed
|
||||
|
||||
$ dune pkg lock 2>&1
|
||||
File "dune-project", line 4, characters 10-19:
|
||||
4 | (depends foo.1.2.3))
|
||||
^^^^^^^^^
|
||||
Error: "foo.1.2.3" is an invalid package dependency.
|
||||
Package names can contain letters, numbers, '-', '_' and '+', and need to
|
||||
contain at least a letter.
|
||||
Hint: (foo (= 1.2.3)) would be a correct package dependency
|
||||
[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue