-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Revert "Base.get_extension made public" #59593
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
Conversation
This reverts commit 963eaa7.
Why is that? (Asking since I do it: https://github.com/JuliaTesting/ExplicitImports.jl/blob/dbed49f1bbe824d536b4b121580441437a1de11c/src/ExplicitImports.jl#L362) |
Can we also add a note in the manual that these functions are not public? |
|
Regarding |
|
Interactive work is explicitly exempted from the public/private notions, since it is all about poking at implementation details |
What, no? You can have scripts that are "interactive" as well. Or packages that call this during runtime to provide debugging features (one such example has already been given) etc etc. But it is a good idea to add the bad behavior that you are referring to to the docstring. |
|
That is fine, but you shouldn't block reverting on feature or doc requests |
|
The additional reason this is not public is that none of the related code is public either ( |
You shouldn't merge things like this without proper consensus. |
This reverts commit b18ca0f.
Reverts #58108. It is not allowed for packages to call `Base.get_extension`, so it should never have been made public. Something simply being documented in the manual is never any allowable argument for making something public. The correct way to use this functionality is with dispatch. Loosely: ```julia module Main function get_extension end end module MainPkgExt # extension module in Main using Other Main.get_extension(args...) = Other.call(args...) end ``` (cherry picked from commit b18ca0f)
Reverts JuliaLang#58108. It is not allowed for packages to call `Base.get_extension`, so it should never have been made public. Something simply being documented in the manual is never any allowable argument for making something public. The correct way to use this functionality is with dispatch. Loosely: ```julia module Main function get_extension end end module MainPkgExt # extension module in Main using Other Main.get_extension(args...) = Other.call(args...) end ```
Apparently using `Base.get_extension()` is a bad thing (JuliaLang/julia#59593), so avoid it, by defining a couple of extra functions to be overloaded by the extensions.
Apparently using `Base.get_extension()` is a bad thing (JuliaLang/julia#59593), so avoid it, by defining a couple of extra functions to be overloaded by the extensions.
Apparently using `Base.get_extension()` is a bad thing (JuliaLang/julia#59593), so avoid it, by defining a couple of extra functions to be overloaded by the extensions.
This follows guidance at JuliaLang/julia#59593. Interactive work is "explicitly exempted", so the access pattern can still be documented for users.
Reverts #58108. It is not allowed for packages to call
Base.get_extension, so it should never have been made public. Something simply being documented in the manual is never any allowable argument for making something public.The correct way to use this functionality is with dispatch. Loosely: