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

Cannot add documentation to each field of a type using @aml #162

Open
singularitti opened this issue Apr 23, 2021 · 4 comments
Open

Cannot add documentation to each field of a type using @aml #162

singularitti opened this issue Apr 23, 2021 · 4 comments
Labels
help wanted Extra attention is needed wontfix This will not be worked on

Comments

@singularitti
Copy link

The suggested way of adding documentation to each field of a type introduced in Julia's official documentation is no longer workable in @aml:

julia> @aml mutable struct Body "body"
           "field h1"
           h1, "~"
           "field p"
           p::Vector{String}, "~"
       end
ERROR: LoadError: UndefRefError: access to undefined reference
Stacktrace:
 [1] getindex
   @ ./array.jl:801 [inlined]
 [2] iterate (repeats 2 times)
   @ ./array.jl:777 [inlined]
 [3] var"@aml"(__source__::LineNumberNode, __module__::Module, expr::Any)
   @ AcuteML ~/.julia/packages/AcuteML/pT7qV/src/AcuteML.jl:428
in expression starting at REPL[8]:4
julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
@aminya
Copy link
Owner

aminya commented Apr 25, 2021

Is this a new documentation feature?

@singularitti
Copy link
Author

Is this a new documentation feature?

It's been introduced since Julia 1.0.

@aminya
Copy link
Owner

aminya commented Apr 25, 2021

I don't think I will add support for this. It is quite hard to parse it, and also it would be breaking since we are already using the docstring of the first field as the XML name of the struct.

@aminya aminya added help wanted Extra attention is needed wontfix This will not be worked on labels Apr 25, 2021
@singularitti
Copy link
Author

Can this problem be solved if we move the XML tag before the struct's name, as I mentioned in #161 (comment)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants