In opam the convention is to write foo.1.2.3 for a package version. For new users, it is not obvious that this doesn't work in Dune immediately. They may try something like this in dune-project:
(lang dune 3.13)
(package
(name invalid)
(depends foo.1.2.3))
Currently we raise an ugly uncaught exception when runnning dune pkg lock:
Error: exception Failure("Invalid character in package name \"foo.1.2.3\"")
the reproduction case is in #9269. We should instead raise a nice user message with a hint with something like:
Hint: replace "foo.1.2.3" with "(foo (= 1.2.3))".
We don't even validate the package name at all when running dune build. The reproduction case can be found in #9271.