Skip to content

Commit

Permalink
PkgCompat: update _project_key_order
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Nov 15, 2024
1 parent fefea70 commit 84b9f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/packages/PkgCompat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,11 @@ end
###


_project_key_order = ["name", "uuid", "keywords", "license", "desc", "deps", "compat"]
_project_key_order = ["name", "uuid", "keywords", "license", "desc", "deps", "weakdeps", "sources", "extensions", "compat"]
project_key_order(key::String) =
something(findfirst(x -> x == key, _project_key_order), length(_project_key_order) + 1)


# βœ… Public API
function _modify_compat!(f!::Function, ctx::PkgContext)::PkgContext
project_path = project_file(ctx)
Expand Down
9 changes: 3 additions & 6 deletions test/packages/Basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ import Malt
@testset "Match compiler options: $(match)" for match in [true, false]
# clear cache
let
# sleep workaround for julia issue 34700.
# sleep workaround for https://github.com/JuliaLang/julia/issues/34700
sleep(3)
isdir(compilation_dir_testA) && rm(compilation_dir_testA; force=true, recursive=true)
end
Expand All @@ -656,12 +656,9 @@ import Malt
🍭 = ServerSession()
# make compiler settings of the worker (not) match the server settings
let
# you can find out which settings are relevant for cache validation by running JULIA_DEBUG="loading" julia and then missing a cache. Example output on julia1.9.0-rc1:
# β”Œ Debug: Rejecting cache file /Applications/Julia-1.9.0-beta4 ARM.app/Contents/Resources/julia/share/julia/compiled/v1.9/SuiteSparse_jll/ME9At_bvckq.ji for [top-level] since the flags are mismatched
# β”‚ current session: use_pkgimages = true, debug_level = 1, check_bounds = 0, inline = true, opt_level = 2
# β”‚ cache file: use_pkgimages = true, debug_level = 1, check_bounds = 1, inline = true, opt_level = 2
# β”” @ Base loading.jl:2668
# you can find out which settings are relevant for cache validation by looking at the field names of `Base.CacheFlags`.
flip = !match

🍭.options.compiler.pkgimages = (flip ⊻ Base.JLOptions().use_pkgimages == 1) ? "yes" : "no"
🍭.options.compiler.check_bounds = (flip ⊻ Base.JLOptions().check_bounds == 1) ? "yes" : "no"
🍭.options.compiler.inline = (flip ⊻ Base.JLOptions().can_inline == 1) ? "yes" : "no"
Expand Down

0 comments on commit 84b9f1f

Please sign in to comment.