Skip to content

Commit

Permalink
Merge pull request #65 from rofinn/rf/extensions
Browse files Browse the repository at this point in the history
Requires.jl -> pkg extensions, dropping pre-1.9 Julia versions
  • Loading branch information
rofinn authored Mar 7, 2025
2 parents 648fe7f + 79d6ef7 commit 6723adf
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 31 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
# Run on master, tags, or any pull request
on:
schedule:
- cron: '0 1 * * *' # Daily at 1 AM UTC (7 PM CST)
- cron: "0 1 * * *" # Daily at 1 AM UTC (7 PM CST)
push:
branches: [master]
tags: ["*"]
Expand All @@ -24,30 +24,21 @@ jobs:
arch:
- x64
include:
# Add a 1.0 job just to make sure we still support it
# Add a 1.9 job just to make sure we still support it
- os: ubuntu-latest
version: 1.0.5
version: 1.9
arch: x64
# Add a 32-bit job to ensure we don't have any 64-bit specific logic
- os: ubuntu-latest
version: 1
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@latest
- run: |
git config --global user.name Tester
Expand Down
16 changes: 12 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
name = "FilePaths"
uuid = "8fc22ac5-c921-52a6-82fd-178b2807b824"
authors = ["Rory Finnegan"]
version = "0.8.3"
version = "0.9.0"

[deps]
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[weakdeps]
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"

[extensions]
FilePathsGlobExt = "Glob"
FilePathsURIParserExt = "URIParser"
FilePathsURIsExt = "URIs"

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

[extras]
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
Expand Down
9 changes: 7 additions & 2 deletions src/glob.jl → ext/FilePathsGlobExt.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using .Glob
using .Glob: GlobMatch
module FilePathsGlobExt

using Glob
using Glob: GlobMatch
using FilePaths

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

function Glob.glob(pattern, prefix::T) where T<:AbstractPath
return [parse(T, m) for m in glob(pattern, string(prefix))]
end

end
8 changes: 6 additions & 2 deletions src/uriparser.jl → ext/FilePathsURIParserExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using .URIParser
module FilePathsURIParserExt

using URIParser
using FilePaths

function URIParser.URI(p::AbstractPath; query="", fragment="")
Base.depwarn("`URIParser` is deprecated, use `URIs` instead.", :URIParser)
if isempty(p.root)
throw(ArgumentError("$p is not an absolute path"))
end
Expand All @@ -21,3 +23,5 @@ function URIParser.URI(p::AbstractPath; query="", fragment="")

return URIParser.URI(URIParser.URI(String(take!(b))); query=query, fragment=fragment)
end

end
7 changes: 6 additions & 1 deletion src/uris.jl → ext/FilePathsURIsExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using .URIs
module FilePathsURIsExt

using URIs
using FilePaths

const absent = SubString("absent", 1, 0)

Expand All @@ -22,3 +25,5 @@ function URIs.URI(p::AbstractPath; query=absent, fragment=absent)

return URIs.URI(URIs.URI(String(take!(b))); query=query, fragment=fragment)
end

end
7 changes: 0 additions & 7 deletions src/FilePaths.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@ module FilePaths

using MacroTools
using Reexport
using Requires

@reexport using FilePathsBase

include("compat.jl")

function __init__()
@require Glob="c27321d9-0574-5035-807b-f59d2c89b15c" include("glob.jl")
@require URIParser="30578b45-9adc-5946-b283-645ec420af67" include("uriparser.jl")
@require URIs="5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" include("uris.jl")
end

end # end of module

4 comments on commit 6723adf

@rofinn
Copy link
Owner Author

@rofinn rofinn commented on 6723adf Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/126486

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" 6723adfbdaa33afb2876429d1f67b649070cc8d5
git push origin v0.9.0

@rofinn
Copy link
Owner Author

@rofinn rofinn commented on 6723adf Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

Breaking changes

  • Dropping Julia version pre-1.9
  • Migrating from Requires.jl to package extensions
  • Removed URIParser deprecation

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/126486

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" 6723adfbdaa33afb2876429d1f67b649070cc8d5
git push origin v0.9.0

Please sign in to comment.