-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
check symlinks work on windows on artifact hash mismatch #3745
check symlinks work on windows on artifact hash mismatch #3745
Conversation
This works on my Windows computer. If I turn off "Developer Mode" and delete the existing artifacts I get: julia> using Pkg
julia> Pkg.add("NativeFileDialog")
Resolving package versions...
ERROR: Unable to automatically download/install artifact 'iso_codes' from sources listed in 'C:\Users\nzimm\.julia\packages\iso_codes_jll\wcUPz\Artifacts.toml'.
Sources attempted:
- https://pkg.julialang.org/artifact/71f68a3d55d73f2e15a3969c241fae2349b1feb5
Error: Tree Hash Mismatch!
Expected git-tree-sha1: 71f68a3d55d73f2e15a3969c241fae2349b1feb5
Calculated git-tree-sha1: 409d6ac4c02dae43ff4fe576b5c5820d0386fb3f"
Note: Julia cannot create symlinks, which may be the reason for the hash mismatch.
You may need to activate Developer Mode in Windows.
- https://github.com/JuliaBinaryWrappers/iso_codes_jll.jl/releases/download/iso_codes-v4.11.0+0/iso_codes.v4.11.0.any.tar.gz
Error: Tree Hash Mismatch!
Expected git-tree-sha1: 71f68a3d55d73f2e15a3969c241fae2349b1feb5
Calculated git-tree-sha1: 409d6ac4c02dae43ff4fe576b5c5820d0386fb3f"
Note: Julia cannot create symlinks, which may be the reason for the hash mismatch.
You may need to activate Developer Mode in Windows.
When I turn "Developer Mode" back on I can add |
Co-authored-by: Nathan Zimmerberg <39104088+nhz2@users.noreply.github.com>
8c14061
to
2c11dd7
Compare
src/Artifacts.jl
Outdated
Note: Julia cannot create symlinks, which may be the reason for the hash mismatch. | ||
You may need to activate Developer Mode in Windows. | ||
If you cannot you can set the env var `JULIA_PKG_IGNORE_HASHES=1` to ignore artifact hash mismatches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Julia cannot create symlinks, which may be the reason for the hash mismatch. | |
You may need to activate Developer Mode in Windows. | |
If you cannot you can set the env var `JULIA_PKG_IGNORE_HASHES=1` to ignore artifact hash mismatches. | |
Note: Julia cannot create symlinks, which may be the reason for the hash mismatch. | |
One solution is to activate Developer Mode in Windows, for instructions on how to do that, see: | |
https://learn.microsoft.com/en-us/gaming/game-bar/guide/developer-mode | |
An alternative path is to set the environment variable `JULIA_PKG_IGNORE_HASHES=1` | |
to ignore artifact hash mismatches, however this is generally not recommended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM but this might be a more appropriate link? https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that my link has "gaming" in it, but the link you posted is also really confusing because it doesn't actually tell you how to enable developer mode, the only instructions it gives are for responding to a popup inside of visual studio. There's no instructions telling you to go to "updates and security" and flip the toggle, that's why I didn't use it.
Also, there are lots of warnings on that site that say things like If you're not creating your own applications on your PC, you don't need to enable Developer Mode.
, or If you're using your computer for ordinary day-to-day activities (such as gaming, web browsing, email, or Office apps), you don't need to activate Developer Mode, and in fact, you shouldn't activate it.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah fair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to tell people to set an environment variable on Windows, stating ENV["JULIA_PKG_IGNORE_HASHES"] = 1
explicitly, might be good. Otherwise, we will need to get into the details on how to do that in either the Cmd.exe shell or PowerShell.
- Cmd.exe:
set JULIA_PKG_IGNORE_HASHES=1
- PowerShell:
$env:JULIA_PKG_IGNORE_HASHES=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add an easier way to do it given we're changing julia in adding this message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tweaked the wording to make it clearer to users and guide them to use ENV so they're more likely to do it temporarily
Co-authored-by: Elliot Saba <staticfloat@gmail.com>
For if #3643 isn't otherwise fixable