-
Notifications
You must be signed in to change notification settings - Fork 4
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
Move GetoptsState definition to yash-builtin and store it in Env::any #445
Conversation
This commit moves the GetoptsState and Origin definitions from yash-env to yash-builtin. The GetoptsState is stored in the Env::any field, which is a DataSet. This change improves cohesion by keeping the GetoptsState and Origin definitions inside the getopts module in the yash-builtin crate.
WalkthroughThe pull request introduces a comprehensive refactoring of the Changes
Assessment against linked issues
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🔇 Additional comments (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request includes significant changes to the
yash-builtin
module, particularly focusing on the handling of arbitrary data within the environment and refactoring thegetopts
built-in. The most important changes include the introduction of a newDataSet
type for storing arbitrary data, the removal of thegetopts_state
field, and the migration of related logic to use the newDataSet
.Closes #443
Introduction of
DataSet
for Arbitrary Data Storage:yash-env/src/any.rs
: Added a new moduleany
that defines theDataSet
struct, which allows for storing and managing arbitrary data within the environment.Refactoring of
getopts
Built-in:yash-builtin/src/getopts.rs
: Updated thegetopts
built-in to use theany
field in theEnv
struct instead of the removedgetopts_state
field. [1] [2] [3]yash-builtin/src/getopts/verify.rs
: Moved theOrigin
enum andGetoptsState
struct to this file fromgetopts.rs
.Updates to Environment Structure:
yash-env/src/lib.rs
: Added theany
field of typeDataSet
to theEnv
struct, replacing thegetopts_state
field. [1] [2] [3] [4] [5] [6] [7]Changelog Updates:
yash-env/CHANGELOG.md
: Documented the addition of theany
field to theEnv
struct and the removal of thegetopts_state
field. [1] [2]Test and Documentation Adjustments:
yash-builtin/src/getopts/report.rs
: Updated tests and imports to reflect the changes in how thegetopts
state is managed. [1] [2] [3] [4] [5]Summary by CodeRabbit
Release Notes
New Features
DataSet
for managing arbitrary data types in the shell environmentRefactoring
getopts
built-in commandBreaking Changes
getopts_state
field from the environment structuregetopts
module and its associated functionality