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

Backports for Julia-1.6.2 #40702

Merged
merged 58 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
06ba1b8
Fix wrong := REPL documentation (#39975)
Liozou Mar 10, 2021
179cc16
fix %a/%A format for zeros
bicycle1885 Apr 15, 2021
e6a5d2a
Fix `kron` with `Diagonal` (#40509)
dkarrasch Apr 18, 2021
3d37770
SparseArrays: add Printf to test deps. (#40520)
fredrikekre Apr 20, 2021
c33104a
unexport cat_shape (#40549)
johnnychen94 Apr 21, 2021
f6960c1
Fix rational division by zero (#40551)
blegat Apr 21, 2021
90ff207
[cli] Provide `.type` and `.size` annotations for symbols (#40575)
staticfloat Apr 23, 2021
7cb5ce1
avoid excessive inlining of Ryu (#40593)
bicycle1885 Apr 24, 2021
a278bba
REPL: Fix incorrect docstring for .. (#40563) (#40607)
Apr 26, 2021
41ba8fb
bump Downloads from v1.4.0 to v1.4.1
StefanKarpinski May 4, 2021
151a26b
bump Tar from v1.9.1 to 1.9.2
StefanKarpinski May 4, 2021
bb61b4c
Allow flips to be built against system UTF8PROC
vchuravy Sep 23, 2020
6659a0a
Use copysign LLVM intrinsic rather than bithack ourselves
wsmoses Feb 20, 2021
f0cc40a
Document UInt return type of objectid (#40669)
fonsp May 4, 2021
70bfa4d
codegen: set ModFlag for `Debug Info Version` to Warning (#40653)
vchuravy May 4, 2021
198f4fc
fix consistency of trimtrailingzeros (Ryu) (#40685)
bicycle1885 May 4, 2021
7c9fcae
Fix windows resource FILEVERSION (#40752)
musm May 8, 2021
6056838
do not trim trailing zeros of integral part
bicycle1885 May 9, 2021
4ab8c79
make Printf's general format C11 compliant
bicycle1885 May 3, 2021
ecc3f1d
Fix inference of max_values(::Union) (#40785)
odow May 11, 2021
738de97
Use `strcmp()` to compare `f_lib` and `JL_LIBJULIA_DL_LIBNAME` (#39005)
staticfloat Dec 26, 2020
eac11b9
safepoints are required in any lock than may be used with allocations…
vtjnash Apr 19, 2021
1ce1103
Fix showindices for IdentityUnitRange (#40608)
jishnub Apr 28, 2021
9898aab
add option to `compilecache` so that Pkg precompilation can not skip …
IanButterworth Apr 8, 2021
9a174ac
sign executables within installer
musm Apr 17, 2021
a82562d
Update Julia year in exe
musm Apr 17, 2021
1f5a644
bump Downloads from v1.4.1 to v1.4.2
StefanKarpinski Jun 2, 2021
a06b5b7
fix #40855, alignment calculation in `julia_const_to_llvm` (#40864)
JeffBezanson May 19, 2021
e71dd33
Fix ryu tests from doing @show to @test
quinnj May 25, 2021
96e0d7f
fix `-Inf16 < typemin(Int)` (#40871)
rfourquet May 25, 2021
bfd657b
gcd and lcm fixed for one negative argument (#40968)
KlausC May 29, 2021
38ef739
handle kwarg lowering for vararg with default value (#40977)
JeffBezanson May 29, 2021
8d5ed1e
codegen: fixing union isbits comparison UB (#41046)
vtjnash Jun 2, 2021
ef23162
optimizer: add missing bounds checks to avoid ICE (#41048)
vtjnash Jun 2, 2021
d4bca99
restore performance of `hash` for `BigInt` and `Rational{BigInt}` (#4…
rfourquet May 20, 2021
fc8fc53
Add support for new Manifest.toml format during code load (#40765)
IanButterworth Jun 2, 2021
0f7f91b
fix unsoundness in fieldtype of Tuple with non-Type params
JeffBezanson Mar 16, 2021
b20e026
bump Downloads from v1.4.1 to v1.4.2
StefanKarpinski Jun 2, 2021
84f04b2
bump Tar from v1.9.2 to v1.9.3
StefanKarpinski Jun 4, 2021
3dfd186
TOML: fix converted tabular data printing (#41009)
aviatesk May 30, 2021
4b501e3
fix some printing of special characters (#25) (#41079)
KristofferC Jun 6, 2021
e2e1453
silence output from a TOML test (#41145)
KristofferC Jun 9, 2021
b8391be
Dimension mismatch with SymTridiagonal's eigen (#38793)
mforets Dec 10, 2020
29fdea4
Fix eigvecs(:::SymTridiagonal) with longer off-diagonal vector (#40526)
dkarrasch Apr 20, 2021
2414fe9
Move analyzegc pipeline to buildkite (#40826)
vchuravy May 19, 2021
fde8b0a
update Pkg version
KristofferC Jun 10, 2021
6d74a23
Fix eigvals(:::SymTridagonal) with longer off-diagonal vector (#40165)
dlfivefifty Apr 11, 2021
42f0c34
Update Documenter to 0.27 on release-1.6. (#41225)
fredrikekre Jun 14, 2021
5f18db2
bump Pkg to 1.6.2
KristofferC Jun 29, 2021
7c1f9b2
fix `threadcall` for new ccall lookup strategy (#41345)
JeffBezanson Jun 28, 2021
9f6aabb
Correct _in_range for NaN/Inf (#41169)
sostock Jun 14, 2021
fbc1612
Fix Rational{T} constructor for abstract T (#41229)
sostock Jun 15, 2021
e0519e3
Fix for reverse search, fixes #39401, fixes #40244(#41203)
Moelf Jun 15, 2021
1169b5e
[buildkite] Implement secrets encryption and sandboxing (#41256)
staticfloat Jun 18, 2021
1b37db3
fix preference loading (#41294)
Roger-luo Jun 21, 2021
c5eceef
Fix typeassert in worker-worker connection, fixes #41155. (#41305)
fredrikekre Jun 22, 2021
4dd3346
backport #41363: fix equality of QRCompactWY (#41395)
simeonschaub Jun 29, 2021
85b9752
fix #41416, splatted default argument lost with keyword argument (#41…
JeffBezanson Jul 1, 2021
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
24 changes: 24 additions & 0 deletions .buildkite/0_webui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file represents what is put into the webUI.
# It is purely for keeping track of the changes we make to the webUI configuration; modifying this file has no effect.
# We use the `cryptic` buildkite plugin to provide secrets management, which requires some integration into the WebUI's steps.
agents:
queue: "julia"
sandbox.jl: "true"

steps:
- label: ":unlock: Unlock secrets, launch pipelines"
plugins:
- staticfloat/cryptic:
# Our list of pipelines that should be launched (but don't require a signature)
# These pipelines can be modified by any contributor and CI will still run.
# Build secrets will not be available in these pipelines (or their children)
# but some of our signed pipelines can wait upon the completion of these unsigned
# pipelines.
unsigned_pipelines:
- .buildkite/pipeline.yml

# Our signed pipelines must have a `signature` or `signature_file` parameter that
# verifies the treehash of the pipeline itself and the inputs listed in `inputs`
signed_pipelines:
- pipeline: .buildkite/signed_pipeline_test.yml
signature: "U2FsdGVkX18aZgryp6AJTArgD2uOnVWyFFGVOP5qsY4WbGQ/LVAcYiMEp9cweV+2iht+vmEF949CuuGTeQPA1fKlhPwkG3nZ688752DUB6en9oM2nuL31NoDKWHhpygZ"
6 changes: 6 additions & 0 deletions .buildkite/cryptic_repo_keys/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Cryptic repository keys

This folder contains RSA-encrypted symmetric AES keys.
These are used by buildkite agents to decrypt the secrets embedded within this repository.
Each buildkite agent contains an RSA secret key that is used to unlock the symmetric AES key that was used to encrypt the secrets within this repository.
For more information, see the [`cryptic` buildkite plugin repository](https://github.com/staticfloat/cryptic-buildkite-plugin).
Binary file added .buildkite/cryptic_repo_keys/repo_key.2297e5e7
Binary file not shown.
40 changes: 40 additions & 0 deletions .buildkite/llvm_passes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# These steps should only run on `sandbox.jl` machines, not `docker`-isolated ones
# since we need nestable sandboxing. The rootfs images being used here are built from
# the `.buildkite/rootfs_images/llvm-passes.jl` file.
agents:
queue: "julia"
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
sandbox.jl: "true"
os: "linux"

steps:
- label: "analyzegc"
plugins:
- JuliaCI/julia#v1:
version: 1.6
- staticfloat/sandbox#v1:
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz
rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8"
commands: |
echo "--- Install in-tree LLVM dependencies"
make -j 6 -C deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind
echo "+++ run clangsa/analyzegc"
make -j 6 -C test/clangsa
make -j 6 -C src analyzegc
timeout_in_minutes: 60

- label: "llvmpasses"
plugins:
- JuliaCI/julia#v1:
version: 1.6
- staticfloat/sandbox#v1:
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v1/llvm-passes.tar.gz
rootfs_treehash: "f3ed53f159e8f13edfba8b20ebdb8ece73c1b8a8"
uid: 1000
gid: 1000
commands: |
echo "+++ run llvmpasses"
make -j 6 release
make -j 6 -C src install-analysis-deps
make -j 6 -C test/llvmpasses
timeout_in_minutes: 60
19 changes: 19 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file launches all the build jobs that _don't_ require secrets access.
# These jobs can pass their output off to jobs that do require secrets access,
# but those privileged steps require signing before they can be run.
#
# Yes, this is creating another layer of indirection; the flow now looks like:
#
# [webui] -> pipeline.yml -> llvm_passes.yml
#
# when we could theoretically just have the `webui` launch `llvm_passes.yml`,
# however this raises the bar for contributors to add new (unsigned) steps to
# our CI configuration, so I'd rather live with an extra layer of indirection
# and only need to touch the webui configuration when we need to alter
# something about the privileged steps.
steps:
- label: ":buildkite: Launch unsigned pipelines"
commands: |
buildkite-agent pipeline upload .buildkite/llvm_passes.yml
agents:
queue: julia
134 changes: 134 additions & 0 deletions .buildkite/rootfs_images/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# This file is machine-generated - editing it directly is not advised

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JLLWrappers]]
deps = ["Preferences"]
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.3.0"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Preferences]]
deps = ["TOML"]
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.2.2"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Scratch]]
deps = ["Dates"]
git-tree-sha1 = "0b4b7f1393cff97c33891da2a0bf69c6ed241fda"
uuid = "6c6a2e73-6563-6170-7368-637461726353"
version = "1.1.0"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[ghr_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "f5c8cb306d4fe2d1fff90443a088fc5ba536c134"
uuid = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"
version = "0.13.0+1"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
5 changes: 5 additions & 0 deletions .buildkite/rootfs_images/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"
5 changes: 5 additions & 0 deletions .buildkite/rootfs_images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Rootfs images

Our CI setup makes use of rootfs images that contain our build tools.
These rootfs images are built using the fairly simple scripts held within this directory.
Most images are based on Debian, making use of `debootstrap` to provide a quick and easy rootfs with packages installed through an initial `apt` invocation.
27 changes: 27 additions & 0 deletions .buildkite/rootfs_images/llvm-passes.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env julia

## This rootfs includes enough of a host toolchain to build the LLVM passes.
## Eventually, this image will probably be replaced with the actual builder image,
## as that will have the necessary toolchains as well, but that image is not built yet.

include("rootfs_utils.jl")

# Build debian-based image with the following extra packages:
packages = [
"build-essential",
"libatomic1",
"python",
"python3",
"gfortran",
"perl",
"wget",
"m4",
"cmake",
"pkg-config",
"curl",
"git",
]
tarball_path = debootstrap("llvm-passes"; packages)

# Upload it
upload_rootfs_image(tarball_path)
92 changes: 92 additions & 0 deletions .buildkite/rootfs_images/rootfs_utils.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env julia

# This is an example invocation of `debootstrap` to generate a Debian/Ubuntu-based rootfs
using Scratch, Pkg, Pkg.Artifacts, ghr_jll, SHA, Dates

# Utility functions
getuid() = ccall(:getuid, Cint, ())
getgid() = ccall(:getgid, Cint, ())

function debootstrap(name::String; release::String="buster", variant::String="minbase",
packages::Vector{String}=String[], force::Bool=false)
if Sys.which("debootstrap") === nothing
error("Must install `debootstrap`!")
end

tarball_path = joinpath(@get_scratch!("rootfs-images"), "$(name).tar.gz")
if !force && isfile(tarball_path)
@error("Refusing to overwrite tarball without `force` set", tarball_path)
error()
end

artifact_hash = create_artifact() do rootfs
packages_string = join(push!(packages, "locales"), ",")
@info("Running debootstrap", release, variant, packages)
run(`sudo debootstrap --variant=$(variant) --include=$(packages_string) $(release) "$(rootfs)"`)

# Remove special `dev` files
@info("Cleaning up `/dev`")
for f in readdir(joinpath(rootfs, "dev"); join=true)
# Keep the symlinks around (such as `/dev/fd`), as they're useful
if !islink(f)
run(`sudo rm -rf "$(f)"`)
end
end

# take ownership of the entire rootfs
@info("Chown'ing rootfs")
run(`sudo chown $(getuid()):$(getgid()) -R "$(rootfs)"`)

# Write out rootfs-info to contain a minimally-identifying string
open(joinpath(rootfs, "etc", "rootfs-info"), write=true) do io
write(io, """
rootfs_type=debootstrap
release=$(release)
variant=$(variant)
packages=$(packages_string)
build_date=$(Dates.now())
""")
end

# Write out a reasonable default resolv.conf
open(joinpath(rootfs, "etc", "resolv.conf"), write=true) do io
write(io, """
nameserver 1.1.1.1
nameserver 8.8.8.8
""")
end

# Remove `_apt` user so that `apt` doesn't try to `setgroups()`
@info("Removing `_apt` user")
open(joinpath(rootfs, "etc", "passwd"), write=true, read=true) do io
filtered_lines = filter(l -> !startswith(l, "_apt:"), readlines(io))
truncate(io, 0)
seek(io, 0)
for l in filtered_lines
println(io, l)
end
end

# Set up the one true locale
@info("Setting up UTF-8 locale")
open(joinpath(rootfs, "etc", "locale.gen"), "a") do io
println(io, "en_US.UTF-8 UTF-8")
end
run(`sudo chroot --userspec=$(getuid()):$(getgid()) $(rootfs) locale-gen`)
end

# Archive it into a `.tar.gz` file
@info("Archiving", tarball_path, artifact_hash)
archive_artifact(artifact_hash, tarball_path)

return tarball_path
end

function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images")
# Upload it to `github_repo`
tag_name = "v1"
tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))"
@info("Uploading to $(github_repo)@$(tag_name)", tarball_url)
run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) -replace $(tag_name) $(tarball_path)`)
return tarball_url
end
17 changes: 17 additions & 0 deletions .buildkite/signed_pipeline_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
agents:
queue: "julia"
os: "linux"

## pipeline that showcases decryption of environment variable
steps:
- label: ":lock: :rocket: Signed pipeline test"
plugins:
- staticfloat/cryptic#v1:
variables:
- SECRET_KEY="U2FsdGVkX18tb7st0SuQAvh4Yv4xENxOAu8q9XkmOeDVKBNY4FngEwK3xmiKUqaS"
commands: |
echo "SECRET_KEY: $${SECRET_KEY}"

# We must accept the signed job id secret in order to propagate secrets
env:
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
6 changes: 5 additions & 1 deletion base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ end
max_values(::Type) = typemax(Int)
max_values(T::Union{map(X -> Type{X}, BitIntegerSmall_types)...}) = 1 << (8*sizeof(T))
# saturated addition to prevent overflow with typemax(Int)
max_values(T::Union) = max(max_values(T.a), max_values(T.b), max_values(T.a) + max_values(T.b))
function max_values(T::Union)
a = max_values(T.a)::Int
b = max_values(T.b)::Int
return max(a, b, a + b)
end
max_values(::Type{Bool}) = 2
max_values(::Type{Nothing}) = 1

Expand Down
Loading