Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausC committed Nov 19, 2018
2 parents 7073d71 + 02d8da2 commit e43667e
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 44 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ Then, acquire the source code by cloning the git repository:
git clone git:https://github.com/JuliaLang/julia.git

(If you are behind a firewall, you may need to use the `https` protocol instead of the `git` protocol:

git config --global url."https://".insteadOf git:https://

```sh
git config --global url."https://".insteadOf git:https://
```
Be sure to also configure your system to use the appropriate proxy settings, e.g. by setting the `https_proxy` and `http_proxy` variables.)

By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia, which is currently the `1.0` series of releases. You can get this version by changing to the Julia directory and running
Expand Down Expand Up @@ -135,10 +135,10 @@ or Windows, take a look at the detailed notes in

If you have previously downloaded `julia` using `git clone`, you can update the
existing source tree using `git pull` rather than starting anew:

cd julia
git pull && make

```sh
cd julia
git pull && make
```
Assuming that you had made no changes to the source tree that will conflict
with upstream updates, these commands will trigger a build to update to the
latest version.
Expand Down Expand Up @@ -387,10 +387,10 @@ As a high-performance numerical language, Julia should be linked to a multi-thre
### Intel MKL

For a 64-bit architecture, the environment should be set up as follows:

# bash
source /path/to/intel/bin/compilervars.sh intel64

```sh
# bash
source /path/to/intel/bin/compilervars.sh intel64
```
Add the following to the `Make.user` file:

USE_INTEL_MKL = 1
Expand All @@ -417,9 +417,9 @@ The Julia source code is organized as follows:
If you would rather not compile the latest Julia from source, platform-specific tarballs with pre-compiled binaries are also [available for download](https://julialang.org/downloads/).

You can either run the `julia` executable using its full path in the directory created above, or add that directory to your executable path so that you can run the Julia program from anywhere (in the current shell session):

export PATH="$(pwd)/julia:$PATH"

```sh
export PATH="$(pwd)/julia:$PATH"
```
Now you should be able to run Julia like this:

julia
Expand Down
26 changes: 13 additions & 13 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function generate_precompile_statements()
# Fake being cygwin
pipename = """\\\\?\\pipe\\cygwin-$("0"^16)-pty10-abcdef"""
server = listen(pipename)
slave = connect(pipename)
@assert ccall(:jl_ispty, Cint, (Ptr{Cvoid},), slave.handle) == 1
master = accept(server)
pty_slave = connect(pipename)
@assert ccall(:jl_ispty, Cint, (Ptr{Cvoid},), pty_slave.handle) == 1
pty_master = accept(server)
else
slave, master = open_fake_pty()
pty_slave, pty_master = open_fake_pty()
end
done = false
blackhole = Sys.isunix() ? "/dev/null" : "nul"
Expand All @@ -96,12 +96,12 @@ function generate_precompile_statements()
--compile=all --startup-file=no --color=yes
-e 'import REPL; REPL.Terminals.is_precompiling[] = true'
-i`,
slave, slave, slave; wait=false)
readuntil(master, "julia>", keep=true)
pty_slave, pty_slave, pty_slave; wait=false)
readuntil(pty_master, "julia>", keep=true)
t = @async begin
while true
sleep(0.5)
s = String(readavailable(master))
s = String(readavailable(pty_master))
write(repl_output_buffer, s)
if occursin("__PRECOMPILE_END__", s)
break
Expand All @@ -110,18 +110,18 @@ function generate_precompile_statements()
end
if have_repl
for l in split(precompile_script, '\n'; keepempty=false)
write(master, l, '\n')
write(pty_master, l, '\n')
end
end
write(master, "print(\"__PRECOMPILE\", \"_END__\")", '\n')
write(pty_master, "print(\"__PRECOMPILE\", \"_END__\")", '\n')
wait(t)

# TODO Figure out why exit() on Windows doesn't exit the process
if Sys.iswindows()
print(master, "ccall(:_exit, Cvoid, (Cint,), 0)\n")
print(pty_master, "ccall(:_exit, Cvoid, (Cint,), 0)\n")
else
write(master, "exit()\n")
readuntil(master, "exit()\r\e[13C\r\n")
write(pty_master, "exit()\n")
readuntil(pty_master, "exit()\r\e[13C\r\n")
# @assert bytesavailable(master) == 0
end
wait(p)
Expand All @@ -132,7 +132,7 @@ function generate_precompile_statements()
-e0`)
end
end
close(master)
close(pty_master)

# Check what the REPL displayed
# repl_output = String(take!(repl_output_buffer))
Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ CURL_VER = 7.56.0
# Specify the version of the Mozilla CA Certificate Store to obtain.
# The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
# See https://curl.haxx.se/docs/caextract.html for more details.
MOZILLA_CACERT_VERSION := 2018-06-20
MOZILLA_CACERT_VERSION := 2018-10-17
1 change: 0 additions & 1 deletion deps/checksums/cacert-2018-06-20.pem/md5

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/cacert-2018-06-20.pem/sha512

