Skip to content

Misleading error message when a component is not found #1596

@Yatekii

Description

@Yatekii

When one tries to install a component on a a toolchain which does not have that component, you get a message like this:

error: component 'rls' for target 'x86_64-unknown-linux-gnu' is unavailable for download

This message implies that the component does not exist for your architecture. But it in fact means it's not available for the currently selected toolchain, which is not mentioned in the error message.
For example in my case I had the toolchain of my PWD overridden to nightly and this rls was not found. The error message suggested that rls is not available for my architecture. But in fact it was available; just for stable.

This can be very missleading as for example in my case I knew that the component existed for my architecture and I though that something completely different went wrong. Maybe my net or the likes.

In my opinion it is absolutely never enough to imply something in error messages (as in this case it is implied that the current toolchain is meant) because unfamiliar users, which get confronted with error messages like this the most, are not aware of the implications.

There is an easy fix to this: Add the complete name of the toolchain to this error message and all is good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions