Skip to content

Commit 8b67441

Browse files
authored
Merge pull request #46984 from JuliaLang/backports-release-1.8
Backports for Julia 1.8.3
2 parents 97ccb97 + 0a121d1 commit 8b67441

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+749
-395
lines changed

.github/workflows/statuses.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ jobs:
4848
- run: |
4949
declare -a CONTEXT_LIST=(
5050
"buildbot/tester_freebsd64"
51-
"buildbot/tester_win32"
52-
"buildbot/tester_win64"
5351
)
5452
for CONTEXT in "${CONTEXT_LIST[@]}"
5553
do

Make.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,13 +1391,13 @@ define symlink_target # (from, to-dir, to-name)
13911391
CLEAN_TARGETS += clean-$$(abspath $(2)/$(3))
13921392
clean-$$(abspath $(2)/$(3)):
13931393
ifeq ($(BUILD_OS), WINNT)
1394-
-cmd //C rmdir $$(call mingw_to_dos,$(2)/$(3),cd $(2) &&)
1394+
-cmd //C rmdir $$(call cygpath_w,$(2)/$(3))
13951395
else
13961396
-rm -r $$(abspath $(2)/$(3))
13971397
endif
13981398
$$(abspath $(2)/$(3)): | $$(abspath $(2))
13991399
ifeq ($$(BUILD_OS), WINNT)
1400-
@cmd //C mklink //J $$(call mingw_to_dos,$(2)/$(3),cd $(2) &&) $$(call mingw_to_dos,$(1),)
1400+
@cmd //C mklink //J $$(call cygpath_w,$(2)/$(3)) $$(call cygpath_w,$(1))
14011401
else ifneq (,$$(findstring CYGWIN,$$(BUILD_OS)))
14021402
@cmd /C mklink /J $$(call cygpath_w,$(2)/$(3)) $$(call cygpath_w,$(1))
14031403
else ifdef JULIA_VAGRANT_BUILD
@@ -1415,7 +1415,7 @@ WINE ?= wine
14151415
# many of the following targets must be = not := because the expansion of the makefile functions (and $1) shouldn't happen until later
14161416
ifeq ($(BUILD_OS), WINNT) # MSYS
14171417
spawn = $(1)
1418-
cygpath_w = $(1)
1418+
cygpath_w = `cygpath -w $(1)`
14191419
else ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # Cygwin
14201420
spawn = $(1)
14211421
cygpath_w = `cygpath -w $(1)`

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ endif
222222
endif
223223
endif
224224

225+
# Note that we disable MSYS2's path munging here, as otherwise
226+
# it replaces our `:`-separated list as a `;`-separated one.
225227
define stringreplace
226-
$(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep $2 | awk '{print $$1;}') $3 255 "$(call cygpath_w,$1)"
228+
MSYS2_ARG_CONV_EXCL='*' $(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep $2 | awk '{print $$1;}') $3 255 "$(call cygpath_w,$1)"
227229
endef
228230

229231

@@ -446,8 +448,9 @@ endif
446448

447449

448450
exe:
449-
# run Inno Setup to compile installer
450-
$(call spawn,$(JULIAHOME)/dist-extras/inno/iscc.exe /DAppVersion=$(JULIA_VERSION) /DSourceDir="$(call cygpath_w,$(BUILDROOT)/julia-$(JULIA_COMMIT))" /DRepoDir="$(call cygpath_w,$(JULIAHOME))" /F"$(JULIA_BINARYDIST_FILENAME)" /O"$(call cygpath_w,$(BUILDROOT))" $(INNO_ARGS) $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.iss))
451+
# run Inno Setup to compile installer.
452+
# Note that we disable MSYS2 path munging, as it interferes with the `/` options:
453+
MSYS2_ARG_CONV_EXCL='*' $(call spawn,$(JULIAHOME)/dist-extras/inno/iscc.exe /DAppVersion=$(JULIA_VERSION) /DSourceDir="$(call cygpath_w,$(BUILDROOT)/julia-$(JULIA_COMMIT))" /DRepoDir="$(call cygpath_w,$(JULIAHOME))" /F"$(JULIA_BINARYDIST_FILENAME)" /O"$(call cygpath_w,$(BUILDROOT))" $(INNO_ARGS) $(call cygpath_w,$(JULIAHOME)/contrib/windows/build-installer.iss))
451454
chmod a+x "$(BUILDROOT)/$(JULIA_BINARYDIST_FILENAME).exe"
452455

453456
app:
@@ -572,7 +575,7 @@ win-extras:
572575
cd $(JULIAHOME)/dist-extras && \
573576
$(JLDOWNLOAD) https://www.jrsoftware.org/download.php/is.exe && \
574577
chmod a+x is.exe && \
575-
$(call spawn, $(JULIAHOME)/dist-extras/is.exe /DIR="$(call cygpath_w,$(JULIAHOME)/dist-extras/inno)" /PORTABLE=1 /CURRENTUSER /VERYSILENT)
578+
MSYS2_ARG_CONV_EXCL='*' $(call spawn, $(JULIAHOME)/dist-extras/is.exe /DIR="$(call cygpath_w,$(JULIAHOME)/dist-extras/inno)" /PORTABLE=1 /CURRENTUSER /VERYSILENT)
576579

