Describe the bug
When a module contains -moduledoc(false). then a documentation chunk is included in the resulting beam file.
To Reproduce
Compile this:
-module(a).
-moduledoc(false).
-export([b/0]).
b() -> c.
And use beam_lib:chunks("a.beam", [documentation]). to see the problem.
Expected behavior
No documentation for the entire module.
The docs for -moduledoc refer to -doc which says:
- false - Set the current entity as hidden, that is, it should not be listed as an available function and has no documentation.
The logical reading of this for moduledoc is no documentation for the module.
Affected versions
OTP 29.0
Why this matters
BEAM with no abstract code but documentation causes xref to barf in xref_base:abst(File, Builtins, _Mode = functions) since there is no case clause
Since diameterc produces code with -moduledoc(false). it's twice as annoying.
Describe the bug
When a module contains
-moduledoc(false).then a documentation chunk is included in the resulting beam file.To Reproduce
Compile this:
And use
beam_lib:chunks("a.beam", [documentation]).to see the problem.Expected behavior
No documentation for the entire module.
The docs for
-moduledocrefer to-docwhich says:The logical reading of this for
moduledocis no documentation for the module.Affected versions
OTP 29.0
Why this matters
BEAM with no abstract code but documentation causes
xrefto barf inxref_base:abst(File, Builtins, _Mode = functions)since there is no case clauseSince
diametercproduces code with-moduledoc(false).it's twice as annoying.