Skip to content

Commit

Permalink
Fix 0.7 deprecations
Browse files Browse the repository at this point in the history
Closes #751.
  • Loading branch information
mortenpi committed Aug 7, 2018
1 parent 1c3383f commit d4d63e0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
julia 0.6
Compat 0.62.0
Compat 0.70.0 # reduce(; init=...) / Compat#590
DocStringExtensions 0.2
2 changes: 1 addition & 1 deletion src/DocChecks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function missingdocs(doc::Documents.Document)
end
end
end
n = reduce(+, 0, map(length, values(bindings)))
n = Compat.reduce(+, map(length, values(bindings)), init=0)
if n > 0
b = IOBuffer()
println(b, "$n docstring$(n 1 ? "" : "s") potentially missing:\n")
Expand Down
4 changes: 2 additions & 2 deletions src/Documenter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $(EXPORTS)
module Documenter

using Compat, DocStringExtensions
import Compat.Base64: base64decode, base64encode
import Compat.Base64: base64decode
import Compat: @info
import Compat.Pkg

Expand Down Expand Up @@ -530,7 +530,7 @@ function git_push(
version = VersionNumber(tag)
# only push to stable if this is the latest stable release
versions = filter!(x -> occursin(Base.VERSION_REGEX, x), readdir(dirname))
maxver = mapreduce(x -> VersionNumber(x), max, v"0.0.0", versions)
maxver = Compat.mapreduce(x -> VersionNumber(x), max, versions; init=v"0.0.0")
if version >= maxver && version.prerelease == () # don't deploy to stable for prereleases
gitrm_copy(target_dir, stable_dir)
Writers.HTMLWriter.generate_siteinfo_file(stable_dir, "stable")
Expand Down
1 change: 1 addition & 0 deletions src/Travis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Travis

using Compat, DocStringExtensions
import Compat.Pkg
import Compat.Base64: base64encode

export genkeys

Expand Down
1 change: 1 addition & 0 deletions test/generate.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module GenerateTests

using Compat.Test
import Compat.Random: randstring
using Documenter

@testset "Generate" begin
Expand Down
2 changes: 1 addition & 1 deletion test/nongit/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ mktempdir() do tmpdir
cp(joinpath(@__DIR__, "docs"), joinpath(tmpdir, "docs"))
include(joinpath(tmpdir, "docs/make.jl"))
# Copy the build/ directory back so that it would be possible to inspect the output.
cp(joinpath(tmpdir, "docs/build"), joinpath(@__DIR__, "build"); remove_destination=true)
Compat.cp(joinpath(tmpdir, "docs/build"), joinpath(@__DIR__, "build"); force=true)
end

0 comments on commit d4d63e0

Please sign in to comment.