Skip to content

Commit b4eeb2d

Browse files
authored
Merge pull request #41781 from JuliaLang/backports-release-1.7
release-1.7: Backports for 1.7-RC1
2 parents d0c90f3 + a8722c6 commit b4eeb2d

File tree

102 files changed

+2286
-1273
lines changed

Some content is hidden

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

102 files changed

+2286
-1273
lines changed

.buildkite/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
This directory contains the Buildkite configuration files for Base Julia CI.
44

55
The rootfs image definitions are located in the [rootfs-images](https://github.com/JuliaCI/rootfs-images) repository.
6+
7+
The documentation for the Base Julia CI setup is located in the [base-buildkite-docs](https://github.com/JuliaCI/base-buildkite-docs) repository.

.buildkite/pipelines/main/misc/llvmpasses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ steps:
3333
- JuliaCI/julia#v1:
3434
version: 1.6
3535
- staticfloat/sandbox#v1:
36-
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz
37-
rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e"
36+
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.8/package_linux.x86_64.tar.gz
37+
rootfs_treehash: "84a323ae8fcc724f8ea5aca5901bbbf4bda3e519"
3838
uid: 1000
3939
gid: 1000
4040
workspaces:

.buildkite/pipelines/main/platforms/linux64.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ steps:
3535
make release
3636
make install
3737
38+
echo "--- Make sure that the working directory is clean"
39+
if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi
40+
3841
echo "--- Print Julia version info"
3942
./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()'
4043

.codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage:
2+
status:
3+
project: off
4+
patch: off

.github/CODEOWNERS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
CODEOWNERS @JuliaLang/github-actions
2-
/.github/ @JuliaLang/github-actions
1+
CODEOWNERS @JuliaLang/github-actions
2+
/.github/ @JuliaLang/github-actions
33
/.buildkite/ @JuliaLang/github-actions
4+
5+
/.github/workflows/statuses.yml @DilumAluthge

.github/workflows/statuses.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Please ping @DilumAluthge when making any changes to this file.
2+
3+
# This is just a short-term solution until we have migrated all of CI to Buildkite.
4+
#
5+
# 1. TODO: delete this file once we have migrated all of CI to Buildkite.
6+
#
7+
# 2. TODO: disable GitHub Actions on the `JuliaLang/julia` repository once we have migrated all
8+
# of CI to Buildkite.
9+
10+
# Here are some steps that we take in this workflow file for security reasons:
11+
# 1. We do not checkout any code.
12+
# 2. We do not run any external actions.
13+
# 3. We only give `GITHUB_TOKEN` the minimum necessary set of permissions.
14+
15+
name: Statuses
16+
17+
on:
18+
push:
19+
branches:
20+
- 'master'
21+
- 'release-*'
22+
# When using the `pull_request_target` event, all PRs will get a `GITHUB_TOKEN` that has
23+
# write permissions, even if the PR is from a fork.
24+
# Therefore, for security reasons, we do not checkout any code in this workflow.
25+
pull_request_target:
26+
branches:
27+
- 'master'
28+
- 'release-*'
29+
30+
# These are the permissions for the `GITHUB_TOKEN` token.
31+
# We should only give the token the minimum necessary set of permissions.
32+
permissions:
33+
statuses: write
34+
35+
jobs:
36+
statuses:
37+
name: statuses
38+
runs-on: ubuntu-latest
39+
if: github.repository == 'JuliaLang/julia'
40+
strategy:
41+
fail-fast: false
42+
steps:
43+
- run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
44+
if: github.event_name == 'pull_request_target'
45+
46+
- run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV
47+
if: github.event_name != 'pull_request_target'
48+
49+
- run: echo "The SHA is ${{ env.SHA }}"
50+
51+
# As we incrementally migrate individual jobs from Buildbot to Buildkite, we should
52+
# remove them from the `context_list`.
53+
- run: |
54+
declare -a CONTEXT_LIST=(
55+
"buildbot/tester_freebsd64"
56+
"buildbot/tester_linux32"
57+
"buildbot/tester_linux64"
58+
"buildbot/tester_linuxaarch64"
59+
"buildbot/tester_macos64"
60+
"buildbot/tester_win32"
61+
"buildbot/tester_win64"
62+
)
63+
for CONTEXT in "${CONTEXT_LIST[@]}"
64+
do
65+
curl \
66+
-X POST \
67+
-H "Authorization: token $GITHUB_TOKEN" \
68+
-H "Accept: application/vnd.github.v3+json" \
69+
-d "{\"context\": \"$CONTEXT\", \"state\": \"$STATE\"}" \
70+
https://api.github.com/repos/JuliaLang/julia/statuses/${{ env.SHA }}
71+
done
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
STATE: "pending"

LICENSE.md

Lines changed: 20 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,26 @@
1-
The Julia language is licensed under the MIT License. The "language" consists
2-
of the compiler (the contents of src/), most of the standard library (base/),
3-
and some utilities (most of the rest of the files in this repository). See below
4-
for exceptions.
1+
MIT License
52

6-
> Copyright (c) 2009-2021: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
7-
> and other contributors:
8-
>
9-
> https://github.com/JuliaLang/julia/contributors
10-
>
11-
> Permission is hereby granted, free of charge, to any person obtaining
12-
> a copy of this software and associated documentation files (the
13-
> "Software"), to deal in the Software without restriction, including
14-
> without limitation the rights to use, copy, modify, merge, publish,
15-
> distribute, sublicense, and/or sell copies of the Software, and to
16-
> permit persons to whom the Software is furnished to do so, subject to
17-
> the following conditions:
18-
>
19-
> The above copyright notice and this permission notice shall be
20-
> included in all copies or substantial portions of the Software.
21-
>
22-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23-
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24-
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25-
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26-
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27-
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28-
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3+
Copyright (c) 2009-2021: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors: https://github.com/JuliaLang/julia/contributors
294

30-
Julia includes code from the following projects, which have their own licenses:
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
3112

32-
- [crc32c.c](https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software) (CRC-32c checksum code by Mark Adler) [[ZLib](https://opensource.org/licenses/Zlib)].
33-
- [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed.
34-
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively]
35-
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementation on Windows) [MIT]
36-
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
37-
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
38-
- [Python](https://docs.python.org/3/license.html) (for strtod and joinpath implementation on Windows) [BSD-3, effectively]
39-
- [Google Benchmark](https://github.com/google/benchmark) (for cyclecount implementation) [Apache 2.0]
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
4015

41-
The following components included in Julia `Base` have their own separate licenses:
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4223

43-
- base/ryu/* [Boost] (see [ryu](https://github.com/ulfjack/ryu/blob/master/LICENSE-Boost))
44-
- base/grisu/* [BSD-3] (see [double-conversion](https://github.com/google/double-conversion/blob/master/LICENSE))
45-
- base/special/{exp,rem_pio2,hyperbolic}.jl [Freely distributable with preserved copyright notice] (see [FDLIBM](https://www.netlib.org/fdlibm))
24+
end of terms and conditions
4625

47-
The Julia language links to the following external libraries, which have their
48-
own licenses:
49-
50-
- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]
51-
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT]
52-
- [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT]
53-
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
54-
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]
55-
56-
Julia's `stdlib` uses the following external libraries, which have their own licenses:
57-
58-
- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]
59-
- [OPENLIBM](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
60-
- [GMP](https://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
61-
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
62-
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
63-
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
64-
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
65-
- [MPFR](https://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
66-
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE) [BSD-3]
67-
- [LAPACK](https://netlib.org/lapack/LICENSE.txt) [BSD-3]
68-
- [PCRE](https://www.pcre.org/licence.txt) [BSD-3]
69-
- [SUITESPARSE](http://suitesparse.com) [mix of LGPL2+ and GPL2+; see individual module licenses]
70-
71-
Julia's build process uses the following external tools:
72-
73-
- [PATCHELF](https://nixos.org/patchelf.html)
74-
- [OBJCONV](https://www.agner.org/optimize/#objconv)
75-
76-
Julia bundles the following external programs and libraries:
77-
78-
- [7-Zip](https://www.7-zip.org/license.txt)
79-
- [ZLIB](https://zlib.net/zlib_license.html)
80-
81-
On some platforms, distributions of Julia contain SSL certificate authority certificates,
82-
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).
26+
Please see THIRDPARTY.md for license information for other software used in this project.

THIRDPARTY.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
The Julia language is licensed under the MIT License (see `LICENSE.md`). The "language" consists
2+
of the compiler (the contents of src/), most of the standard library (base/),
3+
and some utilities (most of the rest of the files in this repository). See below
4+
for exceptions.
5+
6+
- [crc32c.c](https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software) (CRC-32c checksum code by Mark Adler) [[ZLib](https://opensource.org/licenses/Zlib)].
7+
- [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed.
8+
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively]
9+
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementation on Windows) [MIT]
10+
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
11+
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
12+
- [Python](https://docs.python.org/3/license.html) (for strtod and joinpath implementation on Windows) [BSD-3, effectively]
13+
- [Google Benchmark](https://github.com/google/benchmark) (for cyclecount implementation) [Apache 2.0]
14+
15+
The following components included in Julia `Base` have their own separate licenses:
16+
17+
- base/ryu/* [Boost] (see [ryu](https://github.com/ulfjack/ryu/blob/master/LICENSE-Boost))
18+
- base/grisu/* [BSD-3] (see [double-conversion](https://github.com/google/double-conversion/blob/master/LICENSE))
19+
- base/special/{exp,rem_pio2,hyperbolic}.jl [Freely distributable with preserved copyright notice] (see [FDLIBM](https://www.netlib.org/fdlibm))
20+
21+
The Julia language links to the following external libraries, which have their
22+
own licenses:
23+
24+
- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]
25+
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT]
26+
- [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT]
27+
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
28+
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]
29+
30+
Julia's `stdlib` uses the following external libraries, which have their own licenses:
31+
32+
- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]
33+
- [OPENLIBM](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
34+
- [GMP](https://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
35+
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
36+
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
37+
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
38+
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
39+
- [MPFR](https://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
40+
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE) [BSD-3]
41+
- [LAPACK](https://netlib.org/lapack/LICENSE.txt) [BSD-3]
42+
- [PCRE](https://www.pcre.org/licence.txt) [BSD-3]
43+
- [SUITESPARSE](http://suitesparse.com) [mix of LGPL2+ and GPL2+; see individual module licenses]
44+
45+
Julia's build process uses the following external tools:
46+
47+
- [PATCHELF](https://nixos.org/patchelf.html)
48+
- [OBJCONV](https://www.agner.org/optimize/#objconv)
49+
50+
Julia bundles the following external programs and libraries:
51+
52+
- [7-Zip](https://www.7-zip.org/license.txt)
53+
- [ZLIB](https://zlib.net/zlib_license.html)
54+
55+
On some platforms, distributions of Julia contain SSL certificate authority certificates,
56+
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).

base/Base.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ include("options.jl")
107107
include("promotion.jl")
108108
include("tuple.jl")
109109
include("expr.jl")
110+
Pair{A, B}(@nospecialize(a), @nospecialize(b)) where {A, B} = (@_inline_meta; Pair{A, B}(convert(A, a)::A, convert(B, b)::B))
111+
#Pair{Any, B}(@nospecialize(a::Any), b) where {B} = (@_inline_meta; Pair{Any, B}(a, Base.convert(B, b)::B))
112+
#Pair{A, Any}(a, @nospecialize(b::Any)) where {A} = (@_inline_meta; Pair{A, Any}(Base.convert(A, a)::A, b))
110113
include("pair.jl")
111114
include("traits.jl")
112115
include("range.jl")

base/array.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,21 +698,25 @@ else
698698
end
699699
end
700700

701-
_array_for(::Type{T}, itr, ::HasLength) where {T} = Vector{T}(undef, Int(length(itr)::Integer))
702-
_array_for(::Type{T}, itr, ::HasShape{N}) where {T,N} = similar(Array{T,N}, axes(itr))
701+
_array_for(::Type{T}, itr, isz::HasLength) where {T} = _array_for(T, itr, isz, length(itr))
702+
_array_for(::Type{T}, itr, isz::HasShape{N}) where {T,N} = _array_for(T, itr, isz, axes(itr))
703+
_array_for(::Type{T}, itr, ::HasLength, len) where {T} = Vector{T}(undef, len)
704+
_array_for(::Type{T}, itr, ::HasShape{N}, axs) where {T,N} = similar(Array{T,N}, axs)
703705

704706
function collect(itr::Generator)
705707
isz = IteratorSize(itr.iter)
706708
et = @default_eltype(itr)
707709
if isa(isz, SizeUnknown)
708710
return grow_to!(Vector{et}(), itr)
709711
else
712+
shape = isz isa HasLength ? length(itr) : axes(itr)
710713
y = iterate(itr)
711714
if y === nothing
712715
return _array_for(et, itr.iter, isz)
713716
end
714717
v1, st = y
715-
collect_to_with_first!(_array_for(typeof(v1), itr.iter, isz), v1, itr, st)
718+
arr = _array_for(typeof(v1), itr.iter, isz, shape)
719+
return collect_to_with_first!(arr, v1, itr, st)
716720
end
717721
end
718722

0 commit comments

Comments
 (0)