Skip to content
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

Fixes for julia_version. Expand and consolidate julia_version tests. #4151

Merged
merged 12 commits into from
Feb 13, 2025

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Feb 9, 2025

Trying to clear the block for BinaryBuilder updating to a recent julia version.

Fixes a few issues

libcxxwrap_julia_jll: Error During Test at /Users/runner/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:225
  Got exception outside of a @test
  MethodError: no method matching abspath(::Nothing)
  The function `abspath` exists, but no method is defined for this combination of argument types.
  
  Closest candidates are:
    abspath(::String)
     @ Base path.jl:448
    abspath(::AbstractString)
     @ Base path.jl:614
    abspath(::AbstractString, AbstractString...)
     @ Base path.jl:468
  
  Stacktrace:
    [1] fixups_from_projectfile!(env::Pkg.Types.EnvCache)
      @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:229
    [2] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; allow_autoprecomp::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol)
      @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:1661
    [3] add
      @ ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:1631 [inlined]
    [4] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol, allow_autoprecomp::Bool, kwargs::@Kwargs{julia_version::VersionNumber, io::IOStream})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:317
    [5] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOStream, kwargs::@Kwargs{julia_version::VersionNumber})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:164
    [6] add
      @ ~/work/Pkg.jl/Pkg.jl/src/API.jl:151 [inlined]
    [7] add(; name::String, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::@Kwargs{julia_version::VersionNumber})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:181
    [8] add
      @ ~/work/Pkg.jl/Pkg.jl/src/API.jl:170 [inlined]
    [9] macro expansion
      @ ~/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:228 [inlined]
GMP_jll: Test Failed at /Users/runner/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:242
  Expression: ((Pkg.dependencies())[GMP_jll_UUID]).version === v"6.2.1+6"
   Evaluated: v"6.3.0+2" === v"6.2.1+6"
Stacktrace:
 [1] macro expansion
   @ ~/hostedtoolcache/julia/nightly/aarch64/share/julia/stdlib/v1.13/Test/src/Test.jl:679 [inlined]
 [2] macro expansion
   @ ~/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:242 [inlined]
 [3] macro expansion
   @ ~/hostedtoolcache/julia/nightly/aarch64/share/julia/stdlib/v1.13/Test/src/Test.jl:1771 [inlined]
 [4] macro expansion
   @ ~/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:241 [inlined]
 [5] macro expansion
   @ ~/hostedtoolcache/julia/nightly/aarch64/share/julia/stdlib/v1.13/Test/src/Test.jl:1771 [inlined]
 [6] (::Main.PkgTestsOuter.PkgTestsInner.HistoricalStdlibVersionsTests.var"#19#20")()
   @ Main.PkgTestsOuter.PkgTestsInner.HistoricalStdlibVersionsTests ~/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:206
GMP_jll: Error During Test at /Users/runner/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:239
  Got exception outside of a @test
  MethodError: no method matching abspath(::Nothing)
  The function `abspath` exists, but no method is defined for this combination of argument types.
  
  Closest candidates are:
    abspath(::String)
     @ Base path.jl:448
    abspath(::AbstractString)
     @ Base path.jl:614
    abspath(::AbstractString, AbstractString...)
     @ Base path.jl:468
  
  Stacktrace:
    [1] fixups_from_projectfile!(env::Pkg.Types.EnvCache)
      @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:229
    [2] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; allow_autoprecomp::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol)
      @ Pkg.Operations ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:1661
    [3] add
      @ ~/work/Pkg.jl/Pkg.jl/src/Operations.jl:1631 [inlined]
    [4] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, target::Symbol, allow_autoprecomp::Bool, kwargs::@Kwargs{julia_version::VersionNumber, io::IOStream})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:317
    [5] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOStream, kwargs::@Kwargs{julia_version::VersionNumber})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:164
    [6] add
      @ ~/work/Pkg.jl/Pkg.jl/src/API.jl:151 [inlined]
    [7] add(; name::String, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::@Kwargs{julia_version::VersionNumber})
      @ Pkg.API ~/work/Pkg.jl/Pkg.jl/src/API.jl:181
    [8] add
      @ ~/work/Pkg.jl/Pkg.jl/src/API.jl:170 [inlined]
    [9] macro expansion
      @ ~/work/Pkg.jl/Pkg.jl/test/historical_stdlib_version.jl:245 [inlined]

