Skip to content

Commit

Permalink
Declaration utility (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicant authored Dec 29, 2024
2 parents 48c387b + 03834d8 commit 7147a42
Show file tree
Hide file tree
Showing 64 changed files with 1,504 additions and 395 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions yash-builtin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to `yash-builtin` will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.0] - Unreleased

### Changed

- External dependency versions:
- yash-env 0.5.0 → 0.6.0
- yash-semantics 0.5.0 → 0.6.0 (optional)
- yash-syntax 0.13.0 → 0.14.0
- Internal dependency versions:
- yash-prompt 0.3.0 → 0.4.0 (optional)

## [0.5.0] - 2024-12-14

### Changed
Expand Down Expand Up @@ -148,6 +159,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial implementation of the `yash-builtin` crate

[0.6.0]: https://github.com/magicant/yash-rs/releases/tag/yash-builtin-0.6.0
[0.5.0]: https://github.com/magicant/yash-rs/releases/tag/yash-builtin-0.5.0
[0.4.1]: https://github.com/magicant/yash-rs/releases/tag/yash-builtin-0.4.1
[0.4.0]: https://github.com/magicant/yash-rs/releases/tag/yash-builtin-0.4.0
Expand Down
15 changes: 8 additions & 7 deletions yash-builtin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "yash-builtin"
version = "0.5.0"
version = "0.6.0"
authors = ["WATANABE Yuki <[email protected]>"]
edition = "2021"
rust-version = "1.82.0"
Expand All @@ -12,6 +12,7 @@ repository = "https://github.com/magicant/yash-rs"
license = "GPL-3.0-or-later"
keywords = ["posix", "shell"]
categories = ["command-line-utilities"]
publish = false

[features]
default = ["yash-prompt", "yash-semantics"]
Expand All @@ -24,15 +25,15 @@ either = "1.9.0"
enumset = { version = "1.1.2", optional = true }
itertools = "0.13.0"
thiserror = "2.0.4"
yash-env = { path = "../yash-env", version = "0.5.0" }
yash-prompt = { path = "../yash-prompt", version = "0.3.0", optional = true }
yash-env = { path = "../yash-env", version = "0.6.0" }
yash-prompt = { path = "../yash-prompt", version = "0.4.0", optional = true }
yash-quote = { path = "../yash-quote", version = "1.1.1" }
yash-semantics = { path = "../yash-semantics", version = "0.5.0", optional = true }
yash-syntax = { path = "../yash-syntax", version = "0.13.0" }
yash-semantics = { path = "../yash-semantics", version = "0.6.0", optional = true }
yash-syntax = { path = "../yash-syntax", version = "0.14.0" }

[dev-dependencies]
assert_matches = "1.5.0"
futures-executor = "0.3.31"
futures-util = { version = "0.3.31", features = ["channel"] }
yash-env-test-helper = { path = "../yash-env-test-helper", version = "0.3.0" }
yash-semantics = { path = "../yash-semantics", version = "0.5.0" }
yash-env-test-helper = { path = "../yash-env-test-helper", version = "0.4.0" }
yash-semantics = { path = "../yash-semantics", version = "0.6.0" }
3 changes: 3 additions & 0 deletions yash-builtin/src/command/identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ mod tests {
let builtin = Builtin {
r#type: Type::Substitutive,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
};
let mut builtin_target = Target::Builtin {
builtin,
Expand Down Expand Up @@ -492,6 +493,7 @@ mod tests {
builtin: Builtin {
r#type: Type::Special,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
},
path: None,
};
Expand All @@ -512,6 +514,7 @@ mod tests {
builtin: Builtin {
r#type: Type::Substitutive,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
},
path: Some(c"/bin/echo".to_owned()),
};
Expand Down
3 changes: 3 additions & 0 deletions yash-builtin/src/command/invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ mod tests {
Builtin {
r#type: Special,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
},
);
let invoke = Invoke {
Expand Down Expand Up @@ -152,6 +153,7 @@ mod tests {
make_result()
})
},
is_declaration_utility: Some(false),
},
path: None,
};
Expand Down Expand Up @@ -181,6 +183,7 @@ mod tests {
)
})
},
is_declaration_utility: Some(false),
},
);
let body: FullCompoundCommand = "{ : \"$@\"; }".parse().unwrap();
Expand Down
2 changes: 2 additions & 0 deletions yash-builtin/src/command/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ mod tests {
let builtin = Builtin {
r#type: Special,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
};
env.builtins.insert(":", builtin);
let params = &Search {
Expand All @@ -212,6 +213,7 @@ mod tests {
let builtin = Builtin {
r#type: Special,
execute: |_, _| unreachable!(),
is_declaration_utility: Some(false),
};
env.builtins.insert(":", builtin);
let params = &Search {
Expand Down
Loading

0 comments on commit 7147a42

Please sign in to comment.