Skip to content

Releases: magicant/yash-rs

yash-syntax-0.9.0

09 Jun 12:55
yash-syntax-0.9.0
Compare
Choose a tag to compare

[0.9.0] - 2024-06-09

Added

  • parser::SyntaxError::RedundantToken variant
  • parser::lex::ParseOperatorError struct

Changed

  • Implementations of FromStr for syntactic elements like Assign and
    SimpleCommand now fails with SyntaxError::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 returns Err(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

09 Jun 12:57
yash-semantics-0.2.0
Compare
Choose a tag to compare

[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 to Vacancy.
    • EmptyError was renamed to VacantError.
    • EmptyError::state was renamed to VacantError::vacancy.
  • expansion::ErrorCause::EmptyExpansion was renamed to expansion::ErrorCause::VacantExpansion.
  • <expansion::Error as handle::Handle>::handle now returns Divert::Exit
    instead of Divert::Interrupt when the ErrExit 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 uses System::shell_path
    to find the shell executable when it needs to fall back to the shell.
  • trap::run_trap_if_caught now takes a yash_env::signal::Number argument
    instead of a yash_env::trap::Signal.

Fixed

  • A for loop without any words after in now correctly returns an exit status
    of 0 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 the Unset shell option. Previously,
    it would expand to an empty string only if the Unset shell option was on.
  • The parameter expansion of an unset variable with a Length modifier now
    correctly expands to 0 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 raising Divert::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

09 Jun 12:56
yash-env-0.2.0
Compare
Choose a tag to compare

[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 now non_exhaustive.
  • job::fmt::Report has been totally rewritten.
  • system::virtual::FileSystem::get now fails with EACCES 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 of trap::Signal.
  • The following methods now operate on signal::Number instead of trap::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:
    1. &mut self,
    2. op: Option<(SigmaskHow, &[signal::Number])>,
    3. old_mask: Option<&mut Vec<signal::Number>>,
  • system::virtual::SignalEffect::of now takes a signal::Number parameter
    instead of a trap::Signal. This function is now const.
  • 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.
    The Output type of the returned future has been changed from
    semantics::Result to ().

Removed

  • job::ProcessState::{Exited, Signaled, Stopped} in favor of job::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 uses faccessat with
    AT_EACCESS instead of access to check execute permission (except on
    Redox).

0.1.0 β1

09 Jun 13:06
yash-cli-0.1.0-beta.1
Compare
Choose a tag to compare

[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

09 Jun 12:58
yash-builtin-0.2.0
Compare
Choose a tag to compare

[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 an Option<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 the system: &SystemEx argument
    and returns Result<String, Vec<InvalidSignal>> (previously String).
  • kill::Command::Send::signal is now a kill::Signal
    (previously Option<yash_env::trap::Signal>).
  • kill::Command::Send now has a signal_origin: Option<Field> field.
  • kill::Command::Print::signals is now a Vec<kill::Signal>
    (previously Vec<yash_env::trap::Signal>).
  • trap::Command::SetAction::conditions is now a Vec<(CondSpec, Field)>
    (previously Vec<(Condition, Field)>).
  • trap::Command::execute now returns Result<String, Vec<Error>>
    (previously Result<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 a yash_env::signal::Number
    instead of a yash_env::trap::Signal.

Removed

  • kill::syntax::parse_signal_name
  • kill::syntax::parse_signal_name_or_number

yash-semantics-0.1.0

13 Apr 15:12
yash-semantics-0.1.0
Compare
Choose a tag to compare

[0.1.0] - 2024-04-13

Added

  • Initial implementation of the yash-semantics crate

yash-env-0.1.0

13 Apr 15:12
yash-env-0.1.0
Compare
Choose a tag to compare

[0.1.0] - 2024-04-13

Added

  • Initial implementation of the yash-env crate

0.1.0 α1

13 Apr 15:15
yash-cli-0.1.0-alpha.1
Compare
Choose a tag to compare

[0.1.0-alpha.1] - 2024-04-13

Added

  • Initial implementation of the yash-cli crate

yash-builtin-0.1.0

13 Apr 15:13
yash-builtin-0.1.0
Compare
Choose a tag to compare

[0.1.0] - 2024-04-13

Added

  • Initial implementation of the yash-builtin crate

yash-fnmatch-1.1.1

09 Apr 15:25
yash-fnmatch-1.1.1
Compare
Choose a tag to compare

[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