Skip to content

Commit

Permalink
Merge branch 'master' into any_all_vectorized_tuple_bool
Browse files Browse the repository at this point in the history
  • Loading branch information
nsajko authored Jan 21, 2025
2 parents 692bcd9 + 2e6ffbc commit 83c59d5
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Compiler/test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ end
# Make sure that code that has unbound sparams works
#https://github.com/JuliaLang/julia/issues/56739

f56739(a) where {T} = a
@test_warn r"declares type variable T but does not use it" @eval f56739(a) where {T} = a

@test f56739(1) == 1
g56739(x) = @noinline f56739(x)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7b511b7dab411685206d0d90cc1fb56e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
960367406d80e46e8e742bcb0f7f0e4b089b664c2321ca82953eb760b325693ae57f431d891ccf56c3ab9146bc29682d2d1767bc635f4dbe6dd4d80030a42487

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions stdlib/REPL/src/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,11 @@ function summarize(binding::Binding, sig)
if defined(binding)
binding_res = resolve(binding)
if !isa(binding_res, Module)
varstr = "$(binding.mod).$(binding.var)"
if Base.ispublic(binding.mod, binding.var)
println(io, "No documentation found for public symbol.\n")
println(io, "No documentation found for public binding `$varstr`.\n")
else
println(io, "No documentation found for private symbol.\n")
println(io, "No documentation found for private binding `$varstr`.\n")
end
end
summarize(io, binding_res, binding)
Expand Down
2 changes: 1 addition & 1 deletion stdlib/SHA.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SHA_BRANCH = master
SHA_SHA1 = 8fa221ddc8f3b418d9929084f1644f4c32c9a27e
SHA_SHA1 = 4451e1362e425bcbc1652ecf55fc0e525b18fb63
SHA_GIT_URL := https://github.com/JuliaCrypto/SHA.jl.git
SHA_TAR_URL = https://api.github.com/repos/JuliaCrypto/SHA.jl/tarball/$1
2 changes: 1 addition & 1 deletion test/ambiguous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ambig(x::Union{Char, Int16}) = 's'

# Automatic detection of ambiguities

const allowed_undefineds = Set([])
const allowed_undefineds = Set([GlobalRef(Base, :active_repl)])

