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

Support --no-docs-gen argument #38

Closed
arendjr opened this issue May 3, 2023 · 1 comment · Fixed by #41
Closed

Support --no-docs-gen argument #38

arendjr opened this issue May 3, 2023 · 1 comment · Fixed by #41

Comments

@arendjr
Copy link

arendjr commented May 3, 2023

The purpose of this argument is to disable documentation generation by the generator. This would allow the VS Code extension to become solely responsible for generating documentation tooltips.

This is a blocker for finalizing autometrics-dev/vscode-autometrics#28

Feel free to suggest a better name for the argument 😅

@gagbo
Copy link
Member

gagbo commented May 3, 2023

It probably needs to be an environment argument, because it's not possible to call go generate ./... with a flag that will get passed to the autometrics binary.

When this change is being made, it's also going to be the opportunity to finalize the "directive comment" API, probably as

-//autometrics:doc --slo "API" --latency-target 99 --latency-ms 250
+//autometrics:inst [--no-doc] --slo "API" --latency-target 99 --latency-ms 250

But undecided yet

gagbo added a commit that referenced this issue May 9, 2023
The generator takes an extra argument, through command-line or
environment variable, that allows to opt-out of documentation
generation. There is also the possibility to opt-in this deactivation on
a per-function basis, using the `--no-doc` argument on the directive.

This also changes the name of the directive, from `autometrics:doc` to
`autometrics:inst`, as now the directive doesn't always add
documentation to the functions it instruments. For backwards
compatibility, the `doc` attribute is still accepted, and will be
removed in a later version.

Closes #38
@gagbo gagbo closed this as completed in #41 May 11, 2023
gagbo added a commit that referenced this issue May 11, 2023
* Add support for ignoring/deleting generated links

The generator takes an extra argument, through command-line or
environment variable, that allows to opt-out of documentation
generation. There is also the possibility to opt-in this deactivation on
a per-function basis, using the `--no-doc` argument on the directive.

This also changes the name of the directive, from `autometrics:doc` to
`autometrics:inst`, as now the directive doesn't always add
documentation to the functions it instruments. For backwards
compatibility, the `doc` attribute is still accepted, and will be
removed in a later version.

Closes #38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants