Skip to content

Commit 9142ad4

Browse files
committed
fixing merge conflict
2 parents db56bd9 + 0680f19 commit 9142ad4

File tree

165 files changed

+2149
-974
lines changed

Some content is hidden

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

165 files changed

+2149
-974
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Hi! If you are new to the Julia community: welcome, and thanks for trying Julia. Please be sure to respect our [community standards](https://julialang.org/community/standards) in all interactions.
44

5+
If you are already familiar with Julia itself, this blog post by Katharine Hyatt on [Making your first Julia pull request](http://kshyatt.github.io/post/firstjuliapr/) is a great way to get started.
6+
57
## Learning Julia
68

79
[The learning page](https://julialang.org/learning) has a great list of resources for new and experienced users alike. [This tutorial video](https://www.youtube.com/watch?v=vWkgEddb4-A) is one recommended starting point, as is the "[Invitation to Julia](https://www.youtube.com/watch?v=gQ1y5NUD_RI)" workshop video from JuliaCon 2015 ([slide materials here](https://github.com/dpsanders/invitation_to_julia)). The [Julia documentation](https://docs.julialang.org/en/latest) covers the language and core library features, and is searchable.
@@ -12,7 +14,7 @@ Hi! If you are new to the Julia community: welcome, and thanks for trying Julia.
1214

1315
- Contributing code? Be sure to review the [contributor checklist](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#contributor-checklist) for helpful tips on the tools we use to build Julia.
1416

15-
- Library feature requests are generally not accepted on this issue tracker. New libraries should be developed as [packages](https://docs.julialang.org/en/latest/manual/packages#Package-Development-1). Discuss ideas for libraries at the [Julia Discourse forum](https://discourse.julialang.org). Doing so will often lead to pointers to existing projects and bring together collaborators with common interests.
17+
- Library feature requests are generally not accepted on this issue tracker. New libraries should be developed as [packages](https://julialang.github.io/Pkg.jl/v1/creating-packages/). Discuss ideas for libraries at the [Julia Discourse forum](https://discourse.julialang.org). Doing so will often lead to pointers to existing projects and bring together collaborators with common interests.
1618

1719
## Contributor Checklist
1820

@@ -56,7 +58,7 @@ A useful bug report filed as a GitHub issue provides information about how to re
5658

5759
### Contributing a Julia package
5860

59-
Julia has a built-in [package manager](https://github.com/JuliaLang/METADATA.jl) based on `git`. A number of [packages](http://pkg.julialang.org) across many domains are already available for Julia. Developers are encouraged to provide their libraries as a Julia package. The Julia manual provides instructions on [creating Julia packages](https://docs.julialang.org/en/latest/manual/packages).
61+
Julia has a built-in [package manager](https://julialang.github.io/Pkg.jl/v1/) based on `git`. A number of [packages](http://pkg.julialang.org) across many domains are already available for Julia. Developers are encouraged to provide their libraries as a Julia package. The manual provides instructions on [creating Julia packages](https://julialang.github.io/Pkg.jl/v1/creating-packages/).
6062

6163
For developers who need to wrap C libraries so that they can be called from Julia, the [Clang.jl](https://github.com/ihnorton/Clang.jl) package can help generate the wrappers automatically from the C header files.
6264

@@ -308,20 +310,17 @@ Julia if you made code-changes that Revise cannot handle.
308310
* Julia
309311
- **Homepage:** <https://julialang.org>
310312
- **Community:** <https://julialang.org/community/>
311-
- **IRC:** <http://webchat.freenode.net/?channels=Julia>
312313
- **Source code:** <https://github.com/JuliaLang/julia>
313-
- **Git clone URL:** <git://github.com/JuliaLang/julia.git>
314-
- **Documentation:** <https://julialang.org/manual/>
315-
- **Status:** <http://status.julialang.org/>
314+
- **Documentation:** <https://docs.julialang.org/>
316315
- **Code coverage:** <https://coveralls.io/r/JuliaLang/julia>
317316

318317
* Design of Julia
319-
- [Julia: A Fresh Approach to Numerical Computing](http://arxiv.org/pdf/1411.1607v3.pdf)
320-
- [Julia: A Fast Dynamic Language for Technical Computing](https://julialang.org/images/julia-dynamic-2012-tr.pdf)
321-
- [All Julia Publications](https://julialang.org/publications)
318+
- [Julia: A Fresh Approach to Numerical Computing](https://julialang.org/research/julia-fresh-approach-BEKS.pdf)
319+
- [Julia: Dynamism and Performance Reconciled by Design](http://janvitek.org/pubs/oopsla18b.pdf)
320+
- [All Julia Publications](https://julialang.org/research)
322321

323322
* Using GitHub
324323
- [Using Julia with GitHub (video)](http://www.youtube.com/watch?v=wnFYV3ZKtOg&feature=youtu.be)
325324
- [Using Julia on GitHub (notes for video)](https://gist.github.com/2712118#file_Julia_git_pull_request.md)
326325
- [General GitHub documentation](http://help.github.com)
327-
- [GitHub pull request documentation](http://help.github.com/send-pull-requests)
326+
- [GitHub pull request documentation](https://help.github.com/articles/creating-a-pull-request/)

Make.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ OSLIBS += -Wl,--version-script=$(JULIAHOME)/src/julia.expmap
996996
endif
997997
endif
998998
endif
999-
JLDFLAGS := -Wl,-Bdynamic
999+
JLDFLAGS := -Wl,-Bdynamic -Wl,-no-undefined
10001000
ifeq (-Bsymbolic-functions, $(shell $(LD) --help | grep -o -e "-Bsymbolic-functions"))
10011001
JLIBLDFLAGS := -Wl,-Bsymbolic-functions
10021002
else
@@ -1008,7 +1008,7 @@ endif
10081008

10091009
ifeq ($(OS), FreeBSD)
10101010
JLDFLAGS := -Wl,-Bdynamic
1011-
OSLIBS += -lelf -lkvm -lrt
1011+
OSLIBS += -lelf -lkvm -lrt -lpthread
10121012

10131013
# Tweak order of libgcc_s in DT_NEEDED,
10141014
# make it loaded first to

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
324324
$(INSTALL_M) $(build_private_libdir)/sys-debug.$(SHLIB_EXT) $(DESTDIR)$(private_libdir)
325325
endif
326326

327-
# Copy in system image build script
328-
$(INSTALL_M) $(JULIAHOME)/contrib/build_sysimg.jl $(DESTDIR)$(datarootdir)/julia/
329327
# Copy in all .jl sources as well
330328
cp -R -L $(build_datarootdir)/julia $(DESTDIR)$(datarootdir)/
331329
# Copy documentation
@@ -434,6 +432,8 @@ ifeq ($(OS), WINNT)
434432
# compress nsis installer and combine with 7zip self-extracting header
435433
cd $(BUILDROOT) && $(JULIAHOME)/dist-extras/7z a -mx9 "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" julia-installer.exe
436434
cd $(BUILDROOT) && cat $(JULIAHOME)/contrib/windows/7zS.sfx $(JULIAHOME)/contrib/windows/7zSFX-config.txt "julia-install-$(JULIA_COMMIT)-$(ARCH).7z" > "$(JULIA_BINARYDIST_FILENAME).exe"
435+
chmod a+x "$(BUILDROOT)/$(JULIA_BINARYDIST_FILENAME).exe"
436+
-rm -f $(BUILDROOT)/julia-install-$(JULIA_COMMIT)-$(ARCH).7z
437437
-rm -f $(BUILDROOT)/julia-installer.exe
438438
else
439439
cd $(BUILDROOT) && $(TAR) zcvf $(JULIA_BINARYDIST_FILENAME).tar.gz julia-$(JULIA_COMMIT)

NEWS.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Julia v1.2 Release Notes
44
New language features
55
---------------------
66

7-
* The `extrema` function now accepts a function argument in the same manner as `minimum` and
8-
`maximum` ([#30323]).
7+
* Argument splatting (`x...`) can now be used in calls to the `new` pseudo-function in
8+
constructors ([#30577]).
99

1010
Multi-threading changes
1111
-----------------------
@@ -26,14 +26,25 @@ New library functions
2626
---------------------
2727

2828
* `getipaddrs()` function returns all the IP addresses of the local machine ([#30349])
29+
* Added `Base.hasproperty` and `Base.hasfield` ([#28850]).
30+
* One argument `!=(x)`, `>(x)`, `>=(x)`, `<(x)`, `<=(x)` has been added for currying,
31+
similar to the existing `==(x)` and `isequal(x)` methods ([#30915]).
2932

3033
Standard library changes
3134
------------------------
3235

36+
* The `extrema` function now accepts a function argument in the same manner as `minimum` and
37+
`maximum` ([#30323]).
38+
* `hasmethod` can now check for matching keyword argument names ([#30712]).
39+
* `startswith` and `endswith` now accept a `Regex` for the second argument ([#29790]).
40+
3341
#### LinearAlgebra
3442

3543
* Added keyword arguments `rtol`, `atol` to `pinv` and `nullspace` ([#29998]).
3644
* `UniformScaling` instances are now callable such that e.g. `I(3)` will produce a `Diagonal` matrix ([#30298]).
45+
* Eigenvalues λ of general matrices are now sorted lexicographically by (Re λ, Im λ) ([#21598]).
46+
* `one` for structured matrices (`Diagonal`, `Bidiagonal`, `Tridiagonal`, `Symtridiagonal`) now preserves
47+
structure and type. ([#29777])
3748

3849
#### SparseArrays
3950

@@ -64,8 +75,22 @@ Deprecated or removed
6475

6576

6677
<!--- generated by NEWS-update.jl: -->
78+
[#21598]: https://github.com/JuliaLang/julia/issues/21598
79+
[#24980]: https://github.com/JuliaLang/julia/issues/24980
80+
[#28850]: https://github.com/JuliaLang/julia/issues/28850
81+
[#29790]: https://github.com/JuliaLang/julia/issues/29790
6782
[#29998]: https://github.com/JuliaLang/julia/issues/29998
6883
[#30061]: https://github.com/JuliaLang/julia/issues/30061
6984
[#30200]: https://github.com/JuliaLang/julia/issues/30200
85+
[#30298]: https://github.com/JuliaLang/julia/issues/30298
7086
[#30323]: https://github.com/JuliaLang/julia/issues/30323
7187
[#30349]: https://github.com/JuliaLang/julia/issues/30349
88+
[#30372]: https://github.com/JuliaLang/julia/issues/30372
89+
[#30583]: https://github.com/JuliaLang/julia/issues/30583
90+
[#30584]: https://github.com/JuliaLang/julia/issues/30584
91+
[#30593]: https://github.com/JuliaLang/julia/issues/30593
92+
[#30618]: https://github.com/JuliaLang/julia/issues/30618
93+
[#30670]: https://github.com/JuliaLang/julia/issues/30670
94+
[#30712]: https://github.com/JuliaLang/julia/issues/30712
95+
[#30724]: https://github.com/JuliaLang/julia/issues/30724
96+
[#30915]: https://github.com/JuliaLang/julia/issues/30915

README.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ if they complete without error, you should be in good shape to start using Julia
139139

140140
You can read about [getting started](https://docs.julialang.org/en/stable/manual/getting-started/) in the manual.
141141

142-
If you are building a Julia package for distribution on Linux, OS X,
142+
If you are building a Julia package for distribution on Linux, macOS,
143143
or Windows, take a look at the detailed notes in
144144
[DISTRIBUTING.md](https://github.com/JuliaLang/julia/blob/master/DISTRIBUTING.md).
145145

@@ -183,7 +183,7 @@ latest version.
183183
b. To delete existing binaries of `julia` and all its dependencies,
184184
delete the `./usr` directory _in the source tree_.
185185

186-
3. If you've updated OS X recently, be sure to run `xcode-select --install` to update the command line tools.
186+
3. If you've updated macOS recently, be sure to run `xcode-select --install` to update the command line tools.
187187
Otherwise, you could run into errors for missing headers and libraries, such as
188188
```ld: library not found for -lcrt1.10.6.o```.
189189

@@ -211,8 +211,6 @@ Julia does not install anything outside the directory it was cloned into. Julia
211211

212212
### Linux
213213

214-
#### General
215-
216214
* GCC version 4.7 or later is required to build Julia.
217215
* To use external shared libraries not in the system library search path, set `USE_SYSTEM_XXX=1` and `LDFLAGS=-Wl,-rpath,/path/to/dir/contains/libXXX.so` in `Make.user`.
218216
* Instead of setting `LDFLAGS`, putting the library directory into the environment variable `LD_LIBRARY_PATH` (at both compile and run time) also works.
@@ -227,40 +225,21 @@ For example, to build for Pentium 4, set `MARCH=pentium4` and install the necess
227225

228226
You can also set `MARCH=native` for a maximum-performance build customized for the current machine CPU.
229227

230-
231-
#### Ubuntu
232-
233-
The [julia-deps PPA](https://launchpad.net/~staticfloat/+archive/julia-deps/) contains updated packages for Julia dependencies if you want to use system libraries instead of having them downloaded and built during the build process. See [System Provided Libraries](#system-provided-libraries).
234-
235-
#### RHEL/CentOS 6
236-
237-
On RHEL/CentOS 6 systems, the default compiler (`gcc` 4.4) is too old to build Julia.
238-
239-
Install or contact your systems administrator to install a more recent version of `gcc`. The [Scientific Linux Developer Toolset](http://linux.web.cern.ch/linux/devtoolset/) works well.
240-
241-
242228
#### Linux Build Troubleshooting
243229

244230
Problem | Possible Solution
245231
------------------------|---------------------
246232
OpenBLAS build failure | Set one of the following build options in `Make.user` and build again: <ul><li> `OPENBLAS_TARGET_ARCH=BARCELONA` (AMD CPUs) or `OPENBLAS_TARGET_ARCH=NEHALEM` (Intel CPUs)<ul>Set `OPENBLAS_DYNAMIC_ARCH = 0` to disable compiling multiple architectures in a single binary.</ul></li><li> `OPENBLAS_NO_AVX2 = 1` disables AVX2 instructions, allowing OpenBLAS to compile with `OPENBLAS_DYNAMIC_ARCH = 1` using old versions of binutils </li><li> `USE_SYSTEM_BLAS=1` uses the system provided `libblas` <ul><li>Set `LIBBLAS=-lopenblas` and `LIBBLASNAME=libopenblas` to force the use of the system provided OpenBLAS when multiple BLAS versions are installed. </li></ul></li></ul><p> If you get an error that looks like ```../kernel/x86_64/dgemm_kernel_4x4_haswell.S:1709: Error: no such instruction: `vpermpd $ 0xb1,%ymm0,%ymm0'```, then you need to set `OPENBLAS_DYNAMIC_ARCH = 0` or `OPENBLAS_NO_AVX2 = 1`, or you need a newer version of `binutils` (2.18 or newer). ([Issue #7653](https://github.com/JuliaLang/julia/issues/7653))
247233
Illegal Instruction error | Check if your CPU supports AVX while your OS does not (e.g. through virtualization, as described in [this issue](https://github.com/JuliaLang/julia/issues/3263)).
248234

249-
### OS X
235+
### macOS
250236

251237
You need to have the current Xcode command line utilities installed: run `xcode-select --install` in the terminal.
252-
You will need to rerun this terminal command after each OS X update, otherwise you may run into errors involving missing libraries or headers.
253-
You will also need a 64-bit gfortran to compile Julia dependencies. The gfortran-4.7 (and newer) compilers in Brew, Fink, and MacPorts work for building Julia.
254-
255-
Clang is now used by default to build Julia on OS X 10.7 and above. On OS X 10.6, the Julia build will automatically use `gcc`.
256-
On current systems, we recommend that you install the command line tools as described above. Older systems do not have a separate command line tools package from Apple, and will require a full Xcode install. On these, you will need at least Xcode 4.3.3. In Xcode prior to v5.0, you can alternatively go to Preferences -> Downloads and select the Command Line Utilities. These steps will ensure that clang v3.1 is installed, which is the minimum version of `clang` required to build Julia.
238+
You will need to rerun this terminal command after each macOS update, otherwise you may run into errors involving missing libraries or headers.
239+
You will also need a 64-bit gfortran to compile Julia dependencies. The gfortran-4.7 (and newer) compilers in Homebrew work for building Julia.
257240

258241
If you have set `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` in your `.bashrc` or equivalent, Julia may be unable to find various libraries that come bundled with it. These environment variables need to be unset for Julia to work.
259242

260-
If you see build failures in OpenBLAS or if you prefer to experiment, you can use the Apple provided BLAS in vecLib by building with `USE_SYSTEM_BLAS=1`. Julia does not use the Apple provided LAPACK, as it is too old.
261-
262-
When building Julia, or its dependencies, libraries installed by third party package managers can redirect the compiler to use an incompatible version of the software it is looking for. One example of this happening is when a piece of software called the "linker" gives an error involving "Undefined symbols." If that happens, you can usually figure out what software package is causing the error from the names in the error text. This sort of error can be bypassed by, temporarily, uninstalling the offending package. If the offending package cannot be uninstalled by itself, it may be possible to just uninstall the development headers (for example: a package ending in "-dev" in Fink).
263-
264243
### FreeBSD
265244

266245
Clang is the default compiler on FreeBSD 11.0-RELEASE and above.
@@ -294,7 +273,7 @@ Julia can be developed in an isolated Vagrant environment. See [the Vagrant READ
294273
Building Julia requires that the following software be installed:
295274

296275
- **[GNU make]** — building dependencies.
297-
- **[gcc & g++][gcc]** (>= 4.7) or **[Clang][clang]** (>= 3.1, Xcode 4.3.3 on OS X) — compiling and linking C, C++.
276+
- **[gcc & g++][gcc]** (>= 4.7) or **[Clang][clang]** (>= 3.1, Xcode 4.3.3 on macOS) — compiling and linking C, C++.
298277
- **[libatomic][gcc]** — provided by **[gcc]** and needed to support atomic operations.
299278
- **[python]** (>=2.7) — needed to build LLVM.
300279
- **[gfortran]** — compiling and linking Fortran libraries.

base/abstractarray.jl

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ function copyto!(dest::AbstractArray, src)
669669
y = iterate(destiter)
670670
for x in src
671671
y === nothing &&
672-
throw(ArgumentError(string("destination has fewer elements than required")))
672+
throw(ArgumentError("destination has fewer elements than required"))
673673
dest[y[1]] = x
674674
y = iterate(destiter, y[2])
675675
end
@@ -700,7 +700,7 @@ function copyto!(dest::AbstractArray, dstart::Integer, src, sstart::Integer)
700700
end
701701
if y === nothing
702702
throw(ArgumentError(string("source has fewer elements than required, ",
703-
"expected at least ",sstart,", got ",sstart-1)))
703+
"expected at least ",sstart,", got ",sstart-1)))
704704
end
705705
i = Int(dstart)
706706
while y != nothing
@@ -2011,7 +2011,8 @@ concatenate_setindex!(R, X::AbstractArray, I...) = (R[I...] = X)
20112011

20122012
function map!(f::F, dest::AbstractArray, A::AbstractArray) where F
20132013
for (i,j) in zip(eachindex(dest),eachindex(A))
2014-
dest[i] = f(A[j])
2014+
val = f(@inbounds A[j])
2015+
@inbounds dest[i] = val
20152016
end
20162017
return dest
20172018
end
@@ -2051,19 +2052,28 @@ map(f, ::AbstractSet) = error("map is not defined on sets")
20512052
## 2 argument
20522053
function map!(f::F, dest::AbstractArray, A::AbstractArray, B::AbstractArray) where F
20532054
for (i, j, k) in zip(eachindex(dest), eachindex(A), eachindex(B))
2054-
dest[i] = f(A[j], B[k])
2055+
@inbounds a, b = A[j], B[k]
2056+
val = f(a, b)
2057+
@inbounds dest[i] = val
20552058
end
20562059
return dest
20572060
end
20582061

20592062
## N argument
20602063

20612064
@inline ith_all(i, ::Tuple{}) = ()
2062-
@inline ith_all(i, as) = (as[1][i], ith_all(i, tail(as))...)
2065+
function ith_all(i, as)
2066+
@_propagate_inbounds_meta
2067+
return (as[1][i], ith_all(i, tail(as))...)
2068+
end
20632069

20642070
function map_n!(f::F, dest::AbstractArray, As) where F
2065-
for i = LinearIndices(As[1])
2066-
dest[i] = f(ith_all(i, As)...)
2071+
idxs1 = LinearIndices(As[1])
2072+
@boundscheck LinearIndices(dest) == idxs1 && all(x -> LinearIndices(x) == idxs1, As)
2073+
for i = idxs1
2074+
@inbounds I = ith_all(i, As)
2075+
val = f(I...)
2076+
@inbounds dest[i] = val
20672077
end
20682078
return dest
20692079
end

base/abstractarraymath.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
isreal(x::AbstractArray) = all(isreal,x)
66
iszero(x::AbstractArray) = all(iszero,x)
77
isreal(x::AbstractArray{<:Real}) = true
8-
all(::typeof(isinteger), ::AbstractArray{<:Integer}) = true
98

109
## Constructors ##
1110

0 commit comments

Comments
 (0)