nix-community / nix-vscode-extensions

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

ms-vscode.cpptools has rolled back to an old version (1.7.1 instead of 1.20.0) #61

Closed FraGag closed 3 months ago

FraGag commented 3 months ago

I detected this issue because for some extensions, I'm using the derivation from upstream nixpkgs but the extension versions from nix-vscode-extensions. I'm running NixOS so I need the patches from nixpkgs for these extensions to work, but nixpkgs is slow to update VSCode extensions, so I use nix-vscode-extensions to get updates more frequently. (Yes, this setup tends to break often.)

Since commit 9a610eef24e656d771df4097da761d458dd7fc97, the flake exposes version 1.7.1 of ms-vscode.cpptools instead of 1.20.0 on x86_64-linux:

$ nix eval github:nix-community/nix-vscode-extensions/57e9fd03e06ce8f86fb31523f72d11e3026ff8a5#extensions.x86_64-linux.vscode-marketplace.ms-vscode.cpptools.version
"1.20.0"

$ nix eval github:nix-community/nix-vscode-extensions/9a610eef24e656d771df4097da761d458dd7fc97#extensions.x86_64-linux.vscode-marketplace.ms-vscode.cpptools.version
"1.7.1"

I noticed that in data/cache/vscode-marketplace-latest.json, there's a line for 1.7.1 of ms-vscode.cpptools for the "universal" platform, and in commit 9a610eef24e656d771df4097da761d458dd7fc97, it moved from before the more recent platform-specific lines to after them.

@@ -35369,34 +35621,38 @@
 , {"engineVersion":"^1.75.0","lastUpdated":"2024-01-19T23:50:59.02Z","missingTimes":0,"name":"azurecli","platform":"universal","publisher":"ms-vscode","sha256":"sha256-G+dDdAc4xeHYQRSx2e4KcwZnSyDOR5Y04NMGgJ1ztNM=","version":"0.6.0"}
 , {"engineVersion":"^1.6.0","lastUpdated":"2021-02-26T01:01:38.197Z","missingTimes":0,"name":"brackets-keybindings","platform":"universal","publisher":"ms-vscode","sha256":"sha256-FKn79LIxfuRcMZErlyEZOYoRU4jRYaKmldoeRPZLWA4=","version":"0.1.1"}
 , {"engineVersion":"^1.51.0","lastUpdated":"2021-02-26T01:00:52.19Z","missingTimes":0,"name":"brackets-pack","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/5+cXP7LjNAru7QSZM4IXFcSEYRe84AsKQW9cefWlY8=","version":"0.1.1"}
-, {"engineVersion":"^1.63.0","lastUpdated":"2024-03-29T04:20:09.953Z","missingTimes":2,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/Bb1cKOxoXzNEdVfh4kWadFz1mpaqv57K+BbBBVzK2Y=","version":"1.18.16"}
-, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-03T04:18:41.343Z","missingTimes":0,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-SIIMglXX+OJVYUDcMgR7BPnJlXR1iX7ql1h2hCQQmN8=","version":"1.18.17"}
-, {"engineVersion":"^1.60.0","lastUpdated":"2021-10-20T02:54:55.43Z","missingTimes":0,"name":"cpptools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-2vgkfpoQCA+1B4r3h2YjBhnxYf2inCojNDFXALh9hkE=","version":"1.7.1"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-03-29T04:20:09.953Z","missingTimes":3,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-/Bb1cKOxoXzNEdVfh4kWadFz1mpaqv57K+BbBBVzK2Y=","version":"1.18.16"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-03T04:18:41.343Z","missingTimes":1,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-SIIMglXX+OJVYUDcMgR7BPnJlXR1iX7ql1h2hCQQmN8=","version":"1.18.17"}
+, {"engineVersion":"^1.63.0","lastUpdated":"2024-04-05T04:17:37.663Z","missingTimes":0,"name":"cmake-tools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-lxZFVW3P/tFF37/G0jSzO52xyB35rpB7TdYn4xBtXyA=","version":"1.18.19"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:36:56.033Z","missingTimes":0,"name":"cpptools","platform":"linux-x64","publisher":"ms-vscode","sha256":"sha256-hnLIvqKXCwrVCPCX5zriZWf5om0m073qK19gubvgaq8=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:35:36.363Z","missingTimes":0,"name":"cpptools","platform":"linux-arm64","publisher":"ms-vscode","sha256":"sha256-WMZxpaGWswH6cvd4DpdnkuV9Oabe4CFTPT5871/thAQ=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:36:31.703Z","missingTimes":0,"name":"cpptools","platform":"darwin-x64","publisher":"ms-vscode","sha256":"sha256-5Xz7nzqSG7rhLLtogZqUy0vSgO4umlkMUzba3uL6tjk=","version":"1.20.0"}
 , {"engineVersion":"^1.67.0","lastUpdated":"2024-03-26T22:34:37.72Z","missingTimes":0,"name":"cpptools","platform":"darwin-arm64","publisher":"ms-vscode","sha256":"sha256-y7DhVcz3diTgTNHjIboyhoQ7R7AkB/UXJ5c5u8hav+8=","version":"1.20.0"}
+, {"engineVersion":"^1.60.0","lastUpdated":"2021-10-20T02:54:55.43Z","missingTimes":0,"name":"cpptools","platform":"universal","publisher":"ms-vscode","sha256":"sha256-2vgkfpoQCA+1B4r3h2YjBhnxYf2inCojNDFXALh9hkE=","version":"1.7.1"}
 , {"engineVersion":"^1.48.0","lastUpdated":"2022-09-01T21:59:39.913Z","missingTimes":0,"name":"cpptools-extension-pack","platform":"universal","publisher":"ms-vscode","sha256":"sha256-rHST7CYCVins3fqXC+FYiS5Xgcjmi7QW7M4yFrUR04U=","version":"1.3.0"}
 , {"engineVersion":"^1.30.0","lastUpdated":"2022-10-24T21:51:14.927Z","missingTimes":0,"name":"cpptools-themes","platform":"universal","publisher":"ms-vscode","sha256":"sha256-YWA5UsA+cgvI66uB9d9smwghmsqf3vZPFNpSCK+DJxc=","version":"2.0.0"}
 , {"engineVersion":"^1.65.0","lastUpdated":"2023-02-17T10:49:33.337Z","missingTimes":4,"name":"extension-activator","platform":"universal","publisher":"ms-vscode","sha256":"sha256-97mSebLFpaAROSIvp6U+GuB+Dsz8ndThEGaYBkFB6c0=","version":"0.0.2"}

Looking at earlier commits, it appears the change is intentional:

However, it doesn't appear to be working as expected. Perhaps a version sort is not implemented correctly somewhere and it thinks 1.7.1 is more recent than 1.20.0? (A naïve textual sort would indeed claim so.)

cc @yacinehmito, @deemp

yacinehmito commented 3 months ago

I think this is exactly what is happening. The sort is textual. I'll see how to fix this.

yacinehmito commented 3 months ago

@deemp Would you accept the introduction of this type? It seems like the implementation of Ord will do right thing. https://hackage.haskell.org/package/base-4.19.1.0/docs/Data-Version.html

deemp commented 3 months ago

@FraGag, I believe the problem is fixed now.

nix eval github:nix-community/nix-vscode-extensions/c4c7f030776a8092de2f05e339f0cd9a68e40bd8#extensions.x86_64-linux.vscode-marketplace.ms-vscode.cpptools.version
"1.20.0"
deemp commented 3 months ago

@yacinehmito, I used versions and I liked that package :)

FraGag commented 3 months ago

I confirm the issue is fixed. Thanks!