@IanButterworth IanButterworth changed the title Expand HistoricalStdlibVersions tests Expand and consolidate HistoricalStdlibVersions tests Feb 10, 2025
@IanButterworth IanButterworth force-pushed the ib/more_hsv_tests branch 3 times, most recently from 627aea8 to 775f3a1 Compare February 10, 2025 04:25
@IanButterworth IanButterworth changed the title Expand and consolidate HistoricalStdlibVersions tests Fixes for julia_version. Expand and consolidate julia_version tests. Feb 11, 2025
@IanButterworth IanButterworth marked this pull request as ready for review February 11, 2025 05:06
libcxxwrap_julia_jll_UUID = Base.UUID("3eaa8342-bff7-56a5-9981-c04077f7cee7")
libblastrampoline_jll_UUID = Base.UUID("8e850b90-86db-534c-a0d3-1478176c7d93")

isolate(loaded_depot=true) do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests below this are new

@KristofferC
Copy link
Member

What's the status of using BB together with this and a new julia version?

@IanButterworth
Copy link
Member Author

Untested. @giordano do BB test run locally?

@giordano
Copy link
Contributor

Can't do it right now, but relevant tests are in https://github.com/JuliaPackaging/BinaryBuilderBase.jl, in particular the test/dependencies.jl file. That's (mostly) working up to Julia v1.10.

I'm happy to make adjustments in BBB if necessary, as long as there's some guarantee we have something stable to rely on (and tests in this PR should help).

@IanButterworth

This comment was marked as resolved.

@giordano

This comment was marked as resolved.

@IanButterworth

This comment was marked as resolved.

@giordano

This comment was marked as resolved.

@IanButterworth

This comment was marked as resolved.

@IanButterworth
Copy link
Member Author

@giordano @staticfloat I've requested review mainly for the stuff in test/historical_stdlib_version.jl.

@giordano
Copy link
Contributor

Did you try running the test/dependencies.jl tests only? Those are the most relevant ones and if I remember correctly you don't even need the sandbox at all for them.

@IanButterworth
Copy link
Member Author

IanButterworth commented Feb 11, 2025

Just cleared space and ran it again and it all passed. (missed that it was a space issue before)

(@v1.13) pkg> test BinaryBuilderBase
     Testing BinaryBuilderBase
      Status `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_jyNS8s/Project.toml`
  [7f725544] BinaryBuilderBase v1.35.2
  [944b1d66] CodecZlib v0.7.7
  [187b0558] ConstructionBase v1.5.8
  [682c06a0] JSON v0.21.4
  [d8793406] ObjectFile v0.4.3
  [f43a241f] Downloads v1.6.0
  [76f85450] LibGit2 v1.11.0
  [8f399da3] Libdl v1.11.0
  [44cfe95a] Pkg v1.12.0
  [ea8e919c] SHA v0.7.0
  [8dfed614] Test v1.11.0
  [cf7118a7] UUIDs v1.11.0
      Status `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_jyNS8s/Manifest.toml`
  [7f725544] BinaryBuilderBase v1.35.2
  [944b1d66] CodecZlib v0.7.7
  [187b0558] ConstructionBase v1.5.8
