Skip to content

Commit

Permalink
Merge branch 'master' into janrous-rai-jr-compile-time-always-on
Browse files Browse the repository at this point in the history
Merge in JuliaLang#41733.
  • Loading branch information
NHDaly committed Aug 26, 2021
2 parents 4b6f894 + 1bbba21 commit c41a590
Show file tree
Hide file tree
Showing 226 changed files with 3,382 additions and 2,238 deletions.
2 changes: 2 additions & 0 deletions .buildkite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
This directory contains the Buildkite configuration files for Base Julia CI.

The rootfs image definitions are located in the [rootfs-images](https://github.com/JuliaCI/rootfs-images) repository.

The documentation for the Base Julia CI setup is located in the [base-buildkite-docs](https://github.com/JuliaCI/base-buildkite-docs) repository.
4 changes: 2 additions & 2 deletions .buildkite/pipelines/main/misc/llvmpasses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ steps:
- JuliaCI/julia#v1:
version: 1.6
- staticfloat/sandbox#v1:
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz
rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e"
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.8/package_linux.x86_64.tar.gz
rootfs_treehash: "84a323ae8fcc724f8ea5aca5901bbbf4bda3e519"
uid: 1000
gid: 1000
workspaces:
Expand Down
5 changes: 5 additions & 0 deletions .buildkite/pipelines/main/platforms/linux64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ steps:
key: package_linux64
plugins:
- JuliaCI/julia#v1:
# Drop default "registries" directory, so it is not persisted from execution to execution
persist_depot_dirs: packages,artifacts,compiled
version: 1.6
- staticfloat/sandbox#v1:
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz
Expand All @@ -35,6 +37,9 @@ steps:
make release
make install
echo "--- Make sure that the working directory is clean"
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
echo "--- Print Julia version info"
./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()'
Expand Down
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
status:
project: off
patch: off
6 changes: 4 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CODEOWNERS @JuliaLang/github-actions
/.github/ @JuliaLang/github-actions
CODEOWNERS @JuliaLang/github-actions
/.github/ @JuliaLang/github-actions
/.buildkite/ @JuliaLang/github-actions

/.github/workflows/statuses.yml @DilumAluthge
74 changes: 74 additions & 0 deletions .github/workflows/statuses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Please ping @DilumAluthge when making any changes to this file.

# This is just a short-term solution until we have migrated all of CI to Buildkite.
#
# 1. TODO: delete this file once we have migrated all of CI to Buildkite.
#
# 2. TODO: disable GitHub Actions on the `JuliaLang/julia` repository once we have migrated all
# of CI to Buildkite.

# Here are some steps that we take in this workflow file for security reasons:
# 1. We do not checkout any code.
# 2. We do not run any external actions.
# 3. We only give `GITHUB_TOKEN` the minimum necessary set of permissions.

name: Statuses

on:
push:
branches:
- 'master'
- 'release-*'
# When using the `pull_request_target` event, all PRs will get a `GITHUB_TOKEN` that has
# write permissions, even if the PR is from a fork.
# Therefore, for security reasons, we do not checkout any code in this workflow.
pull_request_target:
branches:
- 'master'
- 'release-*'

# These are the permissions for the `GITHUB_TOKEN` token.
# We should only give the token the minimum necessary set of permissions.
permissions:
statuses: write

jobs:
statuses:
name: statuses
runs-on: ubuntu-latest
if: github.repository == 'JuliaLang/julia'
strategy:
fail-fast: false
steps:
- run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
if: github.event_name == 'pull_request_target'

- run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV
if: github.event_name != 'pull_request_target'

- run: echo "The SHA is ${{ env.SHA }}"

# As we incrementally migrate individual jobs from Buildbot to Buildkite, we should
# remove them from the `context_list`.
- run: |
declare -a CONTEXT_LIST=(
"buildbot/tester_freebsd64"
"buildbot/tester_linux32"
"buildbot/tester_linux64"
"buildbot/tester_linuxaarch64"
"buildbot/tester_macos64"
"buildbot/tester_win32"
"buildbot/tester_win64"
)
for CONTEXT in "${CONTEXT_LIST[@]}"
do
curl \
-X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"context\": \"$CONTEXT\", \"state\": \"$STATE\"}" \
https://api.github.com/repos/JuliaLang/julia/statuses/${{ env.SHA }}
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STATE: "pending"
47 changes: 23 additions & 24 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,26 @@ license: "MIT"
doi: "10.1137/141000671"
date-released: 2017-02-07
url: "https://julialang.org"
references:
- scope: "Cite this paper whenever you use Julia"
type: article
title: "Julia: A fresh approach to numerical computing"
authors:
- family-names: "Bezanson"
given-names: "Jeff"
- family-names: "Edelman"
given-names: "Alan"
- family-names: "Karpinski"
given-names: "Stefan"
- family-names: "Shah"
given-names: "Viral B."
doi: "10.1137/141000671"
journal: "SIAM Review"
volume: 59
number: 1
pages: 33
start: 65
end: 98
year: 2017
url: "https://dx.doi.org/10.1137/141000671"
publisher:
- name: "SIAM"
preferred-citation:
authors:
- family-names: "Bezanson"
given-names: "Jeff"
- family-names: "Edelman"
given-names: "Alan"
- family-names: "Karpinski"
given-names: "Stefan"
- family-names: "Shah"
given-names: "Viral B."
doi: "10.1137/141000671"
journal: "SIAM Review"
month: 9
start: 65
end: 98
pages: 33
title: "Julia: A fresh approach to numerical computing"
type: article
volume: 59
issue: 1
year: 2017
publisher:
- name: "SIAM"
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ runtest harness).
- To remove whitespace relative to the `master` branch, run
`git rebase --whitespace=fix master`.

#### Git Recommendations For Pull Request Reviewers

- When merging, we generally like `squash+merge`. Unless it is the rare case of a PR with carefully staged individual commits that you want in the history separately, in which case `merge` is acceptable, but usually prefer `squash+merge`.


## Resources

* Julia
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

end of terms and conditions

Please see THIRDPARTY.md for license information for other software used in this project.
Please see [THIRDPARTY.md](./THIRDPARTY.md) for license information for other software used in this project.
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ New library functions
New library features
--------------------

* `@test_throws "some message" triggers_error()` can now be used to check whether the displayed error text
contains "some message" regardless of the specific exception type.
Regular expressions, lists of strings, and matching functions are also supported. ([#41888)

Standard library changes
------------------------

* `range` accepts either `stop` or `length` as a sole keyword argument ([#39241])
* The `length` function on certain ranges of certain specific element types no longer checks for integer
overflow in most cases. The new function `checked_length` is now available, which will try to use checked
arithmetic to error if the result may be wrapping. Or use a package such as SaferIntegers.jl when
constructing the range. ([#40382])
* TCP socket objects now expose `shutdown` functionality and support half-open mode usage ([#40783]).
* TCP socket objects now expose `closewrite` functionality and support half-open mode usage ([#40783]).

#### InteractiveUtils
* A new macro `@time_imports` for reporting any time spent importing packages and their dependencies ([#41612])
Expand All @@ -63,6 +67,12 @@ Standard library changes

#### REPL

* ` ?(x, y` followed by TAB displays all methods that can be called
with arguments `x, y, ...`. (The space at the beginning prevents entering help-mode.)
`MyModule.?(x, y` limits the search to `MyModule`. TAB requires that at least one
argument have a type more specific than `Any`; use SHIFT-TAB instead of TAB
to allow any compatible methods.

#### SparseArrays

#### Dates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Julia. However, most users should use the most recent stable version
of Julia. You can get this version by changing to the Julia directory
and running:

git checkout v1.6.1
git checkout v1.6.2

Now run `make` to build the `julia` executable.

Expand Down
29 changes: 15 additions & 14 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,52 @@
The Julia language is licensed under the MIT License (see `LICENSE.md`). The "language" consists
The Julia language is licensed under the MIT License (see [LICENSE.md](./LICENSE.md) ). The "language" consists
of the compiler (the contents of src/), most of the standard library (base/),
and some utilities (most of the rest of the files in this repository). See below
for exceptions.

- [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)].
- [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.
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively]
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementation on Windows) [MIT]
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/disasm.cpp) [UIUC]
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for src/getopt.c and src/getopt.h) [MIT]
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
- [Python](https://docs.python.org/3/license.html) (for strtod and joinpath implementation on Windows) [BSD-3, effectively]
- [Google Benchmark](https://github.com/google/benchmark) (for cyclecount implementation) [Apache 2.0]
- [Python](https://docs.python.org/3/license.html) (for strtod implementation on Windows) [PSF]
- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]

The following components included in Julia `Base` have their own separate licenses:

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

The Julia language links to the following external libraries, which have their
own licenses:

- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT]
- [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT]
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
- [LIBUNWIND](https://github.com/libunwind/libunwind/blob/master/LICENSE) [MIT]
- [LIBUV](https://github.com/JuliaLang/libuv/blob/julia-uv2-1.39.0/LICENSE) [MIT]
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [UIUC]
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]

Julia's `stdlib` uses the following external libraries, which have their own licenses:

- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]
- [DSFMT](https://github.com/MersenneTwister-Lab/dSFMT/blob/master/LICENSE.txt) [BSD-3]
- [OPENLIBM](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
- [GMP](https://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
- [MBEDTLS](https://github.com/ARMmbed/mbedtls/blob/development/LICENSE) [Apache 2.0]
- [MPFR](https://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE) [BSD-3]
- [LAPACK](https://netlib.org/lapack/LICENSE.txt) [BSD-3]
- [PCRE](https://www.pcre.org/licence.txt) [BSD-3]
- [SUITESPARSE](http://suitesparse.com) [mix of LGPL2+ and GPL2+; see individual module licenses]
- [SUITESPARSE](https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/master/LICENSE.txt) [mix of LGPL2+ and GPL2+; see individual module licenses]
- [LIBBLASTRAMPOLINE](https://github.com/staticfloat/libblastrampoline/blob/main/LICENSE) [MIT]
- [NGHTTP2](https://github.com/nghttp2/nghttp2/blob/master/COPYING) [MIT]

Julia's build process uses the following external tools:

- [PATCHELF](https://nixos.org/patchelf.html)
- [OBJCONV](https://www.agner.org/optimize/#objconv)
- [LIBWHICH](https://github.com/vtjnash/libwhich/blob/master/LICENSE) [MIT]

Julia bundles the following external programs and libraries:

Expand Down
39 changes: 19 additions & 20 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,42 @@ include(path::String) = include(Base, path)
const is_primary_base_module = ccall(:jl_module_parent, Ref{Module}, (Any,), Base) === Core.Main
ccall(:jl_set_istopmod, Cvoid, (Any, Bool), Base, is_primary_base_module)

# The real @inline macro is not available until after array.jl, so this
# internal macro splices the meta Expr directly into the function body.
macro _inline_meta()
Expr(:meta, :inline)
end
macro _noinline_meta()
Expr(:meta, :noinline)
end
# The @inline/@noinline macros that can be applied to a function declaration are not available
# until after array.jl, and so we will mark them within a function body instead.
macro inline() Expr(:meta, :inline) end
macro noinline() Expr(:meta, :noinline) end

# Try to help prevent users from shooting them-selves in the foot
# with ambiguities by defining a few common and critical operations
# (and these don't need the extra convert code)
getproperty(x::Module, f::Symbol) = (@_inline_meta; getfield(x, f))
getproperty(x::Module, f::Symbol) = (@inline; getfield(x, f))
setproperty!(x::Module, f::Symbol, v) = setfield!(x, f, v) # to get a decent error
getproperty(x::Type, f::Symbol) = (@_inline_meta; getfield(x, f))
getproperty(x::Type, f::Symbol) = (@inline; getfield(x, f))
setproperty!(x::Type, f::Symbol, v) = error("setfield! fields of Types should not be changed")
getproperty(x::Tuple, f::Int) = (@_inline_meta; getfield(x, f))
getproperty(x::Tuple, f::Int) = (@inline; getfield(x, f))
setproperty!(x::Tuple, f::Int, v) = setfield!(x, f, v) # to get a decent error

getproperty(x, f::Symbol) = (@_inline_meta; getfield(x, f))
getproperty(x, f::Symbol) = (@inline; getfield(x, f))
setproperty!(x, f::Symbol, v) = setfield!(x, f, convert(fieldtype(typeof(x), f), v))

dotgetproperty(x, f) = getproperty(x, f)

getproperty(x::Module, f::Symbol, order::Symbol) = (@_inline_meta; getfield(x, f, order))
getproperty(x::Module, f::Symbol, order::Symbol) = (@inline; getfield(x, f, order))
setproperty!(x::Module, f::Symbol, v, order::Symbol) = setfield!(x, f, v, order) # to get a decent error
getproperty(x::Type, f::Symbol, order::Symbol) = (@_inline_meta; getfield(x, f, order))
getproperty(x::Type, f::Symbol, order::Symbol) = (@inline; getfield(x, f, order))
setproperty!(x::Type, f::Symbol, v, order::Symbol) = error("setfield! fields of Types should not be changed")
getproperty(x::Tuple, f::Int, order::Symbol) = (@_inline_meta; getfield(x, f, order))
getproperty(x::Tuple, f::Int, order::Symbol) = (@inline; getfield(x, f, order))
setproperty!(x::Tuple, f::Int, v, order::Symbol) = setfield!(x, f, v, order) # to get a decent error

getproperty(x, f::Symbol, order::Symbol) = (@_inline_meta; getfield(x, f, order))
setproperty!(x, f::Symbol, v, order::Symbol) = (@_inline_meta; setfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
getproperty(x, f::Symbol, order::Symbol) = (@inline; getfield(x, f, order))
setproperty!(x, f::Symbol, v, order::Symbol) = (@inline; setfield!(x, f, convert(fieldtype(typeof(x), f), v), order))

swapproperty!(x, f::Symbol, v, order::Symbol=:notatomic) =
(@_inline_meta; Core.swapfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
(@inline; Core.swapfield!(x, f, convert(fieldtype(typeof(x), f), v), order))
modifyproperty!(x, f::Symbol, op, v, order::Symbol=:notatomic) =
(@_inline_meta; Core.modifyfield!(x, f, op, v, order))
(@inline; Core.modifyfield!(x, f, op, v, order))
replaceproperty!(x, f::Symbol, expected, desired, success_order::Symbol=:notatomic, fail_order::Symbol=success_order) =
(@_inline_meta; Core.replacefield!(x, f, expected, convert(fieldtype(typeof(x), f), desired), success_order, fail_order))
(@inline; Core.replacefield!(x, f, expected, convert(fieldtype(typeof(x), f), desired), success_order, fail_order))


include("coreio.jl")
Expand Down Expand Up @@ -107,6 +103,9 @@ include("options.jl")
include("promotion.jl")
include("tuple.jl")
include("expr.jl")
Pair{A, B}(@nospecialize(a), @nospecialize(b)) where {A, B} = (@inline; Pair{A, B}(convert(A, a)::A, convert(B, b)::B))
#Pair{Any, B}(@nospecialize(a::Any), b) where {B} = (@inline; Pair{Any, B}(a, Base.convert(B, b)::B))
#Pair{A, Any}(a, @nospecialize(b::Any)) where {A} = (@inline; Pair{A, Any}(Base.convert(A, a)::A, b))
include("pair.jl")
include("traits.jl")
include("range.jl")
Expand Down
Loading

0 comments on commit c41a590

Please sign in to comment.