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

MS-267 Documentation for NIFs #100

Merged
merged 19 commits into from
Nov 8, 2022
Merged

MS-267 Documentation for NIFs #100

merged 19 commits into from
Nov 8, 2022

Conversation

Janix4000
Copy link
Contributor

Final Elixir functions, created by Unifex, can now be documented using the @doc decorator in the spec file.

In spec file `spec`ed functions can be decorated with `@doc`
and its documentation will be inherited by the end-user Elixir
functions.
Create new test_project with documented spec functions
@Janix4000 Janix4000 self-assigned this Oct 26, 2022
\"\"\"
spec function_name...
"""
defmacro @{:doc, [line: _line], [documentation]} do
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
defmacro @{:doc, [line: _line], [documentation]} do
defmacro @{:doc, _meta, [documentation]} do

lib/unifex/specs_dsl.ex Outdated Show resolved Hide resolved
test_projects/documented/test/example_test.exs Outdated Show resolved Hide resolved
test_projects/documented/mix.exs Outdated Show resolved Hide resolved
lib/unifex/specs.ex Outdated Show resolved Hide resolved
test_projects/documented/c_src/example/example.spec.exs Outdated Show resolved Hide resolved
test/unifex/integration_test.exs Show resolved Hide resolved
@FelonEkonom
Copy link
Member

What about generating docs for CNodes? It would be nice to have docs also when somebody is not using NIF

@FelonEkonom FelonEkonom added the enhancement New feature or request label Oct 27, 2022
@FelonEkonom
Copy link
Member

Please add a reference to related Jira ticket

Previous version filled function's documentation with `"false`" string.
`elixir_sense` is removed from the testing project
and it is no longer pulled from the GitHub
@Janix4000 Janix4000 requested a review from FelonEkonom November 2, 2022 14:27
@Janix4000 Janix4000 changed the title Documentation for NIFs MS-267 Documentation for NIFs Nov 3, 2022
mix.exs Outdated Show resolved Hide resolved
lib/unifex/specs.ex Outdated Show resolved Hide resolved
Point out file and line with wrongly documented function.
Remove predefined `documented` sub project
`Membrane.Logger` is meant to be used in elements.
@Janix4000 Janix4000 requested a review from FelonEkonom November 8, 2022 10:22
lib/unifex/specs.ex Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants