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

Introduce a beta AbstractConf type to allow custom types to avoid ove… #175

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Jun 9, 2023

…r-specializing

I tried to implement the minimum possible here so we can let custom types start experimenting with this until we settle on the full API.

…r-specializing

I tried to implement the minimum possible here so we can let custom types
start experimenting with this until we settle on the full API.
@quinnj quinnj requested a review from Drvi June 9, 2023 05:07
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 88.88% and project coverage change: -0.16 ⚠️

Comparison is base (0c7822a) 88.41% compared to head (46642ec) 88.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
- Coverage   88.41%   88.26%   -0.16%     
==========================================
  Files          10       10              
  Lines        1865     1875      +10     
==========================================
+ Hits         1649     1655       +6     
- Misses        216      220       +4     
Impacted Files Coverage Δ
src/components.jl 97.14% <70.00%> (-1.62%) ⬇️
src/floats.jl 89.13% <92.59%> (+0.02%) ⬆️
src/Parsers.jl 87.63% <100.00%> (+0.34%) ⬆️
src/bools.jl 97.50% <100.00%> (ø)
src/dates.jl 76.38% <100.00%> (ø)
src/hexadecimal.jl 98.59% <100.00%> (ø)
src/ints.jl 91.39% <100.00%> (ø)
src/strings.jl 94.11% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@Drvi Drvi left a comment

Choose a reason for hiding this comment

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

Thanks Jacob, this looks great. Eventually, it would be great to unify the new result with returntype as they feel very tightly connected.

Comment on lines -353 to +363
@inline _xparse(::Type{T}, source::Union{AbstractVector{UInt8}, IO}, pos, len, options::Options=XOPTIONS, ::Type{S}=returntype(T)) where {T, S} =
_xparse(conf::AbstractConf{T}, source::Union{AbstractVector{UInt8}, IO}, pos, len, options::Options=XOPTIONS, ::Type{S}=returntype(T)) where {T, S} =
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was helpful for the FixedDecimal support, thanks! I wonder if we want to mark this as @noinline explicitly? I'm not sure what the rules for inlining are and if this changes back for whatever reason, compile times and binary size will probably be too much for FixedPointDecimals.

@quinnj quinnj merged commit fe44d34 into main Jun 13, 2023
@quinnj quinnj deleted the jq-conf branch June 13, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants