-
Notifications
You must be signed in to change notification settings - Fork 640
main: enhance parser versioning #4271
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
main: enhance parser versioning #4271
Conversation
4b13150
to
f5eb41e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4271 +/- ##
==========================================
+ Coverage 85.88% 85.92% +0.03%
==========================================
Files 248 248
Lines 63602 63717 +115
==========================================
+ Hits 54624 54746 +122
+ Misses 8978 8971 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f5eb41e
to
884ff3e
Compare
884ff3e
to
58c55a8
Compare
In d469bf9, I forgot to update versionCurrent and versionAge member of the parser. (This means the parser versioning of ctags-6.2 is broken. I must backport this change to ctags-6.2 and release 6.2.1.) Signed-off-by: Masatake YAMATO <yamato@redhat.com>
58c55a8
to
afede55
Compare
afede55
to
f6101db
Compare
An interesting bug(?):
It seems that strtoul accepts "-1" on the platform. |
The behavior is valid as strtoul(1) page explains:
I have expected the strtou functions rejected negative numbers.
|
strToU* functions may accept strings starting with "-". --langdef=LANG{version=...} flag should not. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
e5a8aad
to
dd3355d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances parser versioning in ctags by adding version tracking capabilities for parser language elements (kinds, roles, fields, and extras). The primary goal is to automatically report new KRFX (Kinds, Roles, Fields, eXtras) instead of manually updating documentation.
Key changes include:
- Added version members to KRFX definitions across all parser types
- Introduced a new
--describe-language
option for comprehensive language parser information - Added VER column to various
--list-*
commands to show version numbers - Enhanced optlib2c tool to handle version specifications in optlib files
Reviewed Changes
Copilot reviewed 95 out of 99 changed files in this pull request and generated 10 comments.
Show a summary per file
File | Description |
---|---|
main/colprint.c | Added colprintLineAppendColumnVersion function for version column support |
main/colprint_p.h | Added header declaration for version column functionality |
main/field.c | Added version validation and VER column to field listings |
main/field.h | Added version member to fieldDefinition structure |
main/kind.c | Added version validation and VER column to kind/role listings |
main/kind.h | Added version member to roleDefinition and kindDefinition structures |
main/options.c | Implemented --describe-language option and added new list flag options |
main/parse.c | Added version flag parsing for kinds, roles, fields, and extras |
main/parse_p.h | Added new function declarations for flag listing |
main/ptag.c | Added VER column to pseudo-tag listings |
main/ptag_p.h | Added version member to ptagDesc structure |
main/xtag.c | Added version validation and VER column to extra listings |
main/xtag.h | Added version member to xtagDefinition structure |
parsers/*.c | Added version numbers to various parser definitions |
optlib/*.ctags | Added version specifications in optlib configuration files |
optlib/*.c | Updated generated C files with version information |
misc/optlib2c | Enhanced to parse and generate version information |
man/ctags.1.rst.in | Updated documentation for new VER column and --describe-language option |
docs/news/HEAD.rst | Added release notes for new features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dd3355d
to
d71eacf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 95 out of 99 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
a70633a
to
cf42e24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 98 out of 102 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 98 out of 102 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
main/options.c:1
- Corrected spelling of 'acceaptable' to 'acceptable'.
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Suggested by Copilot.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* add VER column to --list-kinds-full output, and * add {version=} flag to --kinddef-<LANG> option. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* add VER column to --list-roles output, and * add {version=} flag to --_roledef-<LANG> option. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* add VER column to --list-fields output, and * add {version=} flag to --_fielddef-<LANG> option. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* add VER column to --list-extras output, and * add {version=} flag to --_extradef-<LANG> option. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Add VER column to --list-pseudo-tags output. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…o tags Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
cf42e24
to
e112546
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 99 out of 103 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
When releasing, I have to update the NEWS file.
One important topic is how parsers are enhanced, with new kinds, roles, fields, and extras (KRFX).
We have added and updated the 'ctags-lang-*' man pages mainly to track the KRFX.
Updating the man pages only to track them is a boring task.
Instead, making ctags itself report new KRFX.
This change adds version members to KRFX definitions.
Various-- list* commands show the version numbers in the VER column:
--describe-language
option was added.TODO:
--list-languages-full