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

Do not load ScopedValues with using #55452

Merged
merged 6 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ include("weakkeydict.jl")

# ScopedValues
include("scopedvalues.jl")
using .ScopedValues
import .ScopedValues
LilithHafner marked this conversation as resolved.
Show resolved Hide resolved

# metaprogramming
include("meta.jl")
Expand Down
2 changes: 1 addition & 1 deletion base/logging/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module CoreLogging

import Base: isless, +, -, convert, show
import Base: ScopedValue, with, @with
import Base.ScopedValues: ScopedValue, with, @with

export
AbstractLogger,
Expand Down
8 changes: 4 additions & 4 deletions base/mpfr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ end
tie_breaker_is_to_even(::MPFRRoundingMode) = true

const ROUNDING_MODE = Ref{MPFRRoundingMode}(MPFRRoundNearest)
const CURRENT_ROUNDING_MODE = Base.ScopedValue{MPFRRoundingMode}()
const CURRENT_ROUNDING_MODE = Base.ScopedValues.ScopedValue{MPFRRoundingMode}()
const DEFAULT_PRECISION = Ref{Clong}(256)
const CURRENT_PRECISION = Base.ScopedValue{Clong}()
const CURRENT_PRECISION = Base.ScopedValues.ScopedValue{Clong}()
# Basic type and initialization definitions

# Warning: the constants are MPFR implementation details from
Expand Down Expand Up @@ -162,7 +162,7 @@ significand_limb_count(x::BigFloat) = div(sizeof(x._d), sizeof(Limb), RoundToZer
rounding_raw(::Type{BigFloat}) = something(Base.ScopedValues.get(CURRENT_ROUNDING_MODE), ROUNDING_MODE[])
setrounding_raw(::Type{BigFloat}, r::MPFRRoundingMode) = ROUNDING_MODE[]=r
function setrounding_raw(f::Function, ::Type{BigFloat}, r::MPFRRoundingMode)
Base.@with(CURRENT_ROUNDING_MODE => r, f())
Base.ScopedValues.@with(CURRENT_ROUNDING_MODE => r, f())
end


Expand Down Expand Up @@ -1109,7 +1109,7 @@ Note: `nextfloat()`, `prevfloat()` do not use the precision mentioned by
The `base` keyword requires at least Julia 1.8.
"""
function setprecision(f::Function, ::Type{BigFloat}, prec::Integer; base::Integer=2)
Base.@with(CURRENT_PRECISION => _convert_precision_from_base(prec, base), f())
Base.ScopedValues.@with(CURRENT_PRECISION => _convert_precision_from_base(prec, base), f())
end

setprecision(f::Function, prec::Integer; base::Integer=2) = setprecision(f, BigFloat, prec; base)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f5548f0846f3455f2d697d640f87dad7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0be21a60c593296b85023a009831e5fb567313e51d3934b5fadaec2b55d631a20c38116c1371628166da545a779b37b101ff23c360b9e8410e8a9124a6202223

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion stdlib/StyledStrings.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
STYLEDSTRINGS_BRANCH = main
STYLEDSTRINGS_SHA1 = d7496d24d3f05536bce6a7eb4cd8ca05a75c02aa
STYLEDSTRINGS_SHA1 = 4fcd8bb0e20845fa8ae30efc1f4d161e97b3da8f
STYLEDSTRINGS_GIT_URL := https://github.com/JuliaLang/StyledStrings.jl.git
STYLEDSTRINGS_TAR_URL = https://api.github.com/repos/JuliaLang/StyledStrings.jl/tarball/$1