alire icon indicating copy to clipboard operation
alire copied to clipboard

Unknown license - Error message looks odd

Open jquorning opened this issue 2 years ago • 3 comments

When I enter an unknown license - Typolicense in this case - in a crate manifest and do ie:

alr --no-tty index --check

The error message looks odd:

ERROR: Loading release from /Users/jquorning/Alire/indexes/example/ex/example/example-0.0.0.toml:
ERROR:    licenses:
ERROR:    licenses:
ERROR:    Loading release from /Users/jquorning/Alire/indexes/example/ex/example/example-0.0.0.toml:
ERROR:    licenses:
ERROR:    licenses:
ERROR:    Invalid license expression 'Typolicense': Invalid license ID: 'Typolicense' (1:11) . SPDX expression expected (https://spdx.org/licenses/)

jquorning avatar Jul 20 '22 20:07 jquorning

Hi @jquorning,

Which part looks odd?

Fabien-Chouteau avatar Jul 21 '22 07:07 Fabien-Chouteau

The message has duplicate, and what look like debugging information.

I think this would be more appropriate:

ERROR: Loading release from /Users/jquorning/Alire/indexes/example/ex/example/example-0.0.0.toml:
ERROR:    Invalid license expression 'Typolicense': Invalid license ID: 'Typolicense' (1:11) . SPDX expression expected (https://spdx.org/licenses/)

jquorning avatar Jul 29 '22 18:07 jquorning

The message has duplicate, and what look like debugging information.

This is a legitimate problem in how our scoping of errors works right now. It should be possible to remove these duplicates.

mosteo avatar Jul 31 '22 09:07 mosteo

Duplicate messages are fixed in #1490

mosteo avatar Feb 04 '24 14:02 mosteo