⌃ [6df8b67a] HistoricalStdlibVersions v2.0.1
  [692b3bcd] JLLWrappers v1.7.0
  [682c06a0] JSON v0.21.4
  [d8793406] ObjectFile v0.4.3
  [bac558e1] OrderedCollections v1.8.0
  [6c11c7d4] OutputCollectors v0.1.1
  [69de0a69] Parsers v2.8.1
  [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.4.3
  [92933f4c] ProgressMeter v1.10.2
  [189a3867] Reexport v1.2.2
  [6c6a2e73] Scratch v1.2.1
  [777ac1f9] SimpleBufferStream v1.2.0
  [53d494c1] StructIO v0.3.1
  [3bb67fe8] TranscodingStreams v0.11.3
  [1fd713ca] Attr_jll v2.5.2+0
  [6e34b625] Bzip2_jll v1.0.9+0
  [be1be57a] Gzip_jll v1.13.0+0
  [94ce4f54] Libiconv_jll v1.18.0+0
  [9b64493d] Tar_jll v1.35.0+0
  [ffd25f8a] XZ_jll v5.6.4+1
  [3161d3a3] Zstd_jll v1.5.7+0
  [1bc43ea1] pigz_jll v2.8.0+0
  [88f77b66] unzip_jll v6.0.2+0
  [0dad84c5] ArgTools v1.1.2
  [56f22d72] Artifacts v1.11.0
  [2a0f44e3] Base64 v1.11.0
  [ade2ca70] Dates v1.11.0
  [8ba89e20] Distributed v1.11.0
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching v1.11.0
  [b77e0a4c] InteractiveUtils v1.11.0
  [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0
  [b27032c2] LibCURL v0.6.4
  [76f85450] LibGit2 v1.11.0
  [8f399da3] Libdl v1.11.0
  [56ddb016] Logging v1.11.0
  [d6f4376e] Markdown v1.11.0
  [a63ad114] Mmap v1.11.0
  [ca575930] NetworkOptions v1.3.0
  [44cfe95a] Pkg v1.12.0
  [de0858da] Printf v1.11.0
  [3fa0cd96] REPL v1.11.0
  [9a3f8284] Random v1.11.0
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization v1.11.0
  [6462fe0b] Sockets v1.11.0
  [f489334b] StyledStrings v1.11.0
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test v1.11.0
  [cf7118a7] UUIDs v1.11.0
  [4ec0a83e] Unicode v1.11.0
  [deac9b47] LibCURL_jll v8.11.1+1
  [e37daf67] LibGit2_jll v1.9.0+0
  [29816b5a] LibSSH2_jll v1.11.3+1
  [14a3606d] MozillaCACerts_jll v2024.12.31
  [458c3c95] OpenSSL_jll v3.0.15+2
  [83775a58] Zlib_jll v1.3.1+2
  [8e850ede] nghttp2_jll v1.64.0+1
  [3f19e933] p7zip_jll v17.5.0+2
        Info Packages marked with ⌃ have new versions available and may be upgradable.
     Testing Running tests...
Test Summary:    | Pass  Total  Time
Compat functions |   19     19  0.3s
Test Summary: | Pass  Total  Time
ArchiveUtils  |   13     13  2.0s
Test Summary: | Pass  Total  Time
Archive Utils |   22     22  0.8s
┌ Warning: The active manifest file is missing a julia version entry. Dependencies may have been resolved with a different julia version.
└ @ /private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_7KnNK6/x86_64-linux-gnu/.project/Manifest.toml:0
Test Summary: | Pass  Broken  Total   Time
Dependencies  |  107       4    111  43.9s
Test Summary: | Pass  Total  Time
resolve_jlls  |   10     10  0.8s
Test Summary:       | Pass  Total  Time
Supported Platforms |    4      4  0.4s
Test Summary: | Pass  Total  Time
abi_agnostic  |    1      1  0.1s
Test Summary: | Pass  Total  Time
AnyPlatform   |    8      8  2.1s
Test Summary:     | Pass  Total  Time
Target properties |   27     27  0.0s
Test Summary: | Pass  Total  Time
march flags   |   14     14  0.1s
Test Summary: | Pass  Total  Time
parse         |    5      5  0.0s
Test Summary: | Pass  Total  Time
Prefix        |   12     12  0.1s
Test Summary: | Pass  Total  Time
Packaging     |    7      7  0.1s
Test Summary:   | Pass  Total  Time
Tree symlinking |   26     26  0.2s
Test Summary: | Pass  Total  Time
Compression   |    3      3  0.3s
Test Summary: | Pass  Total  Time
Products      |   67     67  4.5s
Test Summary: | Pass  Total  Time
Dlopen flags  |    7      7  0.0s
Test Summary: | Pass  Total  Time
Sources       |   75     75  5.1s
Test Summary:    | Pass  Total  Time
Expand platforms |   25     25  0.4s
Test Summary:   | Pass  Total  Time
Compiler Shards |   45     45  1.9s
Test Summary:      | Pass  Total  Time
Wrappers utilities |   27     27  0.0s
Test Summary: | Pass  Total  Time
with_logfile  |    3      3  0.1s
 Downloading artifact: GCCBootstrap-x86_64-linux-musl.v6.1.0.x86_64-linux-musl.unpacked
  Downloaded artifact: GCCBootstrap-x86_64-linux-musl.v6.1.0.x86_64-linux-musl.unpacked
Test Summary:    | Pass  Broken  Total     Time
Runner utilities |   67       3     70  1m33.5s
 Downloading artifact: GCCBootstrap-x86_64-linux-gnu.v5.2.0.x86_64-linux-musl.unpacked
  Downloaded artifact: GCCBootstrap-x86_64-linux-gnu.v5.2.0.x86_64-linux-musl.unpacked
 Downloading artifact: RustBase.v1.83.0.x86_64-linux-musl.unpacked
  Downloaded artifact: RustBase.v1.83.0.x86_64-linux-musl.unpacked
 Downloading artifact: RustToolchain-x86_64-linux-gnu.v1.83.0.x86_64-linux-musl.unpacked
  Downloaded artifact: RustToolchain-x86_64-linux-gnu.v1.83.0.x86_64-linux-musl.unpacked
 Downloading artifact: RustToolchain-x86_64-linux-musl.v1.83.0.x86_64-linux-musl.unpacked
  Downloaded artifact: RustToolchain-x86_64-linux-musl.v1.83.0.x86_64-linux-musl.unpacked
 Downloading artifact: Go.v1.23.0.x86_64-linux-musl.unpacked
  Downloaded artifact: Go.v1.23.0.x86_64-linux-musl.unpacked
Test Summary: | Pass  Total     Time
Shards        |    3      3  1m11.8s
     Testing BinaryBuilderBase tests passed

@giordano
Copy link
Contributor

The fact that tests pass is very promising (they stopped passing at some point and I lost the energy to follow Pkg changes back then), but there are some things that I'm not sure are covered by BBB tests:

I'm just skimming through the binarybuilder label here.

@giordano
Copy link
Contributor

I need to look at it better, but this issue may have been solved by HistoricalStdlibVersions (which came several months afterwards after that ticket was opened), and it's good this PR adds more tests about it.

Comment on lines +234 to +235
# pkg.exts = p.exts # TODO: STDLIBS_BY_VERSION doesn't record this
# pkg.entryfile = p.entryfile # TODO: STDLIBS_BY_VERSION doesn't record this
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giordano giordano added the binarybuilder Related to the use of Pkg in BinaryBuilder label Feb 11, 2025
Comment on lines 274 to 275
@test isdir(src)
@test isfile(joinpath(src, "Artifacts.toml"))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are both failing, so #2930 remains an issue

@IanButterworth
Copy link
Member Author

IanButterworth commented Feb 12, 2025

I've marked the #2930 broken tests as such. I'm proposing to merge this as is and I will continue to look into fixing #2930

Copy link
Member

@staticfloat staticfloat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you for taking this on, Ian!

Copy link
Contributor

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@IanButterworth IanButterworth merged commit 0333d55 into JuliaLang:master Feb 13, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binarybuilder Related to the use of Pkg in BinaryBuilder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants