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

Restrict patch to NamedTuple #10

Merged
merged 1 commit into from
Oct 1, 2019
Merged

Conversation

tkf
Copy link
Member

@tkf tkf commented Oct 1, 2019

Current setproperties spec indicates that users need to support arbitrary patch object. Doing this in general requires unnecessary reflection-based code (e.g., you don't need to use fieldnames for NamedTuples as you can just dispatch on ::NamedTuple{names}). Instead, why not specify that it is only required to overload setproperties(::MyType, ::NamedTuple)? We may also need to support other patch types in the future (e.g., Dict). Restricting the patch type would help it.

@codecov-io
Copy link

codecov-io commented Oct 1, 2019

Codecov Report

Merging #10 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   92.85%   92.85%           
=======================================
  Files           1        1           
  Lines          14       14           
=======================================
  Hits           13       13           
  Misses          1        1
Impacted Files Coverage Δ
src/ConstructionBase.jl 92.85% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3cf74a...015d28c. Read the comment docs.

@tkf tkf force-pushed the setproperties-spec branch from ca20b8a to 36a013d Compare October 1, 2019 02:29
@tkf tkf force-pushed the setproperties-spec branch from 36a013d to 015d28c Compare October 1, 2019 03:32
@jw3126
Copy link
Member

jw3126 commented Oct 1, 2019

LGTM

@tkf tkf merged commit d186a75 into JuliaObjects:master Oct 1, 2019
@tkf tkf deleted the setproperties-spec branch October 1, 2019 05:19
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.85%. Comparing base (f3cf74a) to head (015d28c).
Report is 182 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   92.85%   92.85%           
=======================================
  Files           1        1           
  Lines          14       14           
=======================================
  Hits           13       13           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

4 participants