Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix compat bug #3

Merged
merged 4 commits into from
Sep 8, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.302
dotnet-version: 6.0.400
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@4.6.4
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.10
with:
reports: 'docs/coverage/lcov.info' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'docs/coverage' # REQUIRED # The directory where the generated report should be saved.
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["김용희 <yongheekim@devsisters.com>"]
version = "0.4.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"

[compat]
Expand Down
1 change: 1 addition & 0 deletions src/JSONPointer.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module JSONPointer

using Compat
using OrderedCollections

include("pointer.jl")
Expand Down
20 changes: 11 additions & 9 deletions src/pointerdict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,18 @@ function Base.merge(pd::PointerDict, pds::PointerDict...)
merge!(out, pds...)
end

Base.mergewith(combine, pd::PointerDict) = copy(pd)
function Base.mergewith(combine, pd::PointerDict, pds::PointerDict...)
K = _promote_keytypes((pd, pds...))
V0 = _promote_valtypes(valtype(pd), pds...)
V = promote_type(Core.Compiler.return_type(combine, Tuple{V0,V0}), V0)
out = PointerDict(Dict{K,V}())
for (k,v) in pd
out[k] = v
@static if VERSION >= v"1.5"
Base.mergewith(combine, pd::PointerDict) = copy(pd)
function Base.mergewith(combine, pd::PointerDict, pds::PointerDict...)
K = _promote_keytypes((pd, pds...))
V0 = _promote_valtypes(valtype(pd), pds...)
V = promote_type(Core.Compiler.return_type(combine, Tuple{V0,V0}), V0)
out = PointerDict(Dict{K,V}())
for (k,v) in pd
out[k] = v
end
mergewith!(combine, out, pds...)
end
mergewith!(combine, out, pds...)
end

# fall back to String if we don't clearly have Symbol
Expand Down