Open ca-scribner opened 1 month ago
Hi! Thanks for the report. I've fixed the error message in https://github.com/canonical/charmcraft/pull/1955.
It should now correctly give an error like:
1 validation error for CharmLib
version
Input should be a valid string [type=string_type, input_value=1.1, input_type=float]
For further information visit https://errors.pydantic.dev/2.9/v/string_type
Bug Description
charmcraft.yaml's
charm-libs[*].version
fields (I think?) require string inputs. If set to an integer when invokingcharmcraft fetch-libs
, we see the error:The error message and log are not very instructive about the root cause. It would be great to have a more helpful error message here.
To Reproduce
Set charmcraft.yaml's charm-libs versions to an integer, eg:
then run
charmcraft fetch-libs
Environment
charmcraft 3.2.1 (I think 3.1.x did not have this behaviour)
charmcraft.yaml
Relevant log output