-
Notifications
You must be signed in to change notification settings - Fork 6
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
v0.9.0-beta #48
Merged
v0.9.0-beta #48
Conversation
This file contains 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
- Added `aux_docs.zig` to the library to generate manpages and tab completion scripts. - Added `aux_doc_gen.zig` to the project to call `aux_docs.zig` within a `build.zig`. - Updated `build.zig` to support the aforementioned additions. - Closes #19
- Added `createTabCompletion()` and related structures/functions to `aux_docs.zig`. - Updated `build.zig` and `aux_doc_gen.zig` to reflect changes. - Known bug with exhausted tab completion reverting back to the base command.
- Changed default behavior for Bash Tab Completion to list current directory contents.
- Added version, data, and manpage name formatting options for Manpages. - Fixed tab completion format to default to the directory when all Commands/Options have been exhausted.
- Moved Value Usage/Help formatters to `Value.Config`. - Added `usage()` and `help()` messages to `Value.Custom`. - Updated `Command.Custom` with these changes. - Updated the docs with these changes. - Closes #27
- Added `checkOpts()`, `matchOpts()`, and `matchOptsAlloc()` to `Command.Custom` to enable customized analysis of a Command's Options. - Closes #28
- Moved several hardcoded strings from `help()` and `usage()` to `Config` in `Command.Custom`. - Updated `Value` and `Option` with these changes. - Updated Docs with these changes. - #27
- Updated the README Install section to use the new `zig fetch` command and provide a consistent url for the package.
- Added `help_fn` and `usage_fn` fields to `Command.Config` to allow for custom Usage/Help functions that will override the default implementations. - Updated the Docs to reflect the new fields. - Closes #27
- Added new `paths` field for the package manager. - Updated `version` to 0.9.0.
- Added `help_fn` and `usage_fn` to corresponding Configs. - #27
- Allowed Boolean Values to take a data value during parsing if they have a custom `parse_fn` - Fixed #29
- Added zig-cli to alternatives.
- Added `_alloc` field and `init()` method to Options and Values so the `mem.Allocator` can be passed in from the parent Command during Initialization. - Added `mem.Allocator` Callback Function Parameter requirement so that all callbacks can use the Argument Type's allocator if needed. - Updated Docs to reflect these changes. - Closes #30
- Allowed Custom `Value.Typed` Types in `Value.Config.custom_types` to make custom Value Types more seamless and configurable. - Fixed misssing `mem.Allocator` parameter in `Command.Config.usage_fn`. - #30
- Allowed arbitrary Types in `Value.Config.custom_types` to overwrite existing Types in `Value.Generic`. - Added `custom_parse_fns` field into `Value.Config` to allow for customizable Parsing Functions for added or overwritten Types. - #30
- Added `[arg_type]_groups` to Commands and `[arg_type]_group` fields to all Argument Types for Grouping during Help messages and generated documentation. - Closes #26
- Added Argument Group Validation which is enabled via the new `ValidateConfig.check_arg_groups` in `Command.Custom`. - Added "OTHER" Group Title for Arguments that don't fall into a specified Argument Group. - Updated Docs to reflect Argument Group changes. - #26
- Added `child_type_alias` field to `Value.Typed` that will be used in place of the actual Child Type for Usage/Help messages. - Updated Docs to reflect Type Aliases. - Closes #32
- Fixed link to main branch for install.
- Changed instances of `aux_doc` to `generate` (or similar) across build.zig and library files.
- Added `alias_names` field to `Command.Custom` to allow for a list alias names for any Command. - Updated `cova.parse()` to support Command alias names. - #33.
- Added `check_cmd_aliases` field to `Command.Custom.ValidateConfig` to check for distinct Command Alias Names during Validation. - #33.
- Added new fields to `Command.Custom.InitConfig` that allow for adding an Argument Group for Help messages based on Argument Group group conditions of each Command. - #26.
- Added Command Alias Names to Help Messages if the Aliases exist. - Added Formatting fields to `Command.Config` for Command and sub-Command Alias Names. - Closes #33.
- Fixed an alignment cast for the `anyopaque` casted field `type_parse_fn`in `Value.Typed`.
- Added `max_children` to `Value.Config` to allow for customization of the max instances of a Child Type that can be held in each Value. This can help greatly reduce binary size.
- Added `add_base_ints` and `add_base_floats` fields to `Value.Config` to allow for more granular control of what gets added to `Value.Generic` when using custom Types. - Added `use_slim_base` to allow for the above optimizations even without custom Types being specified.
- Fixed the check for whether or not the `OTHER` Argument Group title should be printed during `help()`.
- Backtracked on erroneous uses of `const` and `@constCast` in `cova.zig` following Zig updates.
- Made Usage messages more readable by splitting them between Options, Values, and Commands.
- Added the `hidden` field to `Command.Custom` and `Option.Custom` to allow individual Arguments to be hidden from Usage/Help messages. - Updated `usage()` and `help()` in `Command.zig` to enact these changes. - Closes #45.
- Fixed the Value Tag math for reified `Value.Generic` creation.
- Updated `Value.zig` to correctly parse default values during conversions and properly return them when unset. - Fixed minor naming issue for underlying Values in `Option.zig` during conversions. - Updated `Command.zig` to better handle default values during conversions both to and from other Types.
- Added Executable Name build option `-Dname` to `build.zig`.
- Added a trim check for Enum conversions in `Value.zig`. - Improved the check for a Value Type in Custom Types for `Value.Generic`.
- Removed the `checkOpts()` function's reliance on `matchOpts()`, thus removing the need for an Allocator.
- Added `reset` to `cova.ArgIteratorGeneric` to allow the Iterator to be reused without re-initializing it.
- Fixed default value handling bug for optionals in `Command.Custom.to()`.
- Fixed directory walking. - Changed non-mutated variables to const. - Updated to latest Cova changes.
- Added `mandatory` field to `Option.Custom`. - Added `mandatory_opt_groups` field to `Command.Custom`. - Added validation for `mandatory_opt_groups` to `Command.Custom`. - Added `hasDefault()` function to `Value.Custom`. - Implemented these changes into `cova.parse()`.
- Built docs to reflect the changes for v0.9.0. - Added `.zsh` option for Tab-Completion Generation (which will be moved v0.10.0).
- Updated the `arg_delims` and `set_behavior` fields to have the `global_` prefix.
- Started updating Readme and Guides for the v0.9.0 release.
- Removed unneeded uses `@constCast()` in Options and Values Initilizations. - Made Allocation ownership more clear for a few Command methods. - Changed Help/Usage temporary slices to normal functions for Command Initialization. - Properly de-initialized Options and Values during Command De-initialization.
- Removed the unnecessary default Validation Function `valid_fn` from `Value.Typed`.
- Removed the unnecessary `Command.Custom._is_init` field in favor of simply checking that the `Command.Custom._alloc`.
- Updated the installation instructions. - Updated the README and Docs. - Updated existing guides with new features. - Added several new guides.
- Implemented aliases for Option long names with the `cova.Option.Custom.alias_long_names` field. - Added validation for Option Aliases. - Implemented Option Aliases into `cova.parse()`. - Closes #47.
- Updated the `getVals()` and `getOpts()` methods of `cova.Command.Custom` to take the new `cova.Command.Custom.GetConfig` allowing an Argument Group for filtering to be passed. - Updated `checkOpts()` and `matchOpts()` to allow for the same. - Changed `child_type_alias` to `alias_child_type` in `Value.Typed` for consistency.
- Changed `Value.Typed.child_type_alias` to `Value.Typed.alias_child_type` for consistency (previous commit). - Added `Value.Config.child_type_aliases` to make adding aliases for specific Types easier across an entire project.
- Updated the `covademo.zig` and `basic-app.zig` examples f/ the v0.9.0 release.
- Removed incomplete Doc Generation files and references to prep f/ the v0.9.0 release.
- Finalized installation instructions. - Added Alias & Argument Group examples to the Basic App Example. - Fixed some minor mistakes in the Docs and Guides.
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.
Update Notes
v0.9.0
New Features
mandatory
field.cova.ParseConfig
.zig fetch --save
.Breaking
global_
andchild_type_
prefixes for certain fields.Fixes & Optimizations
Command.Custom.getVals()
.Command.Custom.to()
parsing.meta.trait
.const
and@constCast()
.Value.Generic
Union and added customization options allowing for much smaller binaries.