Skip to content

Commit

Permalink
Merge pull request #1986 from JuliaLang/fe/backports-release-1.5
Browse files Browse the repository at this point in the history
[WIP] Backports for 1.5.2
  • Loading branch information
KristofferC authored Sep 15, 2020
2 parents aaf4e6e + e836dd0 commit 1542f28
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterLaTeX = "cd674d7a-5f81-5cf3-af33-235ef1834b99"

[compat]
Documenter = "~0.24"
Documenter = "~0.25"
21 changes: 11 additions & 10 deletions docs/generate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ function generate(io, command)
cmd_nospace = replace(command, " " => "-")
println(io, """
```@raw html
<section class="docstring">
<div class="docstring-header">
<a class="docstring-binding" id="repl-$(cmd_nospace)" href="#repl-$(cmd_nospace)">
<code>$(command)</code>
</a>
<span class="docstring-category">REPL command</span>
.
</div>
<article class="docstring">
<header>
<a class="docstring-binding" id="repl-$(cmd_nospace)" href="#repl-$(cmd_nospace)">
<code>$(command)</code>
</a>
<span class="docstring-category">REPL command</span>
</header>
<section>
```
```@eval
using Pkg
Dict(Pkg.REPLMode.canonical_names())["$(command)"].help
```
```@raw html
</section>
</section>
</article>
```
""")
end
Expand Down
10 changes: 1 addition & 9 deletions docs/src/assets/custom.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
.admonition.compat > .admonition-title {
background-color: hsla(90, 60%, 50%, 1);
}

.admonition.compat {
background-color: hsla(90, 70%, 90%, 1);
}

nav.toc .logo {
#documenter .docs-sidebar .docs-logo > img {
max-height: 12em;
}
5 changes: 2 additions & 3 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ function develop(ctx::Context, pkgs::Vector{PackageSpec}; shared::Bool=true,
pkgerror("name, UUID, URL, or filesystem path specification required when calling `develop`")
end
if pkg.repo.rev !== nothing
pkgerror("git revision specification invalid when calling `develop`:",
" `$(pkg.repo.rev)` specified for package $(err_rep(pkg))")
pkgerror("rev argument not supported by `develop`; consider using `add` instead")
end
if pkg.version != VersionSpec()
pkgerror("version specification invalid when calling `develop`:",
Expand Down Expand Up @@ -833,7 +832,7 @@ function instantiate(ctx::Context; manifest::Union{Bool, Nothing}=nothing,
# First try without updating the registry
Operations.check_registered(ctx, pkgs)
catch e
if !(e isa PkgError) || update_registries == false
if !(e isa PkgError) || update_registry == false
rethrow(e)
end
Types.update_registries(ctx)
Expand Down
2 changes: 1 addition & 1 deletion src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ function download_artifact(
# `create_artifact()` wrapper does, so we use that here.
calc_hash = try
create_artifact() do dir
download_verify_unpack(tarball_url, tarball_hash, dir, ignore_existence=true, verbose=verbose)
download_verify_unpack(tarball_url, tarball_hash, dir, ignore_existence=true, verbose=verbose, quiet_download=quiet_download)
end
catch e
if isa(e, InterruptException)
Expand Down
12 changes: 8 additions & 4 deletions src/BinaryPlatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ struct MacOS <: Platform
libc::Union{Nothing,Symbol}=nothing,
call_abi::Union{Nothing,Symbol}=nothing,
compiler_abi::CompilerABI=CompilerABI())
if arch !== :x86_64
if arch !== :x86_64 && arch !== :aarch64
throw(ArgumentError("Unsupported architecture '$arch' for macOS"))
end
if libc !== nothing
Expand Down Expand Up @@ -404,7 +404,7 @@ function platform_key_abi(machine::AbstractString)
arch_mapping = Dict(
:x86_64 => "(x86_|amd)64",
:i686 => "i\\d86",
:aarch64 => "aarch64",
:aarch64 => "(aarch|arm)64",
:armv7l => "arm(v7l)?", # if we just see `arm-linux-gnueabihf`, we assume it's `armv7l`
:armv6l => "armv6l",
:powerpc64le => "p(ower)?pc64le",
Expand Down Expand Up @@ -458,6 +458,7 @@ function platform_key_abi(machine::AbstractString)
))

m = match(triplet_regex, machine)
msg = ""
if m !== nothing
# Helper function to find the single named field within the giant regex
# that is not `nothing` for each mapping we give it.
Expand Down Expand Up @@ -502,11 +503,14 @@ function platform_key_abi(machine::AbstractString)
cxxstring_abi=cxxstring_abi
)
return T(arch, libc=libc, call_abi=call_abi, compiler_abi=compiler_abi)
catch
catch err
if isa(err, ArgumentError)
msg = " ($(err.msg))"
end
end
end

@warn("Platform `$(machine)` is not an officially supported platform")
@warn("Platform `$(machine)` is not an officially supported platform$msg")
return UnknownPlatform()
end

Expand Down
2 changes: 1 addition & 1 deletion src/REPLMode/argument_parsers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PackageToken = Union{PackageIdentifier, VersionRange, Rev, Subdir}

# Match a git repository URL. This includes uses of `@` and `:` but
# requires that it has `.git` at the end.
let url = raw"((git|ssh|http(s)?)|(git@[\w\-\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git)(/)?",
let url = raw"((git|ssh|http(s)?)|(git@[\w\-\.]+))(:(//)?)([\w\.@\:/\-~]+)(\.git$)(/)?",

# Match a `NAME=UUID` package specifier.
name_uuid = raw"[^@\#\s:]+\s*=\s*[^@\#\s:]+",
Expand Down
2 changes: 1 addition & 1 deletion src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ function clone_default_registries(ctx::Context; only_if_empty = true)
end
end
filter!(reg -> !(reg.uuid in installed_registries), registries)
clone_or_cp_registries(registries)
clone_or_cp_registries(ctx, registries)
end
end

Expand Down
1 change: 1 addition & 0 deletions test/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const platform = platform_key_abi()
@test platform_key_abi("i686-unknown-freebsd11.1") == FreeBSD(:i686)
@test platform_key_abi("amd64-unknown-freebsd12.0") == FreeBSD(:x86_64)
@test platform_key_abi("i386-unknown-freebsd10.3") == FreeBSD(:i686)
@test platform_key_abi("arm64-apple-darwin20.0") == MacOS(:aarch64)

# Test inclusion of ABI stuff, both old-style and new-style
@test platform_key_abi("x86_64-linux-gnu-gcc7") == Linux(:x86_64, compiler_abi=CompilerABI(libgfortran_version=v"4"))
Expand Down
2 changes: 1 addition & 1 deletion test/new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ end
) Pkg.develop(Pkg.PackageSpec())
# git revisions imply that `develop` tracks a git repo.
@test_throws PkgError(
"git revision specification invalid when calling `develop`: `master` specified for package `Example`"
"rev argument not supported by `develop`; consider using `add` instead"
) Pkg.develop(name="Example", rev="master")
# Adding an unregistered package by name.
@test_throws PkgError Pkg.develop("ThisIsHopefullyRandom012856014925701382")
Expand Down
7 changes: 7 additions & 0 deletions test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,13 @@ end
add_or_develop=true)) == Pkg.Types.PackageSpec
end

@testset "parse git url (issue #1935) " begin
urls = ["https://github.com/abc/ABC.jl.git", "https://abc.github.io/ABC.jl"]
for url in urls
@test Pkg.REPLMode.package_lex([Pkg.REPLMode.QString((url), false)]) == [url]
end
end

@testset "unit test for REPLMode.promptf" begin
function set_name(projfile_path, newname)
sleep(1.1)
Expand Down

0 comments on commit 1542f28

Please sign in to comment.