This file was deleted.

1 change: 1 addition & 0 deletions deps/checksums/cacert-2018-10-17.pem/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
882db4f54c25b5157cef6c0d182e729e
1 change: 1 addition & 0 deletions deps/checksums/cacert-2018-10-17.pem/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10b5d87eeeb52e38f49b97b4cb8dc359dbfef6ffe581f63003356ef691fc20a301d9550980eff3f30457c0564a9f6b6368783c8bd116ff35fcda3f32b26dad3f
27 changes: 27 additions & 0 deletions doc/src/manual/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,33 @@ ERROR: syntax: invalid escape sequence
Triple-quoted regex strings, of the form `r"""..."""`, are also supported (and may be convenient
for regular expressions containing quotation marks or newlines).

The `Regex()` constructor may be used to create a valid regex string programmatically. This permits using the contents of string variables and other string operations when constructing the regex string. Any of the regex codes above can be used within the single string argument to `Regex()`. Here are some examples:

```jldoctest
julia> using Dates
julia> d = Date(1962,7,10)
1962-07-10
julia> regex_d = Regex("Day " * string(day(d)))
r"Day 10"
julia> match(regex_d, "It happened on Day 10")
RegexMatch("Day 10")
julia> name = "Jon"
"Jon"
julia> regex_name = Regex("[\"( ]$name[\") ]") # interpolate value of name
r"[\"( ]Jon[\") ]"
julia> match(regex_name," Jon ")
RegexMatch(" Jon ")
julia> match(regex_name,"[Jon]") === nothing
true
```

## [Byte Array Literals](@id man-byte-array-literals)

Another useful non-standard string literal is the byte-array string literal: `b"..."`. This
Expand Down
16 changes: 8 additions & 8 deletions stdlib/LibGit2/test/libgit2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function challenge_prompt(cmd::Cmd, challenges; timeout::Integer=60, debug::Bool
"Process output found:\n\"\"\"\n$str\n\"\"\""
end
out = IOBuffer()
with_fake_pty() do slave, master
p = run(detach(cmd), slave, slave, slave, wait=false)
with_fake_pty() do pty_slave, pty_master
p = run(detach(cmd), pty_slave, pty_slave, pty_slave, wait=false)

# Kill the process if it takes too long. Typically occurs when process is waiting
# for input.
Expand All @@ -75,21 +75,21 @@ function challenge_prompt(cmd::Cmd, challenges; timeout::Integer=60, debug::Bool
process_running(p) && kill(p, Base.SIGKILL)
end

close(master)
close(pty_master)
end

for (challenge, response) in challenges
write(out, readuntil(master, challenge, keep=true))
if !isopen(master)
write(out, readuntil(pty_master, challenge, keep=true))
if !isopen(pty_master)
error("Could not locate challenge: \"$challenge\". ",
format_output(out))
end
write(master, response)
write(pty_master, response)
end

# Capture output from process until `master` is closed
while !eof(master)
write(out, readavailable(master))
while !eof(pty_master)
write(out, readavailable(pty_master))
end

status = fetch(timer)
Expand Down
12 changes: 6 additions & 6 deletions stdlib/REPL/test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -729,22 +729,22 @@ ccall(:jl_exit_on_sigint, Cvoid, (Cint,), 1)
let exename = Base.julia_cmd()
# Test REPL in dumb mode
if !Sys.iswindows()
with_fake_pty() do slave, master
with_fake_pty() do pty_slave, pty_master
nENV = copy(ENV)
nENV["TERM"] = "dumb"
p = run(setenv(`$exename --startup-file=no -q`,nENV),slave,slave,slave,wait=false)
output = readuntil(master,"julia> ",keep=true)
p = run(setenv(`$exename --startup-file=no -q`,nENV),pty_slave,pty_slave,pty_slave,wait=false)
output = readuntil(pty_master,"julia> ",keep=true)
if ccall(:jl_running_on_valgrind,Cint,()) == 0
# If --trace-children=yes is passed to valgrind, we will get a
# valgrind banner here, not just the prompt.
@test output == "julia> "
end
write(master,"1\nexit()\n")
write(pty_master,"1\nexit()\n")

wait(p)
output = readuntil(master,' ',keep=true)
output = readuntil(pty_master,' ',keep=true)
@test output == "1\r\nexit()\r\n1\r\n\r\njulia> "
@test bytesavailable(master) == 0
@test bytesavailable(pty_master) == 0
end
end

Expand Down

0 comments on commit e43667e

Please sign in to comment.