Releases: magicant/yash-rs
Releases · magicant/yash-rs
yash-syntax-0.9.0
[0.9.0] - 2024-06-09
Added
parser::SyntaxError::RedundantToken
variantparser::lex::ParseOperatorError
struct
Changed
- Implementations of
FromStr
for syntactic elements likeAssign
and
SimpleCommand
now fails withSyntaxError::RedundantToken
if the input
string contains a token that is not part of the element. Lexer::source_string
is no longer generic. The argument type is now
Range<usize>
instead of a generic implementor of
SliceIndex<[SourceChar], Output = [SourceChar]>
.Word::parse_tilde_front
no longer delimits the tilde expansion at an
unquoted:
character.WordLexer::braced_param
now returnsErr(SyntaxError::EmptyParam)
if{
is not followed by any name characters. Previously, it returned
Err(SyntaxError::UnclosedParam{…})
if{
was followed by a non-name
character other than}
.impl std::fmt::Display for SimpleCommand
now prints the command words
after the redirections if there are no assignments and the first word looks
like a keyword.TryFromOperatorError
is now a unit struct rather than an empty normal
struct.
Fixed
- A newline after a bar in a pipeline was not parsed correctly if it appeared as
a result of alias substitution. - Alias substitution was not performed as expected for a token that follows a
result of blank-ending alias substitution if there is a line continuation
between them. - Character location indexes were not calculated correctly after an alias
substitution changed the length of the source code.
yash-semantics-0.2.0
[0.2.0] - 2024-06-09
Added
- Support for the
ErrExit
shell option in multi-command pipelines
Changed
- External dependency versions
- yash-env 0.1.0 → 0.2.0
- yash-syntax 0.8.0 → 0.9.0
- In the
expansion::initial
module:ValueState
was renamed toVacancy
.EmptyError
was renamed toVacantError
.EmptyError::state
was renamed toVacantError::vacancy
.
expansion::ErrorCause::EmptyExpansion
was renamed toexpansion::ErrorCause::VacantExpansion
.<expansion::Error as handle::Handle>::handle
now returnsDivert::Exit
instead ofDivert::Interrupt
when theErrExit
shell option is applicable.expansion::glob::glob
no longer requires search permission for the parent
directory of the last pathname component in the pattern when the last
component contains a pattern character.<yash_syntax::syntax::FunctionDefinition as command::Command>::execute
now
prints its error message in prettier format.command::simple_command::replace_current_process
now usesSystem::shell_path
to find the shell executable when it needs to fall back to the shell.trap::run_trap_if_caught
now takes ayash_env::signal::Number
argument
instead of ayash_env::trap::Signal
.
Fixed
- A
for
loop without any words afterin
now correctly returns an exit status
of0
rather than keeping the previous exit status. <TextUnit as Expand>::expand
now correctly expands an unset parameter with a
switch to an empty string regardless of theUnset
shell option. Previously,
it would expand to an empty string only if theUnset
shell option was on.- The parameter expansion of an unset variable with a
Length
modifier now
correctly expands to0
rather than an empty string. expansion::glob::glob
now handles backslash escapes in glob patterns
correctly.trap::run_traps_for_caught_signals
,trap::run_trap_if_caught
, and
trap::run_exit_trap
now propagate the exit status of the executed trap
action if it is interrupted by a shell error raisingDivert::Interrupt(_)
.trap::run_exit_trap
is now called on the exit of a subshell that is running
a command substitution, an asynchronous and-or list, or a job-controlled
pipeline.
yash-env-0.2.0
[0.2.0] - 2024-06-09
Added
Env::errexit_is_applicable
System::shell_path
System::{validate_signal, signal_number_from_name}
SystemEx::signal_name_from_number
SystemEx::fd_is_pipe
SystemEx::set_blocking
job::ProcessResult
job::ProcessResult::{exited, is_stopped}
impl From<job::ProcessResult> for ExitStatus
job::ProcessState::Halted
job::ProcessState::{stopped, exited, is_stopped}
impl Hash for job::fmt::Marker
job::fmt::State
impl From<trap::Condition> for stack::Frame
signal::{Number, RawNumber, Name, NameIter, UnknownNameError}
trap::SignalSystem::signal_name_from_number
trap::SignalSystem::signal_number_from_name
ExitStatus::to_signal_number
Changed
- External dependency versions
- yash-syntax 0.8.0 → 0.9.0
stack::Frame
is nownon_exhaustive
.job::fmt::Report
has been totally rewritten.system::virtual::FileSystem::get
now fails withEACCES
when search
permission is denied for any directory component of the path.job::ProcessResult::{Stopped, Signaled}
now have associated values of type
signal::Number
instead oftrap::Signal
.- The following methods now operate on
signal::Number
instead oftrap::Signal
:Env::wait_for_signal
Env::wait_for_signals
job::ProcessState::stopped
system::System::caught_signals
system::System::kill
system::System::sigaction
system::System::sigmask
system::System::select
system::virtual::Process::blocked_signals
system::virtual::Process::pending_signals
system::virtual::Process::block_signals
system::virtual::Process::signal_handling
system::virtual::Process::set_signal_handling
trap::TrapSet::catch_signal
trap::TrapSet::take_caught_signal
trap::TrapSet::take_signal_if_caught
system::System::sigmask
now takes three parameters:&mut self,
op: Option<(SigmaskHow, &[signal::Number])>,
old_mask: Option<&mut Vec<signal::Number>>,
system::virtual::SignalEffect::of
now takes asignal::Number
parameter
instead of atrap::Signal
. This function is nowconst
.- The type parameter constraint for
subshell::Subshell
is now
F: for<'a> FnOnce(&'a mut Env, Option<JobControl>) -> Pin<Box<dyn Future<Output = ()> + 'a>> + 'static
.
TheOutput
type of the returned future has been changed from
semantics::Result
to()
.
Removed
job::ProcessState::{Exited, Signaled, Stopped}
in favor ofjob::ProcessResult
job::ProcessState::{from_wait_status, to_wait_status}
impl std::fmt::Display for job::ProcessResult
impl std::fmt::Display for job::ProcessState
impl From<Signal> for ExitStatus
semantics::apply_errexit
trap::Signal
trap::ParseConditionError
Fixed
RealSystem::open_tmpfile
no longer returns a file descriptor with the
O_CLOEXEC
flag set.<RealSystem as System>::is_executable_file
now usesfaccessat
with
AT_EACCESS
instead ofaccess
to check execute permission (except on
Redox).
0.1.0 β1
[0.1.0-beta.1] - 2024-06-09
This release contains various fixes to address bugs and incompleteness that existed in the previous version.
Changed
- External dependency versions
- yash-builtin 0.1.0 → 0.2.0
- yash-env 0.1.0 → 0.2.0
- yash-semantics 0.1.0 → 0.2.0
- yash-syntax 0.8.0 → 0.9.0
- The shell now enables blocking reads on the standard input if it is a terminal
or a pipe as required by POSIX.
yash-builtin-0.2.0
[0.2.0] - 2024-06-09
Added
impl Default for common::syntax::OptionSpec
kill::Signal
kill::syntax::parse_signal
kill::print::InvalidSignal
- Support for real-time signals in the kill built-in
trap::CondSpec
trap::Error
trap::ErrorCause
Changed
- External dependency versions
- yash-env 0.1.0 → 0.2.0
- yash-semantics 0.1.0 → 0.2.0
- yash-syntax 0.8.0 → 0.9.0
kill::syntax::parse_signal
now returns anOption<kill::Signal>
instead of
Option<Option<yash_env::trap::Signal>>
kill::send::execute
now additionally takes the
signal_origin: Option<&Field>
argument.kill::print::print
now additionally takes thesystem: &SystemEx
argument
and returnsResult<String, Vec<InvalidSignal>>
(previouslyString
).kill::Command::Send::signal
is now akill::Signal
(previouslyOption<yash_env::trap::Signal>
).kill::Command::Send
now has asignal_origin: Option<Field>
field.kill::Command::Print::signals
is now aVec<kill::Signal>
(previouslyVec<yash_env::trap::Signal>
).trap::Command::SetAction::conditions
is now aVec<(CondSpec, Field)>
(previouslyVec<(Condition, Field)>
).trap::Command::execute
now returnsResult<String, Vec<Error>>
(previouslyResult<String, Vec<(SetActionError, Condition, Field)>>
).trap::display_traps
is now marked#[must_use]
.trap::display_traps
is now additionally takes a
yash_env::trap::SignalSystem
argument.wait::core::Error::Trapped
now contains ayash_env::signal::Number
instead of ayash_env::trap::Signal
.
Removed
kill::syntax::parse_signal_name
kill::syntax::parse_signal_name_or_number
yash-semantics-0.1.0
[0.1.0] - 2024-04-13
Added
- Initial implementation of the
yash-semantics
crate
yash-env-0.1.0
[0.1.0] - 2024-04-13
Added
- Initial implementation of the
yash-env
crate
0.1.0 α1
[0.1.0-alpha.1] - 2024-04-13
Added
- Initial implementation of the
yash-cli
crate
yash-builtin-0.1.0
[0.1.0] - 2024-04-13
Added
- Initial implementation of the
yash-builtin
crate
yash-fnmatch-1.1.1
[1.1.1] - 2024-04-10
Changed
- External dependency versions
- Rust 1.58.0 → 1.65.0
- Internal dependency versions
- regex 1.5.6 → 1.9.4
- regex-syntax 0.6.26 → 0.8.2
- thiserror 1.0.31 → 1.0.47