Skip to content

References to upstream click causing further side effects #1754

@Meizzajanor

Description

@Meizzajanor

A few hours ago, I submitted #1750 and its corresponding fix #1751 , due to the lack of a direct reference to click in the dependency tree breaking robocop entirely.

With the fix, it works, but there are still several side effects. Take a look, for example, at this commit in the megalinter repo, where nvuillam notes:

robocop 8.2.9 mixes externally-installed click with typer 0.26's vendored
click. The 'click.version_option' decorator on the typer group silently
fails to register --version, so 'robocop --version' returns 'No such option'.
Use the venv's Python and importlib.metadata to read the installed version
until upstream fixes the typer/click integration.

Similarly, several exception types imported from upstream click will now not be caught properly due to them being exposed via the typer wrapper instead under the new vendoring setup.

The real best approach is to avoid relying on click entirely and to port all code to typer instead, as well as use the same approach as megalinter for the version issue in particular. I will be submitting a PR to this effect momentarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions