Skip to content

Extending directive checking #1257

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

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Dec 18, 2023

This ticket extends how the directives are determined by allowing any AST node containing a comment able to be checked. This includes imports, functions, types, fields, and values.

This does not affect //gopherjs:prune-original and //gopherjs:keep-original, so currently we are still only checking for directives on functions. This change is in preparation for adding the //gopherjs:purge directive.

The only functional change should be that the directives are no longer prefix tested, meaning if there was a directive like //gopherjs:keep-original-and-remove-overlay we wouldn't accidentally match it to //gopherjs:keep-original. This is not currently a problem and will not affect the current code. This is just prevention of a potential problem as the directives are being worked on in future tickets.

@grantnelson-wf grantnelson-wf marked this pull request as ready for review December 18, 2023 19:48
@nevkontakte nevkontakte merged commit 8ea6531 into gopherjs:go1.19 Dec 21, 2023
@grantnelson-wf grantnelson-wf deleted the extendDirectives branch December 29, 2023 02:04
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 this pull request may close these issues.

2 participants