nix-community / nix-vscode-extensions

Nix expressions for VSCode and OpenVSX extensions [maintainers: @deemp, @AmeerTaweel]
MIT License
234 stars 13 forks source link

Support platform-specific exts, improve cache eviction, add release attrset, filter by vscode version #21

Closed deemp closed 1 year ago

deemp commented 1 year ago

This PR introduces the following features.

  1. To close https://github.com/nix-community/nix-vscode-extensions/issues/17, for each extension, I recorded how many times it was missing in the responses from a site. When an extension is missing, it's fetched during an automated update along with the new extensions from a response. The missing times counter of such an extension is incremented. If an extension is missing in the responses a specified number of times it is not tried again and thus gets evicted from cache.

  2. To close https://github.com/nix-community/nix-vscode-extensions/issues/5 and close https://github.com/nix-community/nix-vscode-extensions/issues/20, I now fetch the platform-specific extensions and put them into the common extensions attrset along with the universal extensions. If an extension has both universal and non-universal versions, the non-universal version is preferred.

  3. To close https://github.com/nix-community/nix-vscode-extensions/issues/18, I added a separate attrset that can be generated via extensions.${system}.vscode-marketplace-release.

  4. To address the suggestion https://github.com/nix-community/nix-vscode-extensions/issues/18#issuecomment-1543488680, I added an attrset that contains the extensions compatible with VSCode of "your-version". This attrset can be generated like (extensions.${system}.forVSCodeVersion "your-version").vscode-extensions.