Open Lunari8546 opened 3 years ago
This looks like #190 but that should be fixed with clear 0.9.0.
I'm getting the same error and think it's actually coming from this recent change to pg. In my local fork of clear, adding JSON::PullParser
to the Clear::SQL::Any
type (here) fixes the compiler errors, but I'm getting errors when running tests (which can very much be due to incorrect environment set up, I haven't dug very far yet). Posting this here in case I don't find time to finish digging into this and submitting a PR.
Ah, did find time tonight to track down the remaining issues. Created PR: https://github.com/anykeyh/clear/pull/220
same error: crystal 1.3.2
clear:
git: https://github.com/anykeyh/clear.git
version: 0.9+git.commit.480289555c833793fa6964398fefec6b7e25168d
require clear
Showing last frame. Use --error-trace for full trace.
In lib/clear/src/clear/sql/insert_query.cr:61:10
61 | h[col] = rs.read
^
Error: no overload matches 'Hash(String, Array(JSON::Any) | Array(PG::BoolArray) | Array(PG::CharArray) | Array(PG::Float32Array) | Array(PG::Float64Array) | Array(PG::Int16Array) | Array(PG::Int32Array) | Array(PG::Int64Array) | Array(PG::NumericArray) | Array(PG::StringArray) | Array(PG::TimeArray) | BigDecimal | Bool | Char | Clear::Expression::UnsafeSql | Float32 | Float64 | Hash(String, JSON::Any) | Int16 | Int32 | Int64 | Int8 | JSON::Any | JSON::PullParser | PG::Geo::Box | PG::Geo::Circle | PG::Geo::Line | PG::Geo::LineSegment | PG::Geo::Path | PG::Geo::Point | PG::Geo::Polygon | PG::Interval | PG::Numeric | Slice(UInt8) | String | Time | UInt16 | UInt32 | UInt64 | UInt8 | UUID | Nil)#[]=' with types String, (Array(PG::BoolArray) | Array(PG::CharArray) | Array(PG::Float32Array) | Array(PG::Float64Array) | Array(PG::Int16Array) | Array(PG::Int32Array) | Array(PG::Int64Array) | Array(PG::NumericArray) | Array(PG::StringArray) | Array(PG::TimeArray) | Array(PG::UUIDArray) | Bool | Char | Float32 | Float64 | Int16 | Int32 | Int64 | JSON::PullParser | PG::Geo::Box | PG::Geo::Circle | PG::Geo::Line | PG::Geo::LineSegment | PG::Geo::Path | PG::Geo::Point | PG::Geo::Polygon | PG::Interval | PG::Numeric | Slice(UInt8) | String | Time | UInt32 | UUID | Nil)
Overloads are:
- Hash(K, V)#[]=(key : K, value : V)
Couldn't find overloads for these types:
- Hash(String, Array(JSON::Any) | Array(PG::BoolArray) | Array(PG::CharArray) | Array(PG::Float32Array) | Array(PG::Float64Array) | Array(PG::Int16Array) | Array(PG::Int32Array) | Array(PG::Int64Array) | Array(PG::NumericArray) | Array(PG::StringArray) | Array(PG::TimeArray) | BigDecimal | Bool | Char | Clear::Expression::UnsafeSql | Float32 | Float64 | Hash(String, JSON::Any) | Int16 | Int32 | Int64 | Int8 | JSON::Any | JSON::PullParser | PG::Geo::Box | PG::Geo::Circle | PG::Geo::Line | PG::Geo::LineSegment | PG::Geo::Path | PG::Geo::Point | PG::Geo::Polygon | PG::Interval | PG::Numeric | Slice(UInt8) | String | Time | UInt16 | UInt32 | UInt64 | UInt8 | UUID | Nil)#[]=(key : String, value : Array(PG::UUIDArray))
Actually fixed if i freeze pg, with such yml it works.
clear:
github: anykeyh/clear
branch: master
pg:
github: will/crystal-pg
version: 0.24.0
I have a fix for this change in my own fork here: https://github.com/Vici37/clear
You can temporarily use it instead of freezing pg
in your shards.yml via:
clear:
github: Vici37/clear
branch: master
Once ~#220~ #225 gets merged into this repo, it's safe to swap this back (I try to keep my own fork's master branch up to date as well, though).
any update on this issue?
I'm using Crystal 1.1.1 and when I require "clear" I got this error.
Here's my shard.lock :