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

Add opting out of rules #398

Merged
merged 6 commits into from
Jul 20, 2021
Merged

Add opting out of rules #398

merged 6 commits into from
Jul 20, 2021

Conversation

oxinabox
Copy link
Member

@oxinabox oxinabox commented Jul 19, 2021

closes #377
This is actually very breaking so can't be merged til after we tag 1.0-DEV.
It will not break anything in practice til something uses it though.
and it won't break Diffactor.
It will break Zygote and Nabla.

Before mergjng this I want to make the corresponding changes to ChainRulesOverload generation,
and Zygote.

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #398 (db35df7) into master (460a559) will decrease coverage by 0.19%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
- Coverage   92.32%   92.12%   -0.20%     
==========================================
  Files          14       14              
  Lines         756      775      +19     
==========================================
+ Hits          698      714      +16     
- Misses         58       61       +3     
Impacted Files Coverage Δ
src/ChainRulesCore.jl 100.00% <ø> (ø)
src/rules.jl 90.90% <0.00%> (-9.10%) ⬇️
src/rule_definition_tools.jl 95.97% <88.88%> (-0.98%) ⬇️

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 460a559...db35df7. Read the comment docs.

Comment on lines +434 to +437
$(esc(no_rule_target)) = nothing
$(esc(expr)) = nothing
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this escaping will mean this doesn't work in anything that doesn't have ChainRulesCore imported.
It needs a test in the isolated scope testset.
But I am ok leaving that for a follow up PR.

Copy link
Member

@mzgubic mzgubic left a comment

Choose a reason for hiding this comment

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

Sorry, took me a while. Looks good overall, just a few clarifying questions and typos

docs/src/opting_out_of_rules.md Outdated Show resolved Hide resolved
docs/src/opting_out_of_rules.md Outdated Show resolved Hide resolved
docs/src/opting_out_of_rules.md Outdated Show resolved Hide resolved
docs/src/opting_out_of_rules.md Outdated Show resolved Hide resolved
docs/src/opting_out_of_rules.md Outdated Show resolved Hide resolved
src/rule_definition_tools.jl Outdated Show resolved Hide resolved
src/rule_definition_tools.jl Outdated Show resolved Hide resolved
src/rule_definition_tools.jl Outdated Show resolved Hide resolved
src/rule_definition_tools.jl Outdated Show resolved Hide resolved
src/rule_definition_tools.jl Show resolved Hide resolved
@oxinabox oxinabox merged commit 6efb2d2 into master Jul 20, 2021
@oxinabox oxinabox deleted the ox/optout branch July 20, 2021 19:12
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.

Opting out of rules
3 participants