Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
This repository was archived by the owner on May 15, 2025. It is now read-only.

Download Path #27

@vbrandl

Description

@vbrandl

The downloader loads the checker in the same directory as the downloader executable. This creates two problems:

  • The downloader might be located in a non-writable directory (at least for the user, e.g. /usr/bin, or inside the nix store). If this is the case, the downloader will fail with an IO error
  • There might be multiple binaries of the downloader in the system and each one will download the checker itself. This creates unnecessary traffic and takes more disk space

I propose to download the checker into $XDG_CACHE_HOME/editorconfig-checker/ec-${version}

This gives us a few more advantages:

The current state of the downloader does not store the version number of the checker binary but just checks if any ec binary exists. If you run v2.0.3 of the downloader it will download v2.0.3 of the checker but if the loader gets updated to 2.0.4, there is no (easy) way to determine if the already existing binary is also v2.0.4. If the checker is stored as $XDG_CACHE_HOME/editorconfig-checker/ec-${version}, we can determine if we need to download a new version of the checker.

Also this allows using multiple versions of the downloader and checker at the same time without any conflicts

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