Clemapfel / Mousetrap.jl

Finally, a GUI Engine made for Julia

Home Page:https://clemens-cords.com/mousetrap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to download artifact `iso_codes`

archermarx opened this issue · comments

Hi,

I'm trying to install Mousetrap but getting the following error:

 Downloaded artifact: iso_codes
  Downloaded artifact: iso_codes
ERROR: Unable to automatically download/install artifact 'iso_codes' from sources listed in 'C:\Users\thoma\.julia\packages\iso_codes_jll\jLhko\Artifacts.toml'.
Sources attempted:
- https://pkg.julialang.org/artifact/695a3abd0af051dab62687501b9a61ad91c831a3
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   695a3abd0af051dab62687501b9a61ad91c831a3
  Calculated git-tree-sha1: 1719102ef324df43b9fe123a231c2ee630931a03
- https://github.com/JuliaBinaryWrappers/iso_codes_jll.jl/releases/download/iso_codes-v4.15.0+0/iso_codes.v4.15.0.any.tar.gz
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   695a3abd0af051dab62687501b9a61ad91c831a3
  Calculated git-tree-sha1: 1719102ef324df43b9fe123a231c2ee630931a03

Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] ensure_artifact_installed(name::String, meta::Dict{…}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Artifacts.jl:422
  [3] 
    @ Pkg.Operations C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:755
  [4] add(ctx::Pkg.Types.Context, pkgs::Vector{…}, new_git::Set{…}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1394
  [5] add
    @ C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\Operations.jl:1376 [inlined]
  [6] add(ctx::Pkg.Types.Context, pkgs::Vector{…}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::@Kwargs{…})
    @ Pkg.API C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:278
  [7] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})
    @ Pkg.API C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:159
  [8] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:148
  [9] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:146 [inlined]
 [10] add(; name::Nothing, uuid::Nothing, version::Nothing, url::String, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::@Kwargs{})
    @ Pkg.API C:\Users\thoma\.julia\juliaup\julia-1.10.0-rc3+0.x64.w64.mingw32\share\julia\stdlib\v1.10\Pkg\src\API.jl:176
 [11] top-level scope
    @ c:\Users\thoma\magnetic_nozzles\mousetrap.jl:9
Some type information was truncated. Use `show(err)` to see complete types.

This results from running the following code:

import Pkg
begin
    Pkg.add(url="https://github.com/clemapfel/mousetrap_jll")
    Pkg.add(url="https://github.com/clemapfel/mousetrap.jl")
end

My system info is:

Host Name:               
OS Name:                   Microsoft Windows 11 Pro for Workstations
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:         
Registered Organization:   HP Inc.
Product ID:                00391-70000-00000-AA778
Original Install Date:     11/7/2022, 2:50:36 PM
System Boot Time:          1/10/2024, 1:46:52 AM
System Manufacturer:       HP
System Model:              HP ZBook Studio G5
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2712 Mhz
BIOS Version:              HP Q71 Ver. 01.26.00, 9/25/2023
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC-05:00) Eastern Time (US & Canada)
Total Physical Memory:     32,614 MB
Available Physical Memory: 16,472 MB
Virtual Memory: Max Size:  41,318 MB
Virtual Memory: Available: 8,552 MB
Virtual Memory: In Use:    32,766 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:             
Hotfix(s):                 4 Hotfix(s) Installed.
                           [01]: KB5033920
                           [02]: KB5012170
                           [03]: KB5034123
                           [04]: KB5032393

Turing on "Developer Mode" on Windows 11 fixed the issue for me

This got fixed for iso_codes_jll in JuliaPackaging/Yggdrasil#7926

However, from what I can tell Mousetrap also depends on libadwaita_jll.

This artifact contains the following symlinks as well.

     "bin/gdk-pixbuf-pixdata" => "/usr/bin/gdk-pixbuf-pixdata"
 "bin/glib-compile-resources" => "/usr/bin/glib-compile-resources"
   "bin/glib-compile-schemas" => "/usr/bin/glib-compile-schemas"

I don't think those files exist on Windows.

Code
julia> using Tar: Tar

julia> using Pkg: Pkg, PlatformEngines

julia> using Downloads: download

julia> function tar_get_symlinks(tarball_path::AbstractString)
           symlinks_output = Pair{String,String}[]
           Tar.list(`$(PlatformEngines.exe7z()) x $tarball_path -so`) do header::Tar.Header
               if (header.type == :symlink)
                   push!(symlinks_output, header.path=>header.link)
               end
               nothing
           end
           symlinks_output
       end
tar_get_symlinks (generic function with 1 method)

julia> tar_get_symlinks(download("https://github.com/JuliaBinaryWrappers/libadwaita_jll.jl/releases/download/libadwaita-v1.2.0+0/libadwaita.v1.2.0.x86_64-w64-mingw32.tar.gz"))
3-element Vector{Pair{String, String}}:
     "bin/gdk-pixbuf-pixdata" => "/usr/bin/gdk-pixbuf-pixdata"
 "bin/glib-compile-resources" => "/usr/bin/glib-compile-resources"
   "bin/glib-compile-schemas" => "/usr/bin/glib-compile-schemas"

That's weird but yeah it doesn't seem to be related to anything I have control over, it seems to be an issue with libadwaita_jll, which is crucial to mousetrap, but is maintained by GNOME or the GTK4.jl people.

I will keep this issue open so people know to turn on developer mode. Thank you.