577580
# various statistics about the build that may interest the user
578581
ifeq ($(USE_SYSTEM_LLVM), 1)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ New library features
111111
* `extrema` now accepts an `init` keyword argument ([#36265], [#43604]).
112112
* `Iterators.countfrom` now accepts any type that defines `+` ([#37747]).
113113
* `@time` now separates out % time spent recompiling invalidated methods ([#45015]).
114+
* An issue with order of operations in `fld1` is now fixed ([#28973]).
114115

115116
Standard library changes
116117
------------------------

base/Base.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ setproperty!(x::Tuple, f::Int, v, order::Symbol) = setfield!(x, f, v, order) # t
5050
getproperty(x, f::Symbol, order::Symbol) = (@inline; getfield(x, f, order))
5151
setproperty!(x, f::Symbol, v, order::Symbol) = (@inline; setfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
5252

53-
swapproperty!(x, f::Symbol, v, order::Symbol=:notatomic) =
53+
swapproperty!(x, f::Symbol, v, order::Symbol=:not_atomic) =
5454
(@inline; Core.swapfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
55-
modifyproperty!(x, f::Symbol, op, v, order::Symbol=:notatomic) =
55+
modifyproperty!(x, f::Symbol, op, v, order::Symbol=:not_atomic) =
5656
(@inline; Core.modifyfield!(x, f, op, v, order))
57-
replaceproperty!(x, f::Symbol, expected, desired, success_order::Symbol=:notatomic, fail_order::Symbol=success_order) =
57+
replaceproperty!(x, f::Symbol, expected, desired, success_order::Symbol=:not_atomic, fail_order::Symbol=success_order) =
5858
(@inline; Core.replacefield!(x, f, expected, convert(fieldtype(typeof(x), f), desired), success_order, fail_order))
5959

6060
convert(::Type{Any}, Core.@nospecialize x) = x

base/abstractarray.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ function unsafe_getindex(A::AbstractArray, I...)
12491249
r
12501250
end
12511251

1252-
struct CanonicalIndexError
1252+
struct CanonicalIndexError <: Exception
12531253
func::String
12541254
type::Any
12551255
CanonicalIndexError(func::String, @nospecialize(type)) = new(func, type)
@@ -3187,8 +3187,9 @@ function circshift!(a::AbstractVector, shift::Integer)
31873187
n == 0 && return
31883188
shift = mod(shift, n)
31893189
shift == 0 && return
3190-
reverse!(a, 1, shift)
3191-
reverse!(a, shift+1, length(a))
3190+
l = lastindex(a)
3191+
reverse!(a, firstindex(a), l-shift)
3192+
reverse!(a, l-shift+1, lastindex(a))
31923193
reverse!(a)
31933194
return a
31943195
end

base/compiler/inferenceresult.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function matching_cache_argtypes(
7171
# invalidate `Conditional` imposed on varargs
7272
if condargs !== nothing
7373
for (slotid, i) in condargs
74-
if slotid last
74+
if slotid last && (1 i length(isva_given_argtypes)) # `Conditional` is already widened to vararg-tuple otherwise
7575
isva_given_argtypes[i] = widenconditional(isva_given_argtypes[i])
7676
end
7777
end

base/compiler/utilities.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ function retrieve_code_info(linfo::MethodInstance)
127127
end
128128
if c === nothing && isdefined(m, :source)
129129
src = m.source
130-
if isa(src, Array{UInt8,1})
130+
if src === nothing
131+
# can happen in images built with --strip-ir
132+
return nothing
133+
elseif isa(src, Array{UInt8,1})
131134
c = ccall(:jl_uncompress_ir, Any, (Any, Ptr{Cvoid}, Any), m, C_NULL, src)
132135
else
133136
c = copy(src::CodeInfo)

base/loading.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,11 +2144,13 @@ end
21442144
end
21452145
for chi in includes
21462146
f, ftime_req = chi.filename, chi.mtime
2147-
# Issue #13606: compensate for Docker images rounding mtimes
2148-
# Issue #20837: compensate for GlusterFS truncating mtimes to microseconds
2149-
# The `ftime != 1.0` condition below provides compatibility with Nix mtime.
21502147
ftime = mtime(f)
2151-
if ftime != ftime_req && ftime != floor(ftime_req) && ftime != trunc(ftime_req, digits=6) && ftime != 1.0
2148+
is_stale = ( ftime != ftime_req ) &&
2149+
( ftime != floor(ftime_req) ) && # Issue #13606, PR #13613: compensate for Docker images rounding mtimes
2150+
( ftime != trunc(ftime_req, digits=6) ) && # Issue #20837, PR #20840: compensate for GlusterFS truncating mtimes to microseconds
2151+
( ftime != 1.0 ) && # PR #43090: provide compatibility with Nix mtime.
2152+
!( 0 < (ftime_req - ftime) < 1e-6 ) # PR #45552: Compensate for Windows tar giving mtimes that may be incorrect by up to one microsecond
2153+
if is_stale
21522154
@debug "Rejecting stale cache file $cachefile (mtime $ftime_req) because file $f (mtime $ftime) has changed"
21532155
return true
21542156
end

base/logging.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ function handle_message(logger::SimpleLogger, level::LogLevel, message, _module,
668668
remaining > 0 || return
669669
end
670670
buf = IOBuffer()
671-
stream = logger.stream
671+
stream::IO = logger.stream
672672
if !(isopen(stream)::Bool)
673673
stream = stderr
674674
end

0 commit comments

Comments
 (0)