Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reintroduce Requires.jl since it seems to be faster now #52

Merged
merged 1 commit into from
Mar 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ version = "0.8.2"

[deps]
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[compat]
FilePathsBase = "0.9"
Glob = "1"
MacroTools = "0.5"
Reexport = "0.2, 1.0"
Requires = "1"
URIParser = "0.4"
julia = "1"

[extras]
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"

[targets]
test = ["Test"]
test = ["Glob", "Test", "URIParser"]
15 changes: 9 additions & 6 deletions src/FilePaths.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
__precompile__()

module FilePaths

using Glob, MacroTools, Reexport, URIParser
using Glob: GlobMatch
using MacroTools
using Reexport
using Requires

@reexport using FilePathsBase

include("compat.jl")
include("glob.jl")
include("uri.jl")

function __init__()
@require Glob="c27321d9-0574-5035-807b-f59d2c89b15c" include("glob.jl")
@require URIParser="30578b45-9adc-5946-b283-645ec420af67" include("uri.jl")
end

end # end of module
3 changes: 3 additions & 0 deletions src/glob.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using .Glob
using .Glob: GlobMatch

Base.readdir(pattern::GlobMatch, prefix::AbstractPath) = glob(pattern, prefix)

function Glob.glob(pattern, prefix::T) where T<:AbstractPath
Expand Down
2 changes: 2 additions & 0 deletions src/uri.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using .URIParser

function URIParser.URI(p::AbstractPath; query="", fragment="")
if isempty(p.root)
throw(ArgumentError("$p is not an absolute path"))
Expand Down