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

codegen conditional on hasmethod #18

Merged
merged 6 commits into from
May 24, 2021
Merged

codegen conditional on hasmethod #18

merged 6 commits into from
May 24, 2021

Conversation

cscherrer
Copy link
Owner

No description provided.

@cscherrer cscherrer linked an issue May 24, 2021 that may be closed by this pull request
@cscherrer
Copy link
Owner Author

Currently passing everything except precompilation. Here's the error:

caching with precompilation: Test Failed at /home/chad/git/KeywordCalls/test/runtests.jl:86
  Expression: Precompile2.test() == (a = 2, b = 1)
   Evaluated: (b = 1, a = 2) == (a = 2, b = 1)
Stacktrace:
 [1] macro expansion
   @ ~/git/KeywordCalls/test/runtests.jl:86 [inlined]
 [2] macro expansion
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
 [3] top-level scope
   @ ~/git/KeywordCalls/test/runtests.jl:86
Test Summary:               | Fail  Total
caching with precompilation |    1      1
ERROR: LoadError: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /home/chad/git/KeywordCalls/test/runtests.jl:85
ERROR: Package KeywordCalls errored during testing

@cscherrer cscherrer marked this pull request as ready for review May 24, 2021 03:08
@cscherrer cscherrer requested a review from mileslucas May 24, 2021 03:09
@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #18 (3641aed) into master (96b14dc) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 3641aed differs from pull request most recent head df043d5. Consider uploading reports for the commit df043d5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           42        61   +19     
=========================================
+ Hits            42        61   +19     
Impacted Files Coverage Δ
src/KeywordCalls.jl 100.00% <100.00%> (ø)

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 96b14dc...df043d5. Read the comment docs.

@cscherrer
Copy link
Owner Author

Think it's working, what do you think @mileslucas ?

@cscherrer
Copy link
Owner Author

Just to be clear, this doesn't yet address #17 , but only #16

Copy link
Collaborator

@mileslucas mileslucas left a comment

Choose a reason for hiding this comment

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

Looks good to me. The only catch I can think of is the case where someone has defined e.g., foo(::NamedTuple) outside of the @kwcall macro. Basically hasmethod has no way to know who wrote the preceding method. I think that's fair, especially if its pointed out somewhere in the docs.

@cscherrer
Copy link
Owner Author

Great point, I've updated the docstrings

@cscherrer cscherrer merged commit c623693 into master May 24, 2021
@cscherrer cscherrer deleted the cs-#16 branch May 24, 2021 13:59
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.

Multiple @kwcalls redefines methods causing warnings
2 participants