-
Notifications
You must be signed in to change notification settings - Fork 13
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
vscode version compatablity fix #48
Comments
I saw #41 and am not a huge fan of having to generate lock file for extensions. i use this script to figure out what version to pin to with builtins; let
pkgs = import <nixpkgs> { };
inherit (pkgs) lib;
currentVersion = "1.84.2";
checkVersion = v: all (f: f v) [
(lib.versionAtLeast currentVersion)
(lib.versionOlder (lib.versions.major currentVersion))
];
file = ./data/cache/vscode-marketplace-latest.json;
json = lib.importJSON file;
packages = filter (p: lib.strings.hasPrefix "github" p.publisher) json;
getStripVersion = x: lib.strings.removePrefix "^" x.engineVersion;
byVersion = groupBy getStripVersion packages;
byMajor = groupBy lib.versions.major (attrNames byVersion);
compatableVersions = filter checkVersion (attrNames byVersion);
versionsThisMajor = byMajor.${(lib.versions.major currentVersion)};
tooOldFor = lib.subtractLists compatableVersions versionsThisMajor;
howBad = lib.flatten (lib.attrVals tooOldFor byVersion);
in
trace howBad (length howBad) is it possible include latest extensions supported by code in nixpkgs-unstable by running through the git history of the cache? it's not hard to program. i'm just wondering if the scrapper will stay up. |
@lizelive, you may try, but AFAIR there were changes to the JSON file format, so the scrapper may not work sometimes. |
at very least make sure to have version that works with nix-vscode-extensions.inputs.nixpkgs
gets the highest engineVersion
The text was updated successfully, but these errors were encountered: