feat: introduce ArgumentContext to replace ArgumentTiming #461
Merged
Citymonstret merged 3 commits into1.9.0-devfrom Jul 28, 2023
Merged
feat: introduce ArgumentContext to replace ArgumentTiming #461Citymonstret merged 3 commits into1.9.0-devfrom
Citymonstret merged 3 commits into1.9.0-devfrom
Conversation
The commit introduces the ArgumentContext class, deprecating the ArgumentTiming functionality in the CommandContext.java file, providing a comprehensive log of consumed inputs and parsing duration. This change enhances the precision and maintainability by providing more details about the argument parsing stage. CommandTree.java is also updated to adopt ArgumentContext in place of ArgumentTiming during parsing, while ArgumentContext.java is a new file introduced to store specific details about each argument's consumption of input and its parse times.
The updated ArgumentContext.java now includes a new function that allows the retrieval of a list of consumed inputs. This modification was implemented to improve argument parsing, making it easier to discern and analyse the exact sequence of inputs consumed by an argument during the parsing stage, therefore enhancing the application's logging detail and command processing accountability.
Unit tests for the ArgumentContext class were added to ensure that its functionalities, such as "consumedInput" and "exactAlias", are working correctly. This includes testing the command building and execution process. This will help in quickly identifying and fixing any potential issues in the future.
jpenilla
pushed a commit
that referenced
this pull request
Sep 9, 2023
jpenilla
pushed a commit
that referenced
this pull request
Nov 9, 2023
Citymonstret
added a commit
that referenced
this pull request
Dec 21, 2023
The label may contain the namespace prefix. This reverts a change introduced in #461.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The commit introduces the ArgumentContext class, deprecating the ArgumentTiming functionality in the CommandContext.java file, providing a comprehensive log of consumed inputs and parsing duration. This change enhances the precision and maintainability by providing more details about the argument parsing stage. CommandTree.java is also updated to adopt ArgumentContext in place of ArgumentTiming during parsing, while ArgumentContext.java is a new file introduced to store specific details about each argument's consumption of input and its parse times.