-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Wrong hash for jupyter extension #18
Comments
This bug can be reproduced. nix4vscode uses nix-prefetch-url to calculate the hash of the file. However, the inconsistency between nix-prefetch-url and the hash calculated by nix causes this problem. Consider this a bug in nix-prefetch-url. The following are related issues: |
I compared the output of $ echo $NIX_PREFETCH_URL_OUTPUT
11dq86kxm3yqyykrv7xnq8nfim0jx16ni6hj75chbhsynvdjkb8x
/nix/store/2di7lv008fv7b71zd9p2w94dq3j6lfa9-Microsoft.VisualStudio.Services.VSIXPackage
$ NIX_PREFETCH_URL_OUTPUT=$(nix-prefetch-url https://ms-toolsai.gallerycdn.vsassets.io/extensions/ms-toolsai/jupyter/2024.1.2024012502/1706210577096/Microsoft.VisualStudio.Services.VSIXPackage --print-path | tail -n1)
$ NIX_BUILD_OUTPUT=$(nix-build --expr 'with import <nixpkgs> { }; (vscode-utils.extensionFromVscodeMarketplace {
name = "jupyter";
publisher = "ms-toolsai";
version = "2024.1.2024012502";
sha256 = "sha256-q4y8TGEzqd0J6GREvDdXnkL7/xYXOXk+TkvEaX3A40o=";
}).src')
$ diffoscope $NIX_PREFETCH_URL_OUTPUT $NIX_BUILD_OUTPUT
... The diffoscope result shows that the file are fairly different. The interesting bit, I guess is: - <Identity Language="en-US" Id="jupyter" Version="2024.1.2024012502" Publisher="ms-toolsai" TargetPlatform="alpine-x64"/>
+ <Identity Language="en-US" Id="jupyter" Version="2024.1.2024012502" Publisher="ms-toolsai" TargetPlatform="alpine-arm64"/> (notice the different If I force the arch in the call to |
Confirmed to be a problem with nix4vscode. it does not handle target_platform |
close #18 Signed-off-by: DragonBillow <[email protected]>
I add a patch fix this: #21 . Is it suitable for you? |
close #18 Signed-off-by: DragonBillow <[email protected]>
close #18 Signed-off-by: DragonBillow <[email protected]>
Yes it fixes the hash problem! :) Second: [[extensions]]
publisher_name = "ms-toolsai"
extension_name = "jupyter"
[[extensions]]
publisher_name = "ms-toolsai"
extension_name = "jupyter-keymap" and then building with the generated extensions.nix file will raise |
I add two commit fix these questions, now the log will always print to stderr, and ensure previous attr not be overrited. note that nix4vscode have a option |
close #18 Signed-off-by: DragonBillow <[email protected]>
Yes, the new branch changes a lot of logic and requires more testing. I need some time to fix them.
…________________________________
From: Leon ***@***.***>
Sent: Monday, March 4, 2024 10:20:57 PM
To: nix-community/nix4vscode ***@***.***>
Cc: DragonBillow ***@***.***>; Comment ***@***.***>
Subject: Re: [nix-community/nix4vscode] Wrong hash for jupyter extension (Issue #18)
Ah I didn't know about the -o option maybe should add this to the README.
And yeah the fixes work!
However, the new branch seems to pull outdated versions for some extensions (see below) compared to the main branch.
swappy-20240304_151601.png (view on web)<https://github.com/nix-community/nix4vscode/assets/99900077/829d303d-ce3f-49e5-b959-a0aca6350a8a>
―
Reply to this email directly, view it on GitHub<#18 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKBJ6AL22DV235IP6M2QY5DYWR7MTAVCNFSM6AAAAABECVN4XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWGY4DSMJWGY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Sure sure! Should I open a new issue for the outdated versions? :) |
No, I will fix these bugs together before integrating them into the main line so as not to disrupt other people's existing workflows.
…________________________________
From: Leon ***@***.***>
Sent: Monday, March 4, 2024 10:59:23 PM
To: nix-community/nix4vscode ***@***.***>
Cc: DragonBillow ***@***.***>; Comment ***@***.***>
Subject: Re: [nix-community/nix4vscode] Wrong hash for jupyter extension (Issue #18)
Sure sure! Should I open a new issue for the outdated versions? :)
―
Reply to this email directly, view it on GitHub<#18 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKBJ6AOTQHZTYK2DWWMKKBLYWSD4XAVCNFSM6AAAAABECVN4XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWG43TMNZUHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
i push some commits today, does it fix these bugs? I test it locally, but I am afraid not cover corner case.
…________________________________
From: 张 龙涛 ***@***.***>
Sent: Monday, March 4, 2024 11:15:59 PM
To: nix-community/nix4vscode ***@***.***>; nix-community/nix4vscode ***@***.***>
Cc: Comment ***@***.***>
Subject: Re: [nix-community/nix4vscode] Wrong hash for jupyter extension (Issue #18)
No, I will fix these bugs together before integrating them into the main line so as not to disrupt other people's existing workflows.
________________________________
From: Leon ***@***.***>
Sent: Monday, March 4, 2024 10:59:23 PM
To: nix-community/nix4vscode ***@***.***>
Cc: DragonBillow ***@***.***>; Comment ***@***.***>
Subject: Re: [nix-community/nix4vscode] Wrong hash for jupyter extension (Issue #18)
Sure sure! Should I open a new issue for the outdated versions? :)
―
Reply to this email directly, view it on GitHub<#18 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKBJ6AOTQHZTYK2DWWMKKBLYWSD4XAVCNFSM6AAAAABECVN4XCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWG43TMNZUHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I think it works as you want. It pulls the same versions as the main branch and the other bugs also seem fixed. |
as a interesting result, the engine compatible in the package.json of jupyter 202401 is |
Yes it is |
is your system linux or macos? On macos, when you upgrade your flake, you need recreate icon in the dock. The best way is check the code's version by codes' reference, but not flake. |
Running linux ➜ ~ disfetch
\\ \\ // WE| leon @ leon-inspiron
\\ \\// RD| OS: nixos 24.05 (uakari)
::::://====\\ // GN| KERNEL: 6.7.6
/// \\// YW| ARCH: x86_64
""""//\\ ///"""" BE| UPTIME: 4 hours 23 minutes
// \\====//::::: MA| PACKAGES: 2634
//\\ \\ CN| SHELL: zsh
// \\ \\ BK| DESKTOP: hyprland
➜ ~ codium --version
1.86.2
27d855b2b4105a2aca2445223c8f3dc4694fbd58
x64 |
the reason is vscodium using openvsx but not vscode marketplace, but openvsx is outdated. If you Making vscoduim using vscode marketplace, you can using latest extension: |
nix4vscode doesn't support openvsx for now, If you use vscodium, I recommend you use vscode marketplace |
I plan to merge PR into the branch first. If you have other questions, please be free open a new issue. |
close #18 Signed-off-by: DragonBillow <[email protected]>
Somehow I get a wrong hash for the jupyter extension.
returns this:
When trying to build the system with this it gives me the following error. Inserting the correct hash into the nix expression manually works. For all my other extensions it works as well. Its just jupyter...
The text was updated successfully, but these errors were encountered: