Skip to content
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
merged 69 commits into from
Dec 30, 2023
Merged

v0.9.0-beta #48

merged 69 commits into from
Dec 30, 2023

Conversation

00JCIV00
Copy link
Owner

Update Notes

v0.9.0

New Features

  • Implemented Argument Groups to help organize Arguments for Usage/Help messages and analysis.
  • Implemented Aliases for Commands & Options and Value Child Types.
  • Added more methods to make analyzing Arguments even easier.
  • Added customizable Callback Functions and new Formatting options for Usage/Help messages.
  • Implemented Mandatory Options with the new mandatory field.
  • Implemented Option Termination which is configurable under cova.ParseConfig.
  • Revamped the handling of Values with an Enum Child Type to make them seamless to work with.
  • Revamped Conversions for fields w/ default values.
  • Tested on additional platforms.
  • Updated Installation to use the new zig fetch --save.
  • Updated the Docs and Guides with more features and examples.

Breaking

  • New global_ and child_type_ prefixes for certain fields.
  • Added Allocator parameter requirement for all Callback Functions.

Fixes & Optimizations

  • Fixed bug with Long Option parsing.
  • Fixed bug with Boolean Value parsing.
  • Fixed Alignment Issue on ARM devices.
  • Fixed bug with Command.Custom.getVals().
  • Fixed bug with Command.Custom.to() parsing.
  • Fixed Zig removal of meta.trait.
  • Fixed Zig "local variable is never mutated" errors.
  • Removed several unnecessary, erroneous uses of const and @constCast().
  • Optimized the default size of the Value.Generic Union and added customization options allowing for much smaller binaries.
  • Optimized parts of Argument Initialization/De-initialization.

00JCIV00 and others added 30 commits September 23, 2023 20:11
- 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`.
00JCIV00 and others added 29 commits November 25, 2023 17:14
- 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.
@00JCIV00 00JCIV00 merged commit 4f23c3d into main Dec 30, 2023
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.

1 participant