let Distributed = get(Base.loaded_modules,
Base.PkgId(Base.UUID("8ba89e20-285c-5b6f-9357-94700520ee1b"), "Distributed"),
Expand Down
7 changes: 3 additions & 4 deletions test/boundscheck_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ end
end |> only === Type{Int}

if bc_opt == bc_default
@testset "Array/Memory escape analysis" begin
# Array/Memory escape analysis
function no_allocate(T::Type{<:Union{Memory, Vector}})
v = T(undef, 2)
v[1] = 2
Expand All @@ -308,8 +308,8 @@ if bc_opt == bc_default
function test_alloc(::Type{T}; broken=false) where T
@test (@allocated no_allocate(T)) == 0 broken=broken
end
@testset "$T" for T in [Memory, Vector]
@testset "$ET" for ET in [Int, Float32, Union{Int, Float64}]
for T in [Memory, Vector]
for ET in [Int, Float32, Union{Int, Float64}]
no_allocate(T{ET}) #compile
# allocations aren't removed for Union eltypes which they theoretically could be eventually
test_alloc(T{ET}, broken=(ET==Union{Int, Float64}))
Expand Down Expand Up @@ -345,6 +345,5 @@ if bc_opt == bc_default
no_alias_prove(1)
@test_broken (@allocated no_alias_prove(5)) == 0
end
end

end
16 changes: 7 additions & 9 deletions test/channel_threadpool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
using Test
using Base.Threads

@testset "Task threadpools" begin
c = Channel{Symbol}() do c; put!(c, threadpool(current_task())); end
@test take!(c) === threadpool(current_task())
c = Channel{Symbol}(spawn = true) do c; put!(c, threadpool(current_task())); end
@test take!(c) === :default
c = Channel{Symbol}(threadpool = :interactive) do c; put!(c, threadpool(current_task())); end
@test take!(c) === :interactive
@test_throws ArgumentError Channel{Symbol}(threadpool = :foo) do c; put!(c, :foo); end
end
c = Channel{Symbol}() do c; put!(c, threadpool(current_task())); end
@test take!(c) === threadpool(current_task())
c = Channel{Symbol}(spawn = true) do c; put!(c, threadpool(current_task())); end
@test take!(c) === :default
c = Channel{Symbol}(threadpool = :interactive) do c; put!(c, threadpool(current_task())); end
@test take!(c) === :interactive
@test_throws ArgumentError Channel{Symbol}(threadpool = :foo) do c; put!(c, :foo); end
40 changes: 21 additions & 19 deletions test/docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,11 @@ end
@doc "This should document @m1... since its the result of expansion" @m2_11993
@test (@doc @m1_11993) !== nothing
let d = (@doc :@m2_11993),
macro_doc = Markdown.parse("`$(curmod_prefix == "Main." ? "" : curmod_prefix)@m2_11993` is a macro.")
varstr = "$(curmod_prefix == "Main." ? "" : curmod_prefix)@m2_11993"
docstr = Markdown.Code("", "$curmod_prefix@m2_11993")
macro_doc = Markdown.parse("`$varstr` is a macro.")
@test docstring_startswith(d, doc"""
No documentation found for private symbol.
No documentation found for private binding $docstr.
$macro_doc""")
end
Expand Down Expand Up @@ -901,7 +903,7 @@ Binding `$(curmod_prefix)Undocumented.bindingdoesnotexist` does not exist.
@test docstrings_equal(@doc(Undocumented.bindingdoesnotexist), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for public symbol.
No documentation found for public binding `$(curmod_prefix)Undocumented.A`.
# Summary
```
Expand All @@ -917,7 +919,7 @@ $(curmod_prefix)Undocumented.C
@test docstrings_equal(@doc(Undocumented.A), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for public symbol.
No documentation found for public binding `$(curmod_prefix)Undocumented.B`.
# Summary
```
Expand All @@ -937,7 +939,7 @@ $(curmod_prefix)Undocumented.B <: $(curmod_prefix)Undocumented.A <: Any
@test docstrings_equal(@doc(Undocumented.B), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for public symbol.
No documentation found for public binding `$(curmod_prefix)Undocumented.C`.
# Summary
```
Expand All @@ -952,7 +954,7 @@ $(curmod_prefix)Undocumented.C <: $(curmod_prefix)Undocumented.A <: Any
@test docstrings_equal(@doc(Undocumented.C), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.D`.
# Summary
```
Expand All @@ -974,7 +976,7 @@ $(curmod_prefix)Undocumented.D <: $(curmod_prefix)Undocumented.B <: $(curmod_pre
@test docstrings_equal(@doc(Undocumented.D), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for public symbol.
No documentation found for public binding `$(curmod_prefix)Undocumented.at0`.
# Summary
Expand All @@ -994,7 +996,7 @@ $(curmod_prefix)Undocumented.st4{T<:Number, N}
@test docstrings_equal(@doc(Undocumented.at0), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.at1`.
# Summary
Expand All @@ -1017,7 +1019,7 @@ $(curmod_prefix)Undocumented.at1{T>:Integer, N} <: $(curmod_prefix)Undocumented.
@test docstrings_equal(@doc(Undocumented.at1), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.at_`.
# Summary
Expand All @@ -1036,7 +1038,7 @@ $(curmod_prefix)Undocumented.st4{Int64, N}
@test docstrings_equal(@doc(Undocumented.at_), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for public symbol.
No documentation found for public binding `$(curmod_prefix)Undocumented.pt2`.
# Summary
Expand All @@ -1053,7 +1055,7 @@ $(curmod_prefix)Undocumented.pt2{T<:Number, N, A>:Integer} <: $(curmod_prefix)Un
@test docstrings_equal(@doc(Undocumented.pt2), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.st3`.
# Summary
Expand All @@ -1076,7 +1078,7 @@ $(curmod_prefix)Undocumented.st3{T<:Integer, N} <: $(curmod_prefix)Undocumented.
@test docstrings_equal(@doc(Undocumented.st3), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.st4`.
# Summary
Expand All @@ -1098,7 +1100,7 @@ $(curmod_prefix)Undocumented.st4{T, N} <: $(curmod_prefix)Undocumented.at0{T, N}
@test docstrings_equal(@doc(Undocumented.st4), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.st5`.
# Summary
Expand All @@ -1119,7 +1121,7 @@ $(curmod_prefix)Undocumented.st5{T>:Int64, N} <: $(curmod_prefix)Undocumented.at
@test docstrings_equal(@doc(Undocumented.st5), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.mt6`.
# Summary
Expand All @@ -1140,7 +1142,7 @@ $(curmod_prefix)Undocumented.mt6{T<:Integer, N} <: $(curmod_prefix)Undocumented.
@test docstrings_equal(@doc(Undocumented.mt6), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.ut7`.
# Summary
Expand All @@ -1154,7 +1156,7 @@ No documentation found for private symbol.
@test docstrings_equal(@doc(Undocumented.ut7), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.ut8`.
# Summary
Expand All @@ -1170,7 +1172,7 @@ No documentation found for private symbol.
@test docstrings_equal(@doc(Undocumented.ut8), doc"$doc_str")

doc_str = Markdown.parse("""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.ut9`.
# Summary
Expand All @@ -1189,7 +1191,7 @@ let d = @doc(Undocumented.f)
io = IOBuffer()
show(io, MIME"text/markdown"(), d)
@test startswith(String(take!(io)),"""
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.f`.
`$(curmod_prefix)Undocumented.f` is a `Function`.
""")
Expand All @@ -1199,7 +1201,7 @@ let d = @doc(Undocumented.undocumented)
io = IOBuffer()
show(io, MIME"text/markdown"(), d)
@test startswith(String(take!(io)), """
No documentation found for private symbol.
No documentation found for private binding `$(curmod_prefix)Undocumented.undocumented`.
`$(curmod_prefix)Undocumented.undocumented` is a `Function`.
""")
Expand Down
2 changes: 1 addition & 1 deletion test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ out = read(`$echocmd hello` & `$echocmd world`, String)
@test occursin("hello", out)
@test read(pipeline(`$echocmd hello` & `$echocmd world`, sortcmd), String) == "hello\nworld\n"

@test (run(`$printfcmd " \033[34m[stdio passthrough ok]\033[0m\n"`); true)
@test_warn r"[stdio passthrough ok]" run(pipeline(`$printfcmd " \033[34m[stdio passthrough ok]\033[0m\n"`, stdout=stderr, stderr=stderr))

# Test for SIGPIPE being a failure condition
@test_throws ProcessFailedException run(pipeline(yescmd, `head`, devnull))
Expand Down
3 changes: 2 additions & 1 deletion test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3971,11 +3971,12 @@ end

# Module Replacement
module ReplacementContainer
using Test
module ReplaceMe
const x = 1
end
const Old = ReplaceMe
module ReplaceMe
@test_warn r"WARNING: replacing module ReplaceMe" @eval module ReplaceMe
const x = 2
end
end
Expand Down

0 comments on commit 83c59d5

Please sign in to comment.