-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Incompatibility between @doc and import #3272
Comments
This is one tricky case :). In Elixir it looks like @hidden
def my_fun do
# ...
end The
|
@whatyouhide It seems like |
@tony612 with the major difference that you can actually call that function from outside the module (provided you know the name and arity of the function). |
"The @hidden (or whatever name) attribute would" It make sense, only if there will exists contrapart something like import_all, that really import all 'def'-defined functions, without exceptions. |
@liveforeverx instead of introducing defmodule MyMod do
@hidden true
def my_fun() do
# ...
end
end import MyMod, hidden: true |
This discussion pointed out that the current approach is fine. There are multiple ways of avoiding this (moving to another module, using underscore, etc). It seems better than somehow coupling to unrelated things. Thanks everyone! |
Today, even if we
@doc false
some function, it will still be imported if someone imports the module. I am listing this as a potential bug, although I am not sure if it qualifies as one or if there are any solutions.The text was updated successfully, but these errors were encountered: