Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Path #27

Open
vbrandl opened this issue Nov 24, 2019 · 0 comments · May be fixed by #28
Open

Download Path #27

vbrandl opened this issue Nov 24, 2019 · 0 comments · May be fixed by #28

Comments

@vbrandl
Copy link
Member

vbrandl commented Nov 24, 2019

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

@vbrandl vbrandl linked a pull request Nov 24, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant