-
Notifications
You must be signed in to change notification settings - Fork 629
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 Null Tag #4151
Comments
Here is my comment to #4129 (comment)
I've opened this issue.
I don't concerns this. The u-ctags has many more features than the exuberant ctags. Emiting more tags is not an issue. As you wrote, it just ignores a Null Tag. I rather fear that other client tools may crash with null tags. So we may need a command line option to disable Null Tags.
As far as I read Xref output man page it can express a Null Tag. Again as I wrote on #4129 (comment)
This is my position. |
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
I've written a few examples in JSON, Tcl, and SystemVerilog featuring null tags, in case you're interested. Interestingly, tags that are inside a "namespace" that has a null identifier are displayed in the hierarchy as such, even if the identifier won't. {"": {"": {"a": {"": {"": {"b": {"": {"": {"c": 0}}}}}}}}} outputs
(the leading blank containers are ignored, but the intermediate ones are preserved - note that it says (Attached: null-tags.r.tar.gz) |
Please make a PR for the tests that you attached. |
I can do that but it'll cause CI tests to fail ("unexpected exit state"), so I first need to figure out how to exclude those tests from CI. |
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating ctags(1), - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" - update units.py supporting nulltags Signed-off-by: Masatake YAMATO <[email protected]>
@cousteaulecommandant You can ignore failures. What we need are pairs of input and expected output. Thank you so much for your attention and participation. |
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Should I modify expected.tags manually to reflect what I expect, including empty tags? Or just use what ctags outputs? |
Yes, please modify expected.tags manually to reflect what you expect. |
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
Close universal-ctags#4151. Consider a parser attempting to emit a null tag, a tag whose name is the empty string '\0'. Original Behavior: It warns "ignoring null tag..." if both parserDefinition::allowNullTag and tagEntryInfo::allowNullTag are unset. It does not warn if either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set. It does not emit the null tag, even if allowNullTag is set. With This Change: The code now emits the null tag if: Either parserDefinition::allowNullTag or tagEntryInfo::allowNullTag is set, and The --extras=+0 (or --extras=+{nulltag}) option is specified. TODO: - versioning - updating the hacking guide - make readtags warn "unsupported" if it finds "!_TAG_FIELD_DESCRIPTION" Signed-off-by: Masatake YAMATO <[email protected]>
OK done, see #4157 :) |
Some languages (ex. (System)Verilog #4129) supports a Null Tag (a tag whose
name
field is "\0").The current
makeTagEntry()
ignores or warns it.The text was updated successfully, but these errors were encountered: