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 convert([v], v) dispatch for Julia 1.10 #231

Merged
merged 4 commits into from
Dec 28, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/jl_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jl_version: ["1.6", "1.8", "1.9"]
jl_version: ["1.6", "1.8", "1.9", "1.10"]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down
8 changes: 6 additions & 2 deletions src/app/supporttypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ struct TraitInput end
struct TraitOutput end
struct TraitState end

struct Dependency{Trait, IdT <: Union{String, NamedTuple}}
const IdTypes = Union{String,NamedTuple}

struct Dependency{Trait, IdT<:IdTypes}
id ::IdT
property ::String
Dependency{Trait}(id::T, property::String) where {Trait, T} = new{Trait, T}(id, property)
Expand Down Expand Up @@ -95,7 +97,9 @@ struct CallbackDeps
CallbackDeps(output::Vector{<:Output}, input, state = State[]) = new(output, input, state, true)
end

Base.convert(::Type{Vector{<:T}}, v::T) where {T<:Dependency} = [v]
Base.convert(::Type{Vector{<:Output}}, v::Output{<:IdTypes}) = [v]
Base.convert(::Type{Vector{<:Input}}, v::Input{<:IdTypes}) = [v]
Base.convert(::Type{Vector{<:State}}, v::State{<:IdTypes}) = [v]

struct ClientsideFunction
namespace ::String
Expand Down
Loading