Skip to content

Commit

Permalink
short circuit on disabled stabilization
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jun 9, 2024
1 parent 6cfe8da commit 2798749
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/preferences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ function get_preferred(default, cache, calling_module, key, deprecated_key=nothi
end
end
function get_all_preferred(options::StabilizationOptions, calling_module)
mode = get_preferred(
options.mode, PREFERENCE_CACHE.mode, calling_module, "instability_check"
)
if mode == "disable"
# Short circuit and quit early
return StabilizationOptions("disable", options.codegen_level, options.union_limit)
end
return StabilizationOptions(
get_preferred(
options.mode, PREFERENCE_CACHE.mode, calling_module, "instability_check"
),
mode,
get_preferred(
options.codegen_level,
PREFERENCE_CACHE.codegen_level,
Expand Down

0 comments on commit 2798749

Please sign in to comment.