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

Deprecate extern #365

Merged
merged 5 commits into from
Jun 7, 2021
Merged

Deprecate extern #365

merged 5 commits into from
Jun 7, 2021

Conversation

mzgubic
Copy link
Member

@mzgubic mzgubic commented Jun 4, 2021

Towards #56

@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2021

Codecov Report

Merging #365 (2d6ea27) into master (22c7bc3) will decrease coverage by 2.10%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #365      +/-   ##
==========================================
- Coverage   89.26%   87.15%   -2.11%     
==========================================
  Files          12       12              
  Lines         475      475              
==========================================
- Hits          424      414      -10     
- Misses         51       61      +10     
Impacted Files Coverage Δ
src/deprecated.jl 0.00% <0.00%> (ø)
src/differentials/abstract_differential.jl 50.00% <ø> (-16.67%) ⬇️
src/differentials/abstract_zero.jl 92.85% <ø> (-1.27%) ⬇️
src/differentials/composite.jl 82.90% <ø> (-0.15%) ⬇️
src/differentials/notimplemented.jl 70.83% <ø> (-1.17%) ⬇️
src/differentials/thunks.jl 62.50% <ø> (-1.50%) ⬇️
src/rule_definition_tools.jl 96.85% <0.00%> (-0.05%) ⬇️
src/ChainRulesCore.jl

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 22c7bc3...2d6ea27. Read the comment docs.

wrapped by `x`, such that mutating `extern(x)` might mutate `x` itself.
"""
@inline function extern(x)
Base.depwarn(EXTERN_DEPRECATION, :extern)
Copy link
Member

Choose a reason for hiding this comment

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

I thought I asked this before, but if so github has eaten the reply.
(Probably i forget to ask)

Why are we using Base.depwarn rather than @deprecate?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I think it's because we are not providing a definite alternative. I.e. it isn't always just extern -> unthunk, it could be using backing as well

Copy link
Member

Choose a reason for hiding this comment

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

In general we are not.
But for any specific case they can make the change to put the RHS of the deprecation in the place of the extern.
which they might have to do recursively til it stops but still.
Though perhaps that is worse.

@oxinabox oxinabox linked an issue Jun 7, 2021 that may be closed by this pull request
@mzgubic mzgubic merged commit 26b7e4a into master Jun 7, 2021
@mzgubic mzgubic deleted the mz/extern branch June 7, 2021 11:18
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.

Get rid of extern? / Add unthunk, use extern only for testing?
3 participants