From 90c83b582f2aa1a39986a76d8e8286941a7bbfe6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 14:54:25 -0700 Subject: [PATCH 01/18] Bump `actions/checkout` to v5 (#2864) --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/release.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3bb47911..35d5c813 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -60,7 +60,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 @@ -93,7 +93,7 @@ jobs: runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Remove Broken WSL bash executable if: ${{ matrix.os == 'windows-latest' }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fe02d8b3..6420df8e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -72,7 +72,7 @@ jobs: - prerelease steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install AArch64 Toolchain if: ${{ matrix.target == 'aarch64-unknown-linux-musl' }} @@ -178,7 +178,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: Swatinem/rust-cache@v2 From 4287f43c128ea4e274e969ac6dde09788c0a3096 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 28 Aug 2025 13:15:40 -0700 Subject: [PATCH 02/18] Don not ascend above `--ceiling` when looking for justfile (#2870) --- src/config.rs | 11 +++++++ src/search.rs | 54 +++++++++++++++++++----------- src/subcommand.rs | 16 +++++++-- tests/ceiling.rs | 84 +++++++++++++++++++++++++++++++++++++++++++++++ tests/lib.rs | 1 + tests/test.rs | 1 - 6 files changed, 144 insertions(+), 23 deletions(-) create mode 100644 tests/ceiling.rs diff --git a/src/config.rs b/src/config.rs index 3650e9d6..6a64d907 100644 --- a/src/config.rs +++ b/src/config.rs @@ -14,6 +14,7 @@ use { pub(crate) struct Config { pub(crate) alias_style: AliasStyle, pub(crate) allow_missing: bool, + pub(crate) ceiling: Option, pub(crate) check: bool, pub(crate) color: Color, pub(crate) command_color: Option, @@ -92,6 +93,7 @@ mod arg { pub(crate) const ALIAS_STYLE: &str = "ALIAS_STYLE"; pub(crate) const ALLOW_MISSING: &str = "ALLOW-MISSING"; pub(crate) const ARGUMENTS: &str = "ARGUMENTS"; + pub(crate) const CEILING: &str = "CEILING"; pub(crate) const CHECK: &str = "CHECK"; pub(crate) const CHOOSER: &str = "CHOOSER"; pub(crate) const CLEAR_SHELL_ARGS: &str = "CLEAR-SHELL-ARGS"; @@ -161,6 +163,14 @@ impl Config { .help("Set list command alias display style") .conflicts_with(arg::NO_ALIASES), ) + .arg( + Arg::new(arg::CEILING) + .long("ceiling") + .env("JUST_CEILING") + .action(ArgAction::Set) + .value_parser(value_parser!(PathBuf)) + .help("Do not ascend above directory when searching for a justfile."), + ) .arg( Arg::new(arg::CHECK) .long("check") @@ -777,6 +787,7 @@ impl Config { .unwrap() .clone(), allow_missing: matches.get_flag(arg::ALLOW_MISSING), + ceiling: matches.get_one::(arg::CEILING).cloned(), check: matches.get_flag(arg::CHECK), color: (*matches.get_one::(arg::COLOR).unwrap()).into(), command_color: matches diff --git a/src/search.rs b/src/search.rs index b93d6087..c96ce213 100644 --- a/src/search.rs +++ b/src/search.rs @@ -31,14 +31,17 @@ impl Search { /// Find justfile given search configuration and invocation directory pub(crate) fn find( - search_config: &SearchConfig, + ceiling: Option<&Path>, invocation_directory: &Path, + search_config: &SearchConfig, ) -> SearchResult { match search_config { - SearchConfig::FromInvocationDirectory => Self::find_in_directory(invocation_directory), + SearchConfig::FromInvocationDirectory => { + Self::find_in_directory(ceiling, invocation_directory) + } SearchConfig::FromSearchDirectory { search_directory } => { let search_directory = Self::clean(invocation_directory, search_directory); - let justfile = Self::justfile(&search_directory)?; + let justfile = Self::justfile(ceiling, &search_directory)?; let working_directory = Self::working_directory_from_justfile(&justfile)?; Ok(Self { justfile, @@ -47,7 +50,7 @@ impl Search { } SearchConfig::GlobalJustfile => Ok(Self { justfile: Self::find_global_justfile()?, - working_directory: Self::project_root(invocation_directory)?, + working_directory: Self::project_root(ceiling, invocation_directory)?, }), SearchConfig::WithJustfile { justfile } => { let justfile = Self::clean(invocation_directory, justfile); @@ -88,7 +91,7 @@ impl Search { } /// Find justfile starting from parent directory of current justfile - pub(crate) fn search_parent_directory(&self) -> SearchResult { + pub(crate) fn search_parent_directory(&self, ceiling: Option<&Path>) -> SearchResult { let parent = self .justfile .parent() @@ -96,12 +99,12 @@ impl Search { .ok_or_else(|| SearchError::JustfileHadNoParent { path: self.justfile.clone(), })?; - Self::find_in_directory(parent) + Self::find_in_directory(ceiling, parent) } /// Find justfile starting in given directory searching upwards in directory tree - fn find_in_directory(starting_dir: &Path) -> SearchResult { - let justfile = Self::justfile(starting_dir)?; + fn find_in_directory(ceiling: Option<&Path>, starting_dir: &Path) -> SearchResult { + let justfile = Self::justfile(ceiling, starting_dir)?; let working_directory = Self::working_directory_from_justfile(&justfile)?; Ok(Self { justfile, @@ -113,10 +116,11 @@ impl Search { pub(crate) fn init( search_config: &SearchConfig, invocation_directory: &Path, + ceiling: Option<&Path>, ) -> SearchResult { match search_config { SearchConfig::FromInvocationDirectory => { - let working_directory = Self::project_root(invocation_directory)?; + let working_directory = Self::project_root(ceiling, invocation_directory)?; let justfile = working_directory.join(DEFAULT_JUSTFILE_NAME); Ok(Self { justfile, @@ -125,7 +129,7 @@ impl Search { } SearchConfig::FromSearchDirectory { search_directory } => { let search_directory = Self::clean(invocation_directory, search_directory); - let working_directory = Self::project_root(&search_directory)?; + let working_directory = Self::project_root(ceiling, &search_directory)?; let justfile = working_directory.join(DEFAULT_JUSTFILE_NAME); Ok(Self { justfile, @@ -153,7 +157,7 @@ impl Search { /// Search upwards from `directory` for a file whose name matches one of /// `JUSTFILE_NAMES` - fn justfile(directory: &Path) -> SearchResult { + fn justfile(ceiling: Option<&Path>, directory: &Path) -> SearchResult { for directory in directory.ancestors() { let mut candidates = BTreeSet::new(); @@ -181,6 +185,12 @@ impl Search { 1 => return Ok(candidates.into_iter().next().unwrap()), _ => return Err(SearchError::MultipleCandidates { candidates }), } + + if let Some(ceiling) = ceiling { + if directory == ceiling { + break; + } + } } Err(SearchError::NotFound) @@ -207,7 +217,7 @@ impl Search { /// Search upwards from `directory` for the root directory of a software /// project, as determined by the presence of one of the version control /// system directories given in `PROJECT_ROOT_CHILDREN` - fn project_root(directory: &Path) -> SearchResult { + fn project_root(ceiling: Option<&Path>, directory: &Path) -> SearchResult { for directory in directory.ancestors() { let entries = fs::read_dir(directory).map_err(|io_error| SearchError::Io { io_error, @@ -225,6 +235,12 @@ impl Search { } } } + + if let Some(ceiling) = ceiling { + if directory == ceiling { + break; + } + } } Ok(directory.to_owned()) @@ -250,7 +266,7 @@ mod tests { #[test] fn not_found() { let tmp = testing::tempdir(); - match Search::justfile(tmp.path()) { + match Search::justfile(None, tmp.path()) { Err(SearchError::NotFound) => {} _ => panic!("No justfile found error was expected"), } @@ -270,7 +286,7 @@ mod tests { } fs::write(&path, "default:\n\techo ok").unwrap(); path.pop(); - match Search::justfile(path.as_path()) { + match Search::justfile(None, path.as_path()) { Err(SearchError::MultipleCandidates { .. }) => {} _ => panic!("Multiple candidates error was expected"), } @@ -283,7 +299,7 @@ mod tests { path.push(DEFAULT_JUSTFILE_NAME); fs::write(&path, "default:\n\techo ok").unwrap(); path.pop(); - if let Err(err) = Search::justfile(path.as_path()) { + if let Err(err) = Search::justfile(None, path.as_path()) { panic!("No errors were expected: {err}"); } } @@ -306,7 +322,7 @@ mod tests { path.push(spongebob_case); fs::write(&path, "default:\n\techo ok").unwrap(); path.pop(); - if let Err(err) = Search::justfile(path.as_path()) { + if let Err(err) = Search::justfile(None, path.as_path()) { panic!("No errors were expected: {err}"); } } @@ -322,7 +338,7 @@ mod tests { fs::create_dir(&path).expect("test justfile search: failed to create intermediary directory"); path.push("b"); fs::create_dir(&path).expect("test justfile search: failed to create intermediary directory"); - if let Err(err) = Search::justfile(path.as_path()) { + if let Err(err) = Search::justfile(None, path.as_path()) { panic!("No errors were expected: {err}"); } } @@ -341,7 +357,7 @@ mod tests { path.pop(); path.push("b"); fs::create_dir(&path).expect("test justfile search: failed to create intermediary directory"); - match Search::justfile(path.as_path()) { + match Search::justfile(None, path.as_path()) { Ok(found_path) => { path.pop(); path.push(DEFAULT_JUSTFILE_NAME); @@ -370,7 +386,7 @@ mod tests { let search_config = SearchConfig::FromInvocationDirectory; - let search = Search::find(&search_config, &sub).unwrap(); + let search = Search::find(None, &sub, &search_config).unwrap(); assert_eq!(search.justfile, justfile); assert_eq!(search.working_directory, sub); diff --git a/src/subcommand.rs b/src/subcommand.rs index c2e19dea..72c7907a 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -70,7 +70,11 @@ impl Subcommand { _ => {} } - let search = Search::find(&config.search_config, &config.invocation_directory)?; + let search = Search::find( + config.ceiling.as_deref(), + &config.invocation_directory, + &config.search_config, + )?; if let Edit = self { return Self::edit(&search); @@ -132,7 +136,9 @@ impl Subcommand { if fallback { if let Err(err @ (Error::UnknownRecipe { .. } | Error::UnknownSubmodule { .. })) = result { - search = search.search_parent_directory().map_err(|_| err)?; + search = search + .search_parent_directory(config.ceiling.as_deref()) + .map_err(|_| err)?; if config.verbosity.loquacious() { eprintln!( @@ -366,7 +372,11 @@ impl Subcommand { } fn init(config: &Config) -> RunResult<'static> { - let search = Search::init(&config.search_config, &config.invocation_directory)?; + let search = Search::init( + &config.search_config, + &config.invocation_directory, + config.ceiling.as_deref(), + )?; if search.justfile.is_file() { return Err(Error::InitExists { diff --git a/tests/ceiling.rs b/tests/ceiling.rs new file mode 100644 index 00000000..a6925175 --- /dev/null +++ b/tests/ceiling.rs @@ -0,0 +1,84 @@ +use super::*; + +#[test] +fn justfile_run_search_stops_at_ceiling_dir() { + let tempdir = tempdir(); + + let ceiling = tempdir.path().join("foo"); + + fs::create_dir(&ceiling).unwrap(); + + #[cfg(not(windows))] + let ceiling = ceiling.canonicalize().unwrap(); + + Test::with_tempdir(tempdir) + .justfile( + " + foo: + echo bar + ", + ) + .create_dir("foo/bar") + .current_dir("foo/bar") + .args(["--ceiling", ceiling.to_str().unwrap()]) + .stderr("error: No justfile found\n") + .status(EXIT_FAILURE) + .run(); +} + +#[test] +fn ceiling_can_be_passed_as_environment_variable() { + let tempdir = tempdir(); + + let ceiling = tempdir.path().join("foo"); + + fs::create_dir(&ceiling).unwrap(); + + #[cfg(not(windows))] + let ceiling = ceiling.canonicalize().unwrap(); + + Test::with_tempdir(tempdir) + .justfile( + " + foo: + echo bar + ", + ) + .create_dir("foo/bar") + .current_dir("foo/bar") + .env("JUST_CEILING", ceiling.to_str().unwrap()) + .stderr("error: No justfile found\n") + .status(EXIT_FAILURE) + .run(); +} + +#[test] +fn justfile_init_search_stops_at_ceiling_dir() { + let tempdir = tempdir(); + + let ceiling = tempdir.path().join("foo"); + + fs::create_dir(&ceiling).unwrap(); + + #[cfg(not(windows))] + let ceiling = ceiling.canonicalize().unwrap(); + + let Output { tempdir, .. } = Test::with_tempdir(tempdir) + .no_justfile() + .test_round_trip(false) + .create_dir(".git") + .create_dir("foo/bar") + .current_dir("foo/bar") + .args(["--init", "--ceiling", ceiling.to_str().unwrap()]) + .stderr_regex(if cfg!(windows) { + r"Wrote justfile to `.*\\foo\\bar\\justfile`\n" + } else { + "Wrote justfile to `.*/foo/bar/justfile`\n" + }) + .run(); + + assert_eq!( + fs::read_to_string(tempdir.path().join("foo/bar/justfile")).unwrap(), + just::INIT_JUSTFILE + ); +} diff --git a/tests/lib.rs b/tests/lib.rs index 229949bc..daae4f5a 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -52,6 +52,7 @@ mod assignment; mod attributes; mod backticks; mod byte_order_mark; +mod ceiling; mod changelog; mod choose; mod command; diff --git a/tests/test.rs b/tests/test.rs index a9732127..74da6406 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -147,7 +147,6 @@ impl Test { self } - #[allow(unused)] pub(crate) fn test_round_trip(mut self, test_round_trip: bool) -> Self { self.test_round_trip = test_round_trip; self From f5ffec5c74bd9e290d6539d5dc28cdea34b210f2 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 3 Sep 2025 11:39:44 -0700 Subject: [PATCH 03/18] Add submodule alias and dependency targets to grammar (#2877) --- GRAMMAR.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GRAMMAR.md b/GRAMMAR.md index 7dadfa1f..e29e999c 100644 --- a/GRAMMAR.md +++ b/GRAMMAR.md @@ -55,7 +55,9 @@ item : alias eol : NEWLINE | COMMENT NEWLINE -alias : 'alias' NAME ':=' NAME eol +alias : 'alias' NAME ':=' target eol + +target : NAME ('::' NAME)* assignment : NAME ':=' expression eol @@ -138,8 +140,8 @@ variadic : '*' parameter dependencies : dependency* ('&&' dependency+)? -dependency : NAME - | '(' NAME expression* ')' +dependency : target + | '(' target expression* ')' body : INDENT line+ DEDENT From 9a1119cf0b765a71f6c2b4599596c8f1644ca603 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 3 Sep 2025 14:27:55 -0700 Subject: [PATCH 04/18] Add `[default]` attribute (#2878) --- README.md | 10 ++++++--- src/analyzer.rs | 37 ++++++++++++++++++++++++--------- src/attribute.rs | 6 +++++- src/compile_error.rs | 4 ++++ src/compile_error_kind.rs | 3 +++ tests/default.rs | 43 +++++++++++++++++++++++++++++++++++++++ tests/lib.rs | 1 + 7 files changed, 90 insertions(+), 14 deletions(-) create mode 100644 tests/default.rs diff --git a/README.md b/README.md index e8eb736e..4992661c 100644 --- a/README.md +++ b/README.md @@ -723,9 +723,12 @@ Features ### The Default Recipe -When `just` is invoked without a recipe, it runs the first recipe in the -`justfile`. This recipe might be the most frequently run command in the -project, like running the tests: +When `just` is invoked without a recipe, it runs the recipe with the +`[default]` attribute, or the first recipe in the `justfile` if no recipe has +the `[default]` attribute. + +This recipe might be the most frequently run command in the project, like +running the tests: ```just test: @@ -2107,6 +2110,7 @@ change their behavior. |------|------|-------------| | `[confirm]`1.17.0 | recipe | Require confirmation prior to executing recipe. | | `[confirm(PROMPT)]`1.23.0 | recipe | Require confirmation prior to executing recipe with a custom prompt. | +| `[default]`master | recipe | Use recipe as module's default recipe. | | `[doc(DOC)]`1.27.0 | module, recipe | Set recipe or module's [documentation comment](#documentation-comments) to `DOC`. | | `[extension(EXT)]`1.32.0 | recipe | Set shebang recipe script's file extension to `EXT`. `EXT` should include a period if one is desired. | | `[group(NAME)]`1.27.0 | module, recipe | Put recipe or module in in [group](#groups) `NAME`. | diff --git a/src/analyzer.rs b/src/analyzer.rs index 81d61e51..70abef9b 100644 --- a/src/analyzer.rs +++ b/src/analyzer.rs @@ -94,7 +94,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { } Item::Unexport { name } => { if !self.unexports.insert(name.lexeme().to_string()) { - return Err(name.token.error(DuplicateUnexport { + return Err(name.error(DuplicateUnexport { variable: name.lexeme(), })); } @@ -112,7 +112,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { let variable = assignment.name.lexeme(); if !settings.allow_duplicate_variables && assignments.contains_key(variable) { - return Err(assignment.name.token.error(DuplicateVariable { variable })); + return Err(assignment.name.error(DuplicateVariable { variable })); } if assignments.get(variable).map_or(true, |original| { @@ -122,7 +122,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { } if self.unexports.contains(variable) { - return Err(assignment.name.token.error(ExportUnexported { variable })); + return Err(assignment.name.error(ExportUnexported { variable })); } } @@ -172,10 +172,21 @@ impl<'run, 'src> Analyzer<'run, 'src> { let source = root.to_owned(); let root = paths.get(root).unwrap(); - Ok(Justfile { - aliases, - assignments, - default: recipes + let mut default = None; + for recipe in recipes.values() { + if recipe.attributes.contains(AttributeDiscriminant::Default) { + if default.is_some() { + return Err(recipe.name.error(CompileErrorKind::DuplicateDefault { + recipe: recipe.name.lexeme(), + })); + } + + default = Some(Arc::clone(recipe)); + } + } + + let default = default.or_else(|| { + recipes .values() .filter(|recipe| recipe.name.path == root) .fold(None, |accumulator, next| match accumulator { @@ -185,7 +196,13 @@ impl<'run, 'src> Analyzer<'run, 'src> { } else { Arc::clone(next) }), - }), + }) + }); + + Ok(Justfile { + aliases, + assignments, + default, doc: doc.filter(|doc| !doc.is_empty()), groups: groups.into(), loaded: loaded.into(), @@ -236,7 +253,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { for parameter in &recipe.parameters { if parameters.contains(parameter.name.lexeme()) { - return Err(parameter.name.token.error(DuplicateParameter { + return Err(parameter.name.error(DuplicateParameter { recipe: recipe.name.lexeme(), parameter: parameter.name.lexeme(), })); @@ -304,7 +321,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { ) -> CompileResult<'src, Alias<'src>> { match Self::resolve_recipe(&alias.target, modules, recipes) { Some(target) => Ok(alias.resolve(target)), - None => Err(alias.name.token.error(UnknownAliasTarget { + None => Err(alias.name.error(UnknownAliasTarget { alias: alias.name.lexeme(), target: alias.target, })), diff --git a/src/attribute.rs b/src/attribute.rs index 9fa37aa6..e37f1f51 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -10,6 +10,7 @@ use super::*; #[strum_discriminants(strum(serialize_all = "kebab-case"))] pub(crate) enum Attribute<'src> { Confirm(Option>), + Default, Doc(Option>), ExitMessage, Extension(StringLiteral<'src>), @@ -34,7 +35,8 @@ impl AttributeDiscriminant { fn argument_range(self) -> RangeInclusive { match self { Self::Confirm | Self::Doc => 0..=1, - Self::ExitMessage + Self::Default + | Self::ExitMessage | Self::Linux | Self::Macos | Self::NoCd @@ -83,6 +85,7 @@ impl<'src> Attribute<'src> { Ok(match discriminant { AttributeDiscriminant::Confirm => Self::Confirm(arguments.into_iter().next()), + AttributeDiscriminant::Default => Self::Default, AttributeDiscriminant::Doc => Self::Doc(arguments.into_iter().next()), AttributeDiscriminant::ExitMessage => Self::ExitMessage, AttributeDiscriminant::Extension => Self::Extension(arguments.into_iter().next().unwrap()), @@ -131,6 +134,7 @@ impl Display for Attribute<'_> { match self { Self::Confirm(None) + | Self::Default | Self::Doc(None) | Self::ExitMessage | Self::Linux diff --git a/src/compile_error.rs b/src/compile_error.rs index 750d72f5..50b2c6c6 100644 --- a/src/compile_error.rs +++ b/src/compile_error.rs @@ -103,6 +103,10 @@ impl Display for CompileError<'_> { first.ordinal(), self.token.line.ordinal(), ), + DuplicateDefault { recipe } => write!( + f, + "Recipe `{recipe}` has duplicate `[default]` attribute, which may only appear once per module", + ), DuplicateParameter { recipe, parameter } => { write!(f, "Recipe `{recipe}` has duplicate parameter `{parameter}`") } diff --git a/src/compile_error_kind.rs b/src/compile_error_kind.rs index 213b2812..81b1a67a 100644 --- a/src/compile_error_kind.rs +++ b/src/compile_error_kind.rs @@ -27,6 +27,9 @@ pub(crate) enum CompileErrorKind<'src> { attribute: &'src str, first: usize, }, + DuplicateDefault { + recipe: &'src str, + }, DuplicateParameter { recipe: &'src str, parameter: &'src str, diff --git a/tests/default.rs b/tests/default.rs new file mode 100644 index 00000000..398751b2 --- /dev/null +++ b/tests/default.rs @@ -0,0 +1,43 @@ +use super::*; + +#[test] +fn default_attribute_overrides_first_recipe() { + Test::new() + .justfile( + " + foo: + @echo FOO + + [default] + bar: + @echo BAR + ", + ) + .stdout("BAR\n") + .run(); +} + +#[test] +fn default_attribute_may_only_appear_once_per_justfile() { + Test::new() + .justfile( + " + [default] + foo: + + [default] + bar: + ", + ) + .stderr( + " + error: Recipe `foo` has duplicate `[default]` attribute, which may only appear once per module + ——▶ justfile:2:1 + │ + 2 │ foo: + │ ^^^ + " + ) + .status(EXIT_FAILURE) + .run(); +} diff --git a/tests/lib.rs b/tests/lib.rs index daae4f5a..450ac295 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -61,6 +61,7 @@ mod conditional; mod confirm; mod constants; mod datetime; +mod default; mod delimiters; mod dependencies; mod directories; From 5434a0a8ccf9a882a4a2b99e6b1af0548d2dc522 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:49:58 -0700 Subject: [PATCH 05/18] Update `softprops/action-gh-release` to 2.3.3 (#2879) --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6420df8e..8e6ab4b3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -113,7 +113,7 @@ jobs: shell: bash - name: Publish Archive - uses: softprops/action-gh-release@v2.3.2 + uses: softprops/action-gh-release@v2.3.3 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: false @@ -123,7 +123,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Changelog - uses: softprops/action-gh-release@v2.3.2 + uses: softprops/action-gh-release@v2.3.3 if: >- ${{ startsWith(github.ref, 'refs/tags/') @@ -160,7 +160,7 @@ jobs: shasum -a 256 * > ../SHA256SUMS - name: Publish Checksums - uses: softprops/action-gh-release@v2.3.2 + uses: softprops/action-gh-release@v2.3.3 with: draft: false files: SHA256SUMS From 6b0aa105aed7ae0e867c25425d9f2d38d64e6911 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 27 Sep 2025 13:41:25 -0700 Subject: [PATCH 06/18] Don't generate completions at runtime (#2896) --- .github/workflows/release.yaml | 6 +- Cargo.toml | 2 +- completions/just.bash | 185 ++++++++++++++++++++++++ completions/just.elvish | 93 ++++++++++++ completions/just.fish | 86 +++++++++++ completions/just.nu | 8 ++ completions/just.powershell | 119 +++++++++++++++ completions/just.zsh | 180 +++++++++++++++++++++++ src/completions.rs | 256 +++++++++++++++++---------------- src/error.rs | 6 - src/lib.rs | 4 +- src/signals.rs | 1 + src/subcommand.rs | 10 +- 13 files changed, 814 insertions(+), 142 deletions(-) create mode 100644 completions/just.bash create mode 100644 completions/just.elvish create mode 100644 completions/just.fish create mode 100644 completions/just.nu create mode 100644 completions/just.powershell create mode 100644 completions/just.zsh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8e6ab4b3..990a17e4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -91,14 +91,10 @@ jobs: run: | rustup target add aarch64-pc-windows-msvc - - name: Generate Completion Scripts and Manpage + - name: Generate Manpage run: | set -euxo pipefail cargo build - mkdir -p completions - for shell in bash elvish fish nu powershell zsh; do - ./target/debug/just --completions $shell > completions/just.$shell - done mkdir -p man ./target/debug/just --man > man/just.1 diff --git a/Cargo.toml b/Cargo.toml index 6394169f..545a4c47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ blake3 = { version = "1.5.0", features = ["rayon", "mmap"] } camino = "1.0.4" chrono = "0.4.38" clap = { version = "4.0.0", features = ["derive", "env", "wrap_help"] } -clap_complete = "=4.5.48" clap_mangen = "0.2.20" ctrlc = { version = "3.1.1", features = ["termination"] } derive-where = "1.2.7" @@ -61,6 +60,7 @@ nix = { version = "0.30.1", features = ["user"] } ctrlc = { version = "3.1.1", features = ["termination"] } [dev-dependencies] +clap_complete = "=4.5.48" executable-path = "1.0.0" pretty_assertions = "1.0.0" temptree = "0.2.0" diff --git a/completions/just.bash b/completions/just.bash new file mode 100644 index 00000000..51e630c8 --- /dev/null +++ b/completions/just.bash @@ -0,0 +1,185 @@ +_just() { + local i cur prev words cword opts cmd + COMPREPLY=() + + # Modules use "::" as the separator, which is considered a wordbreak character in bash. + # The _get_comp_words_by_ref function is a hack to allow for exceptions to this rule without + # modifying the global COMP_WORDBREAKS environment variable. + if type _get_comp_words_by_ref &>/dev/null; then + _get_comp_words_by_ref -n : cur prev words cword + else + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + words=$COMP_WORDS + cword=$COMP_CWORD + fi + + cmd="" + opts="" + + for i in ${words[@]} + do + case "${cmd},${i}" in + ",$1") + cmd="just" + ;; + *) + ;; + esac + done + + case "${cmd}" in + just) + opts="-E -n -g -f -q -u -v -d -c -e -l -s -h -V --alias-style --ceiling --check --chooser --clear-shell-args --color --command-color --cygpath --dotenv-filename --dotenv-path --dry-run --dump-format --explain --global-justfile --highlight --justfile --list-heading --list-prefix --list-submodules --no-aliases --no-deps --no-dotenv --no-highlight --one --quiet --allow-missing --set --shell --shell-arg --shell-command --tempdir --timestamp --timestamp-format --unsorted --unstable --verbose --working-directory --yes --changelog --choose --command --completions --dump --edit --evaluate --fmt --groups --init --list --man --request --show --summary --variables --help --version [ARGUMENTS]..." + if [[ ${cur} == -* ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + else + local recipes=$(just --summary 2> /dev/null) + + if echo "${cur}" | \grep -qF '/'; then + local path_prefix=$(echo "${cur}" | sed 's/[/][^/]*$/\//') + local recipes=$(just --summary 2> /dev/null -- "${path_prefix}") + local recipes=$(printf "${path_prefix}%s\t" $recipes) + fi + + if [[ $? -eq 0 ]]; then + COMPREPLY=( $(compgen -W "${recipes}" -- "${cur}") ) + if type __ltrim_colon_completions &>/dev/null; then + __ltrim_colon_completions "$cur" + fi + return 0 + fi + fi + case "${prev}" in + --alias-style) + COMPREPLY=($(compgen -W "left right separate" -- "${cur}")) + return 0 + ;; + --ceiling) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --chooser) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --color) + COMPREPLY=($(compgen -W "always auto never" -- "${cur}")) + return 0 + ;; + --command-color) + COMPREPLY=($(compgen -W "black blue cyan green purple red yellow" -- "${cur}")) + return 0 + ;; + --cygpath) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --dotenv-filename) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --dotenv-path) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -E) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --dump-format) + COMPREPLY=($(compgen -W "json just" -- "${cur}")) + return 0 + ;; + --justfile) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -f) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --list-heading) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --list-prefix) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --set) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --shell-arg) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --tempdir) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --timestamp-format) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --working-directory) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -d) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --command) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -c) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --completions) + COMPREPLY=($(compgen -W "bash elvish fish nushell powershell zsh" -- "${cur}")) + return 0 + ;; + --list) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -l) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --request) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + --show) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + -s) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; + esac +} + +if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then + complete -F _just -o nosort -o bashdefault -o default just +else + complete -F _just -o bashdefault -o default just +fi diff --git a/completions/just.elvish b/completions/just.elvish new file mode 100644 index 00000000..b2efa8ed --- /dev/null +++ b/completions/just.elvish @@ -0,0 +1,93 @@ +use builtin; +use str; + +set edit:completion:arg-completer[just] = {|@words| + fn spaces {|n| + builtin:repeat $n ' ' | str:join '' + } + fn cand {|text desc| + edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc + } + var command = 'just' + for word $words[1..-1] { + if (str:has-prefix $word '-') { + break + } + set command = $command';'$word + } + var completions = [ + &'just'= { + cand --alias-style 'Set list command alias display style' + cand --ceiling 'Do not ascend above directory when searching for a justfile.' + cand --chooser 'Override binary invoked by `--choose`' + cand --color 'Print colorful output' + cand --command-color 'Echo recipe lines in ' + cand --cygpath 'Use binary at to convert between unix and Windows paths.' + cand --dotenv-filename 'Search for environment file named instead of `.env`' + cand -E 'Load as environment file instead of searching for one' + cand --dotenv-path 'Load as environment file instead of searching for one' + cand --dump-format 'Dump justfile as ' + cand -f 'Use as justfile' + cand --justfile 'Use as justfile' + cand --list-heading 'Print before list' + cand --list-prefix 'Print before each list item' + cand --set 'Override with ' + cand --shell 'Invoke to run recipes' + cand --shell-arg 'Invoke shell with as an argument' + cand --tempdir 'Save temporary files to .' + cand --timestamp-format 'Timestamp format string' + cand -d 'Use as working directory. --justfile must also be set' + cand --working-directory 'Use as working directory. --justfile must also be set' + cand -c 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set' + cand --command 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set' + cand --completions 'Print shell completion script for ' + cand -l 'List available recipes in or root if omitted' + cand --list 'List available recipes in or root if omitted' + cand --request 'Execute . For internal testing purposes only. May be changed or removed at any time.' + cand -s 'Show recipe at ' + cand --show 'Show recipe at ' + cand --check 'Run `--fmt` in ''check'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.' + cand --clear-shell-args 'Clear shell arguments' + cand -n 'Print what just would do without doing it' + cand --dry-run 'Print what just would do without doing it' + cand --explain 'Print recipe doc comment before running it' + cand -g 'Use global justfile' + cand --global-justfile 'Use global justfile' + cand --highlight 'Highlight echoed recipe lines in bold' + cand --list-submodules 'List recipes in submodules' + cand --no-aliases 'Don''t show aliases in list' + cand --no-deps 'Don''t run recipe dependencies' + cand --no-dotenv 'Don''t load `.env` file' + cand --no-highlight 'Don''t highlight echoed recipe lines in bold' + cand --one 'Forbid multiple recipes from being invoked on the command line' + cand -q 'Suppress all output' + cand --quiet 'Suppress all output' + cand --allow-missing 'Ignore missing recipe and module errors' + cand --shell-command 'Invoke with the shell used to run recipe lines and backticks' + cand --timestamp 'Print recipe command timestamps' + cand -u 'Return list and summary entries in source order' + cand --unsorted 'Return list and summary entries in source order' + cand --unstable 'Enable unstable features' + cand -v 'Use verbose output' + cand --verbose 'Use verbose output' + cand --yes 'Automatically confirm all recipes.' + cand --changelog 'Print changelog' + cand --choose 'Select one or more recipes to run using a binary chooser. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`' + cand --dump 'Print justfile' + cand -e 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' + cand --edit 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' + cand --evaluate 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.' + cand --fmt 'Format and overwrite justfile' + cand --groups 'List recipe groups' + cand --init 'Initialize new justfile in project root' + cand --man 'Print man page' + cand --summary 'List names of available recipes' + cand --variables 'List names of variables' + cand -h 'Print help' + cand --help 'Print help' + cand -V 'Print version' + cand --version 'Print version' + } + ] + $completions[$command] +} diff --git a/completions/just.fish b/completions/just.fish new file mode 100644 index 00000000..f1202115 --- /dev/null +++ b/completions/just.fish @@ -0,0 +1,86 @@ +function __fish_just_complete_recipes + if string match -rq '(-f|--justfile)\s*=?(?[^\s]+)' -- (string split -- ' -- ' (commandline -pc))[1] + set -fx JUST_JUSTFILE "$justfile" + end + printf "%s\n" (string split " " (just --summary)) +end + +# don't suggest files right off +complete -c just -n "__fish_is_first_arg" --no-files + +# complete recipes +complete -c just -a '(__fish_just_complete_recipes)' + +# autogenerated completions +complete -c just -l alias-style -d 'Set list command alias display style' -r -f -a "left\t'' +right\t'' +separate\t''" +complete -c just -l ceiling -d 'Do not ascend above directory when searching for a justfile.' -r -F +complete -c just -l chooser -d 'Override binary invoked by `--choose`' -r +complete -c just -l color -d 'Print colorful output' -r -f -a "always\t'' +auto\t'' +never\t''" +complete -c just -l command-color -d 'Echo recipe lines in ' -r -f -a "black\t'' +blue\t'' +cyan\t'' +green\t'' +purple\t'' +red\t'' +yellow\t''" +complete -c just -l cygpath -d 'Use binary at to convert between unix and Windows paths.' -r -F +complete -c just -l dotenv-filename -d 'Search for environment file named instead of `.env`' -r +complete -c just -s E -l dotenv-path -d 'Load as environment file instead of searching for one' -r -F +complete -c just -l dump-format -d 'Dump justfile as ' -r -f -a "json\t'' +just\t''" +complete -c just -s f -l justfile -d 'Use as justfile' -r -F +complete -c just -l list-heading -d 'Print before list' -r +complete -c just -l list-prefix -d 'Print before each list item' -r +complete -c just -l set -d 'Override with ' -r +complete -c just -l shell -d 'Invoke to run recipes' -r +complete -c just -l shell-arg -d 'Invoke shell with as an argument' -r +complete -c just -l tempdir -d 'Save temporary files to .' -r -F +complete -c just -l timestamp-format -d 'Timestamp format string' -r +complete -c just -s d -l working-directory -d 'Use as working directory. --justfile must also be set' -r -F +complete -c just -s c -l command -d 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set' -r +complete -c just -l completions -d 'Print shell completion script for ' -r -f -a "bash\t'' +elvish\t'' +fish\t'' +nushell\t'' +powershell\t'' +zsh\t''" +complete -c just -s l -l list -d 'List available recipes in or root if omitted' -r +complete -c just -l request -d 'Execute . For internal testing purposes only. May be changed or removed at any time.' -r +complete -c just -s s -l show -d 'Show recipe at ' -r +complete -c just -l check -d 'Run `--fmt` in \'check\' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.' +complete -c just -l clear-shell-args -d 'Clear shell arguments' +complete -c just -s n -l dry-run -d 'Print what just would do without doing it' +complete -c just -l explain -d 'Print recipe doc comment before running it' +complete -c just -s g -l global-justfile -d 'Use global justfile' +complete -c just -l highlight -d 'Highlight echoed recipe lines in bold' +complete -c just -l list-submodules -d 'List recipes in submodules' +complete -c just -l no-aliases -d 'Don\'t show aliases in list' +complete -c just -l no-deps -d 'Don\'t run recipe dependencies' +complete -c just -l no-dotenv -d 'Don\'t load `.env` file' +complete -c just -l no-highlight -d 'Don\'t highlight echoed recipe lines in bold' +complete -c just -l one -d 'Forbid multiple recipes from being invoked on the command line' +complete -c just -s q -l quiet -d 'Suppress all output' +complete -c just -l allow-missing -d 'Ignore missing recipe and module errors' +complete -c just -l shell-command -d 'Invoke with the shell used to run recipe lines and backticks' +complete -c just -l timestamp -d 'Print recipe command timestamps' +complete -c just -s u -l unsorted -d 'Return list and summary entries in source order' +complete -c just -l unstable -d 'Enable unstable features' +complete -c just -s v -l verbose -d 'Use verbose output' +complete -c just -l yes -d 'Automatically confirm all recipes.' +complete -c just -l changelog -d 'Print changelog' +complete -c just -l choose -d 'Select one or more recipes to run using a binary chooser. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`' +complete -c just -l dump -d 'Print justfile' +complete -c just -s e -l edit -d 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' +complete -c just -l evaluate -d 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable\'s value.' +complete -c just -l fmt -d 'Format and overwrite justfile' +complete -c just -l groups -d 'List recipe groups' +complete -c just -l init -d 'Initialize new justfile in project root' +complete -c just -l man -d 'Print man page' +complete -c just -l summary -d 'List names of available recipes' +complete -c just -l variables -d 'List names of variables' +complete -c just -s h -l help -d 'Print help' +complete -c just -s V -l version -d 'Print version' diff --git a/completions/just.nu b/completions/just.nu new file mode 100644 index 00000000..ab109108 --- /dev/null +++ b/completions/just.nu @@ -0,0 +1,8 @@ +def "nu-complete just" [] { + (^just --dump --unstable --dump-format json | from json).recipes | transpose recipe data | flatten | where {|row| $row.private == false } | select recipe doc parameters | rename value description +} + +# Just: A Command Runner +export extern "just" [ + ...recipe: string@"nu-complete just", # Recipe(s) to run, may be with argument(s) +] diff --git a/completions/just.powershell b/completions/just.powershell new file mode 100644 index 00000000..93455524 --- /dev/null +++ b/completions/just.powershell @@ -0,0 +1,119 @@ +using namespace System.Management.Automation +using namespace System.Management.Automation.Language + +Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock { + param($wordToComplete, $commandAst, $cursorPosition) + + $commandElements = $commandAst.CommandElements + $command = @( + 'just' + for ($i = 1; $i -lt $commandElements.Count; $i++) { + $element = $commandElements[$i] + if ($element -isnot [StringConstantExpressionAst] -or + $element.StringConstantType -ne [StringConstantType]::BareWord -or + $element.Value.StartsWith('-') -or + $element.Value -eq $wordToComplete) { + break + } + $element.Value + }) -join ';' + + $completions = @(switch ($command) { + 'just' { + [CompletionResult]::new('--alias-style', '--alias-style', [CompletionResultType]::ParameterName, 'Set list command alias display style') + [CompletionResult]::new('--ceiling', '--ceiling', [CompletionResultType]::ParameterName, 'Do not ascend above directory when searching for a justfile.') + [CompletionResult]::new('--chooser', '--chooser', [CompletionResultType]::ParameterName, 'Override binary invoked by `--choose`') + [CompletionResult]::new('--color', '--color', [CompletionResultType]::ParameterName, 'Print colorful output') + [CompletionResult]::new('--command-color', '--command-color', [CompletionResultType]::ParameterName, 'Echo recipe lines in ') + [CompletionResult]::new('--cygpath', '--cygpath', [CompletionResultType]::ParameterName, 'Use binary at to convert between unix and Windows paths.') + [CompletionResult]::new('--dotenv-filename', '--dotenv-filename', [CompletionResultType]::ParameterName, 'Search for environment file named instead of `.env`') + [CompletionResult]::new('-E', '-E ', [CompletionResultType]::ParameterName, 'Load as environment file instead of searching for one') + [CompletionResult]::new('--dotenv-path', '--dotenv-path', [CompletionResultType]::ParameterName, 'Load as environment file instead of searching for one') + [CompletionResult]::new('--dump-format', '--dump-format', [CompletionResultType]::ParameterName, 'Dump justfile as ') + [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Use as justfile') + [CompletionResult]::new('--justfile', '--justfile', [CompletionResultType]::ParameterName, 'Use as justfile') + [CompletionResult]::new('--list-heading', '--list-heading', [CompletionResultType]::ParameterName, 'Print before list') + [CompletionResult]::new('--list-prefix', '--list-prefix', [CompletionResultType]::ParameterName, 'Print before each list item') + [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'Override with ') + [CompletionResult]::new('--shell', '--shell', [CompletionResultType]::ParameterName, 'Invoke to run recipes') + [CompletionResult]::new('--shell-arg', '--shell-arg', [CompletionResultType]::ParameterName, 'Invoke shell with as an argument') + [CompletionResult]::new('--tempdir', '--tempdir', [CompletionResultType]::ParameterName, 'Save temporary files to .') + [CompletionResult]::new('--timestamp-format', '--timestamp-format', [CompletionResultType]::ParameterName, 'Timestamp format string') + [CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Use as working directory. --justfile must also be set') + [CompletionResult]::new('--working-directory', '--working-directory', [CompletionResultType]::ParameterName, 'Use as working directory. --justfile must also be set') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set') + [CompletionResult]::new('--command', '--command', [CompletionResultType]::ParameterName, 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set') + [CompletionResult]::new('--completions', '--completions', [CompletionResultType]::ParameterName, 'Print shell completion script for ') + [CompletionResult]::new('-l', '-l', [CompletionResultType]::ParameterName, 'List available recipes in or root if omitted') + [CompletionResult]::new('--list', '--list', [CompletionResultType]::ParameterName, 'List available recipes in or root if omitted') + [CompletionResult]::new('--request', '--request', [CompletionResultType]::ParameterName, 'Execute . For internal testing purposes only. May be changed or removed at any time.') + [CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Show recipe at ') + [CompletionResult]::new('--show', '--show', [CompletionResultType]::ParameterName, 'Show recipe at ') + [CompletionResult]::new('--check', '--check', [CompletionResultType]::ParameterName, 'Run `--fmt` in ''check'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.') + [CompletionResult]::new('--clear-shell-args', '--clear-shell-args', [CompletionResultType]::ParameterName, 'Clear shell arguments') + [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Print what just would do without doing it') + [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Print what just would do without doing it') + [CompletionResult]::new('--explain', '--explain', [CompletionResultType]::ParameterName, 'Print recipe doc comment before running it') + [CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'Use global justfile') + [CompletionResult]::new('--global-justfile', '--global-justfile', [CompletionResultType]::ParameterName, 'Use global justfile') + [CompletionResult]::new('--highlight', '--highlight', [CompletionResultType]::ParameterName, 'Highlight echoed recipe lines in bold') + [CompletionResult]::new('--list-submodules', '--list-submodules', [CompletionResultType]::ParameterName, 'List recipes in submodules') + [CompletionResult]::new('--no-aliases', '--no-aliases', [CompletionResultType]::ParameterName, 'Don''t show aliases in list') + [CompletionResult]::new('--no-deps', '--no-deps', [CompletionResultType]::ParameterName, 'Don''t run recipe dependencies') + [CompletionResult]::new('--no-dotenv', '--no-dotenv', [CompletionResultType]::ParameterName, 'Don''t load `.env` file') + [CompletionResult]::new('--no-highlight', '--no-highlight', [CompletionResultType]::ParameterName, 'Don''t highlight echoed recipe lines in bold') + [CompletionResult]::new('--one', '--one', [CompletionResultType]::ParameterName, 'Forbid multiple recipes from being invoked on the command line') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Suppress all output') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Suppress all output') + [CompletionResult]::new('--allow-missing', '--allow-missing', [CompletionResultType]::ParameterName, 'Ignore missing recipe and module errors') + [CompletionResult]::new('--shell-command', '--shell-command', [CompletionResultType]::ParameterName, 'Invoke with the shell used to run recipe lines and backticks') + [CompletionResult]::new('--timestamp', '--timestamp', [CompletionResultType]::ParameterName, 'Print recipe command timestamps') + [CompletionResult]::new('-u', '-u', [CompletionResultType]::ParameterName, 'Return list and summary entries in source order') + [CompletionResult]::new('--unsorted', '--unsorted', [CompletionResultType]::ParameterName, 'Return list and summary entries in source order') + [CompletionResult]::new('--unstable', '--unstable', [CompletionResultType]::ParameterName, 'Enable unstable features') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Use verbose output') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Use verbose output') + [CompletionResult]::new('--yes', '--yes', [CompletionResultType]::ParameterName, 'Automatically confirm all recipes.') + [CompletionResult]::new('--changelog', '--changelog', [CompletionResultType]::ParameterName, 'Print changelog') + [CompletionResult]::new('--choose', '--choose', [CompletionResultType]::ParameterName, 'Select one or more recipes to run using a binary chooser. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`') + [CompletionResult]::new('--dump', '--dump', [CompletionResultType]::ParameterName, 'Print justfile') + [CompletionResult]::new('-e', '-e', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`') + [CompletionResult]::new('--edit', '--edit', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`') + [CompletionResult]::new('--evaluate', '--evaluate', [CompletionResultType]::ParameterName, 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.') + [CompletionResult]::new('--fmt', '--fmt', [CompletionResultType]::ParameterName, 'Format and overwrite justfile') + [CompletionResult]::new('--groups', '--groups', [CompletionResultType]::ParameterName, 'List recipe groups') + [CompletionResult]::new('--init', '--init', [CompletionResultType]::ParameterName, 'Initialize new justfile in project root') + [CompletionResult]::new('--man', '--man', [CompletionResultType]::ParameterName, 'Print man page') + [CompletionResult]::new('--summary', '--summary', [CompletionResultType]::ParameterName, 'List names of available recipes') + [CompletionResult]::new('--variables', '--variables', [CompletionResultType]::ParameterName, 'List names of variables') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') + [CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') + break + } + }) + + function Get-JustFileRecipes([string[]]$CommandElements) { + $justFileIndex = $commandElements.IndexOf("--justfile"); + + if ($justFileIndex -ne -1 -and $justFileIndex + 1 -le $commandElements.Length) { + $justFileLocation = $commandElements[$justFileIndex + 1] + } + + $justArgs = @("--summary") + + if (Test-Path $justFileLocation) { + $justArgs += @("--justfile", $justFileLocation) + } + + $recipes = $(just @justArgs) -split ' ' + return $recipes | ForEach-Object { [CompletionResult]::new($_) } + } + + $elementValues = $commandElements | Select-Object -ExpandProperty Value + $recipes = Get-JustFileRecipes -CommandElements $elementValues + $completions += $recipes + $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | + Sort-Object -Property ListItemText +} diff --git a/completions/just.zsh b/completions/just.zsh new file mode 100644 index 00000000..103362c6 --- /dev/null +++ b/completions/just.zsh @@ -0,0 +1,180 @@ +#compdef just + +autoload -U is-at-least + +_just() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + local common=( +'(--no-aliases)--alias-style=[Set list command alias display style]: :(left right separate)' \ +'--ceiling=[Do not ascend above directory when searching for a justfile.]: :_files' \ +'--chooser=[Override binary invoked by \`--choose\`]: :_default' \ +'--color=[Print colorful output]: :(always auto never)' \ +'--command-color=[Echo recipe lines in ]: :(black blue cyan green purple red yellow)' \ +'--cygpath=[Use binary at to convert between unix and Windows paths.]: :_files' \ +'(-E --dotenv-path)--dotenv-filename=[Search for environment file named instead of \`.env\`]: :_default' \ +'-E+[Load as environment file instead of searching for one]: :_files' \ +'--dotenv-path=[Load as environment file instead of searching for one]: :_files' \ +'--dump-format=[Dump justfile as ]:FORMAT:(json just)' \ +'-f+[Use as justfile]: :_files' \ +'--justfile=[Use as justfile]: :_files' \ +'--list-heading=[Print before list]:TEXT:_default' \ +'--list-prefix=[Print before each list item]:TEXT:_default' \ +'*--set=[Override with ]: :(_just_variables)' \ +'--shell=[Invoke to run recipes]: :_default' \ +'*--shell-arg=[Invoke shell with as an argument]: :_default' \ +'--tempdir=[Save temporary files to .]: :_files' \ +'--timestamp-format=[Timestamp format string]: :_default' \ +'-d+[Use as working directory. --justfile must also be set]: :_files' \ +'--working-directory=[Use as working directory. --justfile must also be set]: :_files' \ +'*-c+[Run an arbitrary command with the working directory, \`.env\`, overrides, and exports set]: :_default' \ +'*--command=[Run an arbitrary command with the working directory, \`.env\`, overrides, and exports set]: :_default' \ +'--completions=[Print shell completion script for ]:SHELL:(bash elvish fish nushell powershell zsh)' \ +'()-l+[List available recipes in or root if omitted]' \ +'()--list=[List available recipes in or root if omitted]' \ +'--request=[Execute . For internal testing purposes only. May be changed or removed at any time.]: :_default' \ +'-s+[Show recipe at ]: :(_just_commands)' \ +'--show=[Show recipe at ]: :(_just_commands)' \ +'--check[Run \`--fmt\` in '\''check'\'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.]' \ +'--clear-shell-args[Clear shell arguments]' \ +'(-q --quiet)-n[Print what just would do without doing it]' \ +'(-q --quiet)--dry-run[Print what just would do without doing it]' \ +'--explain[Print recipe doc comment before running it]' \ +'(-f --justfile -d --working-directory)-g[Use global justfile]' \ +'(-f --justfile -d --working-directory)--global-justfile[Use global justfile]' \ +'--highlight[Highlight echoed recipe lines in bold]' \ +'--list-submodules[List recipes in submodules]' \ +'--no-aliases[Don'\''t show aliases in list]' \ +'--no-deps[Don'\''t run recipe dependencies]' \ +'--no-dotenv[Don'\''t load \`.env\` file]' \ +'--no-highlight[Don'\''t highlight echoed recipe lines in bold]' \ +'--one[Forbid multiple recipes from being invoked on the command line]' \ +'(-n --dry-run)-q[Suppress all output]' \ +'(-n --dry-run)--quiet[Suppress all output]' \ +'--allow-missing[Ignore missing recipe and module errors]' \ +'--shell-command[Invoke with the shell used to run recipe lines and backticks]' \ +'--timestamp[Print recipe command timestamps]' \ +'-u[Return list and summary entries in source order]' \ +'--unsorted[Return list and summary entries in source order]' \ +'--unstable[Enable unstable features]' \ +'*-v[Use verbose output]' \ +'*--verbose[Use verbose output]' \ +'--yes[Automatically confirm all recipes.]' \ +'--changelog[Print changelog]' \ +'--choose[Select one or more recipes to run using a binary chooser. If \`--chooser\` is not passed the chooser defaults to the value of \$JUST_CHOOSER, falling back to \`fzf\`]' \ +'--dump[Print justfile]' \ +'-e[Edit justfile with editor given by \$VISUAL or \$EDITOR, falling back to \`vim\`]' \ +'--edit[Edit justfile with editor given by \$VISUAL or \$EDITOR, falling back to \`vim\`]' \ +'--evaluate[Evaluate and print all variables. If a variable name is given as an argument, only print that variable'\''s value.]' \ +'--fmt[Format and overwrite justfile]' \ +'--groups[List recipe groups]' \ +'--init[Initialize new justfile in project root]' \ +'--man[Print man page]' \ +'--summary[List names of available recipes]' \ +'--variables[List names of variables]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'-V[Print version]' \ +'--version[Print version]' \ +) + + _arguments "${_arguments_options[@]}" $common \ + '1: :_just_commands' \ + '*: :->args' \ + && ret=0 + + case $state in + args) + curcontext="${curcontext%:*}-${words[2]}:" + + local lastarg=${words[${#words}]} + local recipe + + local cmds; cmds=( + ${(s: :)$(_call_program commands just --summary)} + ) + + # Find first recipe name + for ((i = 2; i < $#words; i++ )) do + if [[ ${cmds[(I)${words[i]}]} -gt 0 ]]; then + recipe=${words[i]} + break + fi + done + + if [[ $lastarg = */* ]]; then + # Arguments contain slash would be recognised as a file + _arguments -s -S $common '*:: :_files' + elif [[ $lastarg = *=* ]]; then + # Arguments contain equal would be recognised as a variable + _message "value" + elif [[ $recipe ]]; then + # Show usage message + _message "`just --show $recipe`" + # Or complete with other commands + #_arguments -s -S $common '*:: :_just_commands' + else + _arguments -s -S $common '*:: :_just_commands' + fi + ;; + esac + + return ret + +} + +(( $+functions[_just_commands] )) || +_just_commands() { + [[ $PREFIX = -* ]] && return 1 + integer ret=1 + local variables; variables=( + ${(s: :)$(_call_program commands just --variables)} + ) + local commands; commands=( + ${${${(M)"${(f)$(_call_program commands just --list)}":# *}/ ##/}/ ##/:Args: } + ) + + if compset -P '*='; then + case "${${words[-1]%=*}#*=}" in + *) _message 'value' && ret=0 ;; + esac + else + _describe -t variables 'variables' variables -qS "=" && ret=0 + _describe -t commands 'just commands' commands "$@" + fi + +} + +if [ "$funcstack[1]" = "_just" ]; then + (( $+functions[_just_variables] )) || +_just_variables() { + [[ $PREFIX = -* ]] && return 1 + integer ret=1 + local variables; variables=( + ${(s: :)$(_call_program commands just --variables)} + ) + + if compset -P '*='; then + case "${${words[-1]%=*}#*=}" in + *) _message 'value' && ret=0 ;; + esac + else + _describe -t variables 'variables' variables && ret=0 + fi + + return ret +} + +_just "$@" +else + compdef _just just +fi diff --git a/src/completions.rs b/src/completions.rs index 5cc8c242..97eda5b4 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -12,88 +12,95 @@ pub(crate) enum Shell { } impl Shell { - pub(crate) fn script(self) -> RunResult<'static, String> { + pub(crate) fn script(self) -> &'static str { match self { - Self::Bash => completions::clap(clap_complete::Shell::Bash), - Self::Elvish => completions::clap(clap_complete::Shell::Elvish), - Self::Fish => completions::clap(clap_complete::Shell::Fish), - Self::Nushell => Ok(completions::NUSHELL_COMPLETION_SCRIPT.into()), - Self::Powershell => completions::clap(clap_complete::Shell::PowerShell), - Self::Zsh => completions::clap(clap_complete::Shell::Zsh), + Self::Bash => include_str!("../completions/just.bash"), + Self::Elvish => include_str!("../completions/just.elvish"), + Self::Fish => include_str!("../completions/just.fish"), + Self::Nushell => include_str!("../completions/just.nu"), + Self::Powershell => include_str!("../completions/just.powershell"), + Self::Zsh => include_str!("../completions/just.zsh"), } } } -fn clap(shell: clap_complete::Shell) -> RunResult<'static, String> { - fn replace(haystack: &mut String, needle: &str, replacement: &str) -> RunResult<'static, ()> { - if let Some(index) = haystack.find(needle) { - haystack.replace_range(index..index + needle.len(), replacement); - Ok(()) - } else { - Err(Error::internal(format!( - "Failed to find text:\n{needle}\n…in completion script:\n{haystack}" - ))) - } - } - - let mut script = { - let mut tempfile = tempfile().map_err(|io_error| Error::TempfileIo { io_error })?; - - clap_complete::generate( - shell, - &mut crate::config::Config::app(), - env!("CARGO_PKG_NAME"), - &mut tempfile, - ); - - tempfile - .rewind() - .map_err(|io_error| Error::TempfileIo { io_error })?; - - let mut buffer = String::new(); - - tempfile - .read_to_string(&mut buffer) - .map_err(|io_error| Error::TempfileIo { io_error })?; - - buffer +#[cfg(test)] +mod tests { + use { + super::*, + pretty_assertions::assert_eq, + std::io::{Read, Seek}, + tempfile::tempfile, }; - match shell { - clap_complete::Shell::Bash => { - for (needle, replacement) in completions::BASH_COMPLETION_REPLACEMENTS { - replace(&mut script, needle, replacement)?; - } - } - clap_complete::Shell::Fish => { - script.insert_str(0, completions::FISH_RECIPE_COMPLETIONS); - } - clap_complete::Shell::PowerShell => { - for (needle, replacement) in completions::POWERSHELL_COMPLETION_REPLACEMENTS { - replace(&mut script, needle, replacement)?; - } - } - clap_complete::Shell::Zsh => { - for (needle, replacement) in completions::ZSH_COMPLETION_REPLACEMENTS { - replace(&mut script, needle, replacement)?; - } - } - _ => {} + #[test] + fn scripts() { + assert_eq!(Shell::Bash.script(), clap(clap_complete::Shell::Bash)); + assert_eq!(Shell::Elvish.script(), clap(clap_complete::Shell::Elvish)); + assert_eq!(Shell::Fish.script(), clap(clap_complete::Shell::Fish)); + assert_eq!( + Shell::Powershell.script(), + clap(clap_complete::Shell::PowerShell) + ); + assert_eq!(Shell::Zsh.script(), clap(clap_complete::Shell::Zsh)); } - Ok(script.trim().into()) -} + fn clap(shell: clap_complete::Shell) -> String { + fn replace(haystack: &mut String, needle: &str, replacement: &str) { + if let Some(index) = haystack.find(needle) { + haystack.replace_range(index..index + needle.len(), replacement); + } else { + panic!("Failed to find text:\n{needle}\n…in completion script:\n{haystack}") + } + } -const NUSHELL_COMPLETION_SCRIPT: &str = r#"def "nu-complete just" [] { - (^just --dump --unstable --dump-format json | from json).recipes | transpose recipe data | flatten | where {|row| $row.private == false } | select recipe doc parameters | rename value description -} + let mut script = { + let mut tempfile = tempfile().unwrap(); -# Just: A Command Runner -export extern "just" [ - ...recipe: string@"nu-complete just", # Recipe(s) to run, may be with argument(s) -]"#; + clap_complete::generate( + shell, + &mut crate::config::Config::app(), + env!("CARGO_PKG_NAME"), + &mut tempfile, + ); -const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes + tempfile.rewind().unwrap(); + + let mut buffer = String::new(); + + tempfile.read_to_string(&mut buffer).unwrap(); + + buffer + }; + + match shell { + clap_complete::Shell::Bash => { + for (needle, replacement) in BASH_COMPLETION_REPLACEMENTS { + replace(&mut script, needle, replacement); + } + } + clap_complete::Shell::Fish => { + script.insert_str(0, FISH_RECIPE_COMPLETIONS); + } + clap_complete::Shell::PowerShell => { + for (needle, replacement) in POWERSHELL_COMPLETION_REPLACEMENTS { + replace(&mut script, needle, replacement); + } + } + clap_complete::Shell::Zsh => { + for (needle, replacement) in ZSH_COMPLETION_REPLACEMENTS { + replace(&mut script, needle, replacement); + } + } + _ => {} + } + + let mut script = script.trim().to_string(); + script.push('\n'); + script + } + + const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes if string match -rq '(-f|--justfile)\s*=?(?[^\s]+)' -- (string split -- ' -- ' (commandline -pc))[1] set -fx JUST_JUSTFILE "$justfile" end @@ -109,26 +116,26 @@ complete -c just -a '(__fish_just_complete_recipes)' # autogenerated completions "#; -const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ - ( - r#" _arguments "${_arguments_options[@]}" : \"#, - r" local common=(", - ), - ( - r"'*--set=[Override with ]:VARIABLE:_default:VARIABLE:_default' \", - r"'*--set=[Override with ]: :(_just_variables)' \", - ), - ( - r"'()-s+[Show recipe at ]:PATH:_default' \ + const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ + ( + r#" _arguments "${_arguments_options[@]}" : \"#, + r" local common=(", + ), + ( + r"'*--set=[Override with ]:VARIABLE:_default:VARIABLE:_default' \", + r"'*--set=[Override with ]: :(_just_variables)' \", + ), + ( + r"'()-s+[Show recipe at ]:PATH:_default' \ '()--show=[Show recipe at ]:PATH:_default' \", - r"'-s+[Show recipe at ]: :(_just_commands)' \ + r"'-s+[Show recipe at ]: :(_just_commands)' \ '--show=[Show recipe at ]: :(_just_commands)' \", - ), - ( - "'*::ARGUMENTS -- Overrides and recipe(s) to run, defaulting to the first recipe in the \ + ), + ( + "'*::ARGUMENTS -- Overrides and recipe(s) to run, defaulting to the first recipe in the \ justfile:_default' \\ && ret=0", - r#") + r#") _arguments "${_arguments_options[@]}" $common \ '1: :_just_commands' \ @@ -173,10 +180,10 @@ const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ return ret "#, - ), - ( - " local commands; commands=()", - r#" [[ $PREFIX = -* ]] && return 1 + ), + ( + " local commands; commands=()", + r#" [[ $PREFIX = -* ]] && return 1 integer ret=1 local variables; variables=( ${(s: :)$(_call_program commands just --variables)} @@ -185,10 +192,10 @@ const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ ${${${(M)"${(f)$(_call_program commands just --list)}":# *}/ ##/}/ ##/:Args: } ) "#, - ), - ( - r#" _describe -t commands 'just commands' commands "$@""#, - r#" if compset -P '*='; then + ), + ( + r#" _describe -t commands 'just commands' commands "$@""#, + r#" if compset -P '*='; then case "${${words[-1]%=*}#*=}" in *) _message 'value' && ret=0 ;; esac @@ -197,10 +204,10 @@ const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ _describe -t commands 'just commands' commands "$@" fi "#, - ), - ( - r#"_just "$@""#, - r#"(( $+functions[_just_variables] )) || + ), + ( + r#"_just "$@""#, + r#"(( $+functions[_just_variables] )) || _just_variables() { [[ $PREFIX = -* ]] && return 1 integer ret=1 @@ -220,13 +227,13 @@ _just_variables() { } _just "$@""#, - ), -]; + ), + ]; -const POWERSHELL_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[( - r#"$completions.Where{ $_.CompletionText -like "$wordToComplete*" } | + const POWERSHELL_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[( + r#"$completions.Where{ $_.CompletionText -like "$wordToComplete*" } | Sort-Object -Property ListItemText"#, - r#"function Get-JustFileRecipes([string[]]$CommandElements) { + r#"function Get-JustFileRecipes([string[]]$CommandElements) { $justFileIndex = $commandElements.IndexOf("--justfile"); if ($justFileIndex -ne -1 -and $justFileIndex + 1 -le $commandElements.Length) { @@ -248,15 +255,15 @@ const POWERSHELL_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[( $completions += $recipes $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | Sort-Object -Property ListItemText"#, -)]; + )]; -const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ - ( - r#" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then + const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ + ( + r#" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi"#, - r#" if [[ ${cur} == -* ]] ; then + r#" if [[ ${cur} == -* ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 elif [[ ${COMP_CWORD} -eq 1 ]]; then @@ -273,15 +280,15 @@ const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ return 0 fi fi"#, - ), - ( - r"local i cur prev opts cmd", - r"local i cur prev words cword opts cmd", - ), - ( - r#" cur="${COMP_WORDS[COMP_CWORD]}" + ), + ( + r"local i cur prev opts cmd", + r"local i cur prev words cword opts cmd", + ), + ( + r#" cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}""#, - r#" + r#" # Modules use "::" as the separator, which is considered a wordbreak character in bash. # The _get_comp_words_by_ref function is a hack to allow for exceptions to this rule without # modifying the global COMP_WORDBREAKS environment variable. @@ -294,14 +301,15 @@ const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ cword=$COMP_CWORD fi "#, - ), - (r"for i in ${COMP_WORDS[@]}", r"for i in ${words[@]}"), - (r"elif [[ ${COMP_CWORD} -eq 1 ]]; then", r"else"), - ( - r#"COMPREPLY=( $(compgen -W "${recipes}" -- "${cur}") )"#, - r#"COMPREPLY=( $(compgen -W "${recipes}" -- "${cur}") ) + ), + (r"for i in ${COMP_WORDS[@]}", r"for i in ${words[@]}"), + (r"elif [[ ${COMP_CWORD} -eq 1 ]]; then", r"else"), + ( + r#"COMPREPLY=( $(compgen -W "${recipes}" -- "${cur}") )"#, + r#"COMPREPLY=( $(compgen -W "${recipes}" -- "${cur}") ) if type __ltrim_colon_completions &>/dev/null; then __ltrim_colon_completions "$cur" fi"#, - ), -]; + ), + ]; +} diff --git a/src/error.rs b/src/error.rs index 142f1814..6e1106ad 100644 --- a/src/error.rs +++ b/src/error.rs @@ -185,9 +185,6 @@ pub(crate) enum Error<'src> { recipe: &'src str, io_error: io::Error, }, - TempfileIo { - io_error: io::Error, - }, Unknown { recipe: &'src str, line_number: Option, @@ -501,9 +498,6 @@ impl ColorDisplay for Error<'_> { write!(f, "Recipe `{recipe}` could not be run because of an IO error while trying to create a temporary \ directory or write a file to that directory: {io_error}")?; } - TempfileIo { io_error } => { - write!(f, "Tempfile I/O error: {io_error}")?; - } Unknown { recipe, line_number} => { if let Some(n) = line_number { write!(f, "Recipe `{recipe}` failed on line {n} for an unknown reason")?; diff --git a/src/lib.rs b/src/lib.rs index 695a5eee..08eda196 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -120,7 +120,7 @@ pub(crate) use { ffi::OsString, fmt::{self, Debug, Display, Formatter}, fs, - io::{self, Read, Seek, Write}, + io::{self, Write}, iter::{self, FromIterator}, mem, ops::Deref, @@ -132,7 +132,7 @@ pub(crate) use { thread, vec, }, strum::{Display, EnumDiscriminants, EnumString, IntoStaticStr}, - tempfile::{tempfile, TempDir}, + tempfile::TempDir, typed_arena::Arena, unicode_width::{UnicodeWidthChar, UnicodeWidthStr}, }; diff --git a/src/signals.rs b/src/signals.rs index 23f2477e..a1c12a11 100644 --- a/src/signals.rs +++ b/src/signals.rs @@ -6,6 +6,7 @@ use { }, std::{ fs::File, + io::Read, os::fd::{BorrowedFd, IntoRawFd}, sync::atomic::{self, AtomicI32}, }, diff --git a/src/subcommand.rs b/src/subcommand.rs index 72c7907a..ffb5f5f1 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -63,7 +63,10 @@ impl Subcommand { Self::changelog(); return Ok(()); } - Completions { shell } => return Self::completions(*shell), + Completions { shell } => { + Self::completions(*shell); + return Ok(()); + } Init => return Self::init(config), Man => return Self::man(), Request { request } => return Self::request(request), @@ -283,9 +286,8 @@ impl Subcommand { justfile.run(config, search, overrides, &recipes) } - fn completions(shell: completions::Shell) -> RunResult<'static, ()> { - println!("{}", shell.script()?); - Ok(()) + fn completions(shell: completions::Shell) { + print!("{}", shell.script()); } fn dump(config: &Config, compilation: Compilation) -> RunResult<'static> { From b7e7c46495b34e9407982ffbbb25eb2808ec40b7 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 27 Sep 2025 14:09:19 -0700 Subject: [PATCH 07/18] Release 1.43.0 (#2897) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Release 1.43.0 - Bump version: 1.42.4 → 1.43.0 - Update changelog - Update changelog contributor credits - Update dependencies - Update version references in readme - Update minimum Rust version to 1.80 - Use LazyLock instead of once_cell::sync::Lazy --- .github/workflows/ci.yaml | 2 +- CHANGELOG.md | 19 ++ Cargo.lock | 425 +++++++++++++++++--------------------- Cargo.toml | 8 +- README.md | 2 +- src/interpreter.rs | 2 +- src/lib.rs | 3 +- 7 files changed, 219 insertions(+), 242 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 35d5c813..0d37c03b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,7 +49,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: 1.77 + toolchain: 1.80.0 - uses: Swatinem/rust-cache@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 244fbf8d..a7a983fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ Changelog ========= +[1.43.0](https://github.com/casey/just/releases/tag/1.43.0) - 2025-09-27 +------------------------------------------------------------------------ + +### Added +- Add `[default]` attribute ([#2878](https://github.com/casey/just/pull/2878) by [casey](https://github.com/casey)) +- Do not ascend above `--ceiling` when looking for justfile ([#2870](https://github.com/casey/just/pull/2870) by [casey](https://github.com/casey)) + +### Misc +- Don't generate completions at runtime ([#2896](https://github.com/casey/just/pull/2896) by [casey](https://github.com/casey)) +- Update `softprops/action-gh-release` to 2.3.3 ([#2879](https://github.com/casey/just/pull/2879) by [app/dependabot](https://github.com/app/dependabot)) +- Add submodule alias and dependency targets to grammar ([#2877](https://github.com/casey/just/pull/2877) by [casey](https://github.com/casey)) +- Bump `actions/checkout` to v5 ([#2864](https://github.com/casey/just/pull/2864) by [app/dependabot](https://github.com/app/dependabot)) +- Fix Windows `PATH_SEP` value in readme ([#2859](https://github.com/casey/just/pull/2859) by [casey](https://github.com/casey)) +- Fix lints for Rust 1.89 ([#2860](https://github.com/casey/just/pull/2860) by [casey](https://github.com/casey)) +- Note that Debian 13 has been released ([#2856](https://github.com/casey/just/pull/2856) by [sblondon](https://github.com/sblondon)) +- Mention `just-mcp` in readme ([#2843](https://github.com/casey/just/pull/2843) by [casey](https://github.com/casey)) +- Expand Windows instructions in readme ([#2842](https://github.com/casey/just/pull/2842) by [casey](https://github.com/casey)) +- Note `[parallel]` attribute in parallelism section ([#2837](https://github.com/casey/just/pull/2837) by [casey](https://github.com/casey)) + [1.42.4](https://github.com/casey/just/releases/tag/1.42.4) - 2025-07-24 ------------------------------------------------------------------------ diff --git a/Cargo.lock b/Cargo.lock index 77a879b8..02268fc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,12 +11,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -37,9 +31,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.19" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -67,22 +61,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -105,9 +99,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "blake3" @@ -152,24 +146,25 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "camino" -version = "1.1.10" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da45bc31171d8d6960122e222a67740df867c1dd53b4d51caa297084c185cab" +checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" [[package]] name = "cc" -version = "1.2.30" +version = "1.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -179,11 +174,10 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", @@ -193,9 +187,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.41" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" dependencies = [ "clap_builder", "clap_derive", @@ -203,9 +197,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.41" +version = "4.5.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" dependencies = [ "anstream", "anstyle", @@ -225,9 +219,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.41" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" dependencies = [ "heck", "proc-macro2", @@ -243,9 +237,9 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clap_mangen" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2fb6d3f935bbb9819391528b0e7cf655e78a0bc7a7c3d227211a1d24fc11db1" +checksum = "27b4c3c54b30f0d9adcb47f25f61fcce35c4dd8916638c6b82fbd5f4fb4179e2" dependencies = [ "clap", "roff", @@ -315,19 +309,20 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.7" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f93780a459b7d656ef7f071fe699c4d3d2cb201c4b24d085b6ddc505276e73" +checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3" dependencies = [ + "dispatch", "nix", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] name = "derive-where" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c292c8cf384b1a340b816a9a6cf2599eb8f566a44949024af88418000c50b" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", @@ -368,9 +363,15 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.60.2", + "windows-sys 0.61.1", ] +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + [[package]] name = "dotenvy" version = "0.15.7" @@ -391,12 +392,12 @@ checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" [[package]] name = "errno" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.1", ] [[package]] @@ -411,6 +412,12 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + [[package]] name = "generate-book" version = "0.0.0" @@ -431,9 +438,9 @@ dependencies = [ [[package]] name = "getopts" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cba6ae63eb948698e300f645f87c70f76630d505f23b8907cf1e193ee85048c1" +checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df" dependencies = [ "unicode-width", ] @@ -458,7 +465,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", ] [[package]] @@ -475,9 +482,9 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -499,11 +506,11 @@ dependencies = [ [[package]] name = "is_executable" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a1b5bad6f9072935961dfbf1cced2f3d129963d091b6f69f007fe04e758ae2" +checksum = "baabb8b4867b26294d818bf3f651a454b6901431711abb96e296245888d6e8c4" dependencies = [ - "winapi", + "windows-sys 0.60.2", ] [[package]] @@ -520,9 +527,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ "once_cell", "wasm-bindgen", @@ -530,7 +537,7 @@ dependencies = [ [[package]] name = "just" -version = "1.42.4" +version = "1.43.0" dependencies = [ "ansi_term", "blake3", @@ -551,7 +558,6 @@ dependencies = [ "libc", "nix", "num_cpus", - "once_cell", "percent-encoding", "pretty_assertions", "rand", @@ -582,15 +588,15 @@ checksum = "441225017b106b9f902e97947a6d31e44ebcf274b91bdbfb51e5c477fcd468e5" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libredox" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488594b9328dee448adb906d8b126d9b7deb7cf5c22161ee591610bb1be83c0" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags", "libc", @@ -598,27 +604,27 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "483758ad303d734cec05e5c12b41d7e93e6a6390c5e9dae6bdeb7c1259012d28" +checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" dependencies = [ "libc", ] @@ -674,9 +680,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "ppv-lite86" @@ -699,9 +705,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -773,9 +779,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -783,9 +789,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.16", "libredox", @@ -794,9 +800,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" dependencies = [ "aho-corasick", "memchr", @@ -806,9 +812,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" dependencies = [ "aho-corasick", "memchr", @@ -817,9 +823,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "roff" @@ -829,22 +835,22 @@ checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3" [[package]] name = "rustix" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.61.1", ] [[package]] name = "rustversion" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -854,24 +860,34 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -880,14 +896,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.141" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -928,18 +945,18 @@ dependencies = [ [[package]] name = "snafu" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320b01e011bf8d5d7a4a4a4be966d9160968935849c83b918827f6a435e7f627" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.8.6" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1961e2ef424c1424204d3a5d6975f934f56b6d50ff5732382d84ebf460e147f7" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" dependencies = [ "heck", "proc-macro2", @@ -976,9 +993,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.104" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -993,15 +1010,15 @@ checksum = "1e8f05f774b2db35bdad5a8237a90be1102669f8ea013fea9777b366d34ab145" [[package]] name = "tempfile" -version = "3.20.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -1015,28 +1032,28 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ "rustix", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", @@ -1063,9 +1080,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-segmentation" @@ -1094,9 +1111,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.17.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ "getrandom 0.3.3", "js-sys", @@ -1117,30 +1134,40 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", "log", @@ -1152,9 +1179,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1162,9 +1189,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" dependencies = [ "proc-macro2", "quote", @@ -1175,9 +1202,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ "unicode-ident", ] @@ -1217,9 +1244,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" dependencies = [ "windows-implement", "windows-interface", @@ -1230,9 +1257,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" dependencies = [ "proc-macro2", "quote", @@ -1241,9 +1268,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" dependencies = [ "proc-macro2", "quote", @@ -1252,168 +1279,105 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.2", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link", ] [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.53.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows-targets" -version = "0.53.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - [[package]] name = "windows_aarch64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - [[package]] name = "windows_aarch64_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - [[package]] name = "windows_i686_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - [[package]] name = "windows_i686_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - [[package]] name = "windows_i686_msvc" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - [[package]] name = "windows_x86_64_gnu" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - [[package]] name = "windows_x86_64_gnullvm" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "windows_x86_64_msvc" version = "0.53.0" @@ -1427,13 +1391,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "yansi" @@ -1443,18 +1404,18 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 545a4c47..e1a0355f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "1.42.4" +version = "1.43.0" authors = ["Casey Rodarmor "] autotests = false categories = ["command-line-utilities", "development-tools"] @@ -12,7 +12,7 @@ keywords = ["command-line", "task", "runner", "development", "utility"] license = "CC0-1.0" readme = "crates-io-readme.md" repository = "https://github.com/casey/just" -rust-version = "1.77" +rust-version = "1.80.0" [workspace] members = [".", "crates/*"] @@ -24,7 +24,6 @@ camino = "1.0.4" chrono = "0.4.38" clap = { version = "4.0.0", features = ["derive", "env", "wrap_help"] } clap_mangen = "0.2.20" -ctrlc = { version = "3.1.1", features = ["termination"] } derive-where = "1.2.7" dirs = "6.0.0" dotenvy = "0.15" @@ -34,7 +33,6 @@ is_executable = "1.0.4" lexiclean = "0.0.1" libc = "0.2.0" num_cpus = "1.15.0" -once_cell = "1.19.0" percent-encoding = "2.3.1" rand = "0.9.0" regex = "1.10.4" @@ -54,7 +52,7 @@ unicode-width = "0.2.0" uuid = { version = "1.0.0", features = ["v4"] } [target.'cfg(unix)'.dependencies] -nix = { version = "0.30.1", features = ["user"] } +nix = { version = "0.30.1", features = ["signal", "user"] } [target.'cfg(windows)'.dependencies] ctrlc = { version = "3.1.1", features = ["termination"] } diff --git a/README.md b/README.md index 4992661c..ee983481 100644 --- a/README.md +++ b/README.md @@ -2110,7 +2110,7 @@ change their behavior. |------|------|-------------| | `[confirm]`1.17.0 | recipe | Require confirmation prior to executing recipe. | | `[confirm(PROMPT)]`1.23.0 | recipe | Require confirmation prior to executing recipe with a custom prompt. | -| `[default]`master | recipe | Use recipe as module's default recipe. | +| `[default]`1.43.0 | recipe | Use recipe as module's default recipe. | | `[doc(DOC)]`1.27.0 | module, recipe | Set recipe or module's [documentation comment](#documentation-comments) to `DOC`. | | `[extension(EXT)]`1.32.0 | recipe | Set shebang recipe script's file extension to `EXT`. `EXT` should include a period if one is desired. | | `[group(NAME)]`1.27.0 | module, recipe | Put recipe or module in in [group](#groups) `NAME`. | diff --git a/src/interpreter.rs b/src/interpreter.rs index 1045d6ce..36bb86d9 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -8,7 +8,7 @@ pub(crate) struct Interpreter<'src> { impl Interpreter<'_> { pub(crate) fn default_script_interpreter() -> &'static Interpreter<'static> { - static INSTANCE: Lazy> = Lazy::new(|| Interpreter { + static INSTANCE: LazyLock> = LazyLock::new(|| Interpreter { arguments: vec![StringLiteral::from_raw("-eu")], command: StringLiteral::from_raw("sh"), }); diff --git a/src/lib.rs b/src/lib.rs index 08eda196..4baa020e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,7 +104,6 @@ pub(crate) use { edit_distance::edit_distance, lexiclean::Lexiclean, libc::EXIT_FAILURE, - once_cell::sync::Lazy, rand::seq::IndexedRandom, regex::Regex, serde::{ @@ -128,7 +127,7 @@ pub(crate) use { path::{self, Path, PathBuf}, process::{self, Command, ExitStatus, Stdio}, str::{self, Chars}, - sync::{Arc, Mutex, MutexGuard, OnceLock}, + sync::{Arc, LazyLock, Mutex, MutexGuard, OnceLock}, thread, vec, }, strum::{Display, EnumDiscriminants, EnumString, IntoStaticStr}, From 1e15cb39ce24b982801da6235c087c2b9655d794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 14:02:06 -0700 Subject: [PATCH 08/18] Update softprops/action-gh-release to 2.3.4 (#2910) --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 990a17e4..7a15b81f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -109,7 +109,7 @@ jobs: shell: bash - name: Publish Archive - uses: softprops/action-gh-release@v2.3.3 + uses: softprops/action-gh-release@v2.3.4 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: false @@ -119,7 +119,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Changelog - uses: softprops/action-gh-release@v2.3.3 + uses: softprops/action-gh-release@v2.3.4 if: >- ${{ startsWith(github.ref, 'refs/tags/') @@ -156,7 +156,7 @@ jobs: shasum -a 256 * > ../SHA256SUMS - name: Publish Checksums - uses: softprops/action-gh-release@v2.3.3 + uses: softprops/action-gh-release@v2.3.4 with: draft: false files: SHA256SUMS From 307da8d37653e9f8c58aa02c87898ae92ffafa5b Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sun, 12 Oct 2025 12:00:15 -0700 Subject: [PATCH 09/18] Don't suggest private recipes and aliases (#2916) --- src/alias.rs | 5 ++-- src/justfile.rs | 22 +++++++++++++----- src/subcommand.rs | 2 +- tests/misc.rs | 59 ++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 71 insertions(+), 17 deletions(-) diff --git a/src/alias.rs b/src/alias.rs index fbeaf769..d52aa4f5 100644 --- a/src/alias.rs +++ b/src/alias.rs @@ -25,8 +25,9 @@ impl<'src> Alias<'src, Namepath<'src>> { } impl Alias<'_> { - pub(crate) fn is_private(&self) -> bool { - self.name.lexeme().starts_with('_') || self.attributes.contains(AttributeDiscriminant::Private) + pub(crate) fn is_public(&self) -> bool { + !self.name.lexeme().starts_with('_') + && !self.attributes.contains(AttributeDiscriminant::Private) } } diff --git a/src/justfile.rs b/src/justfile.rs index bf4623de..6f92fe57 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -49,12 +49,22 @@ impl<'src> Justfile<'src> { input, self .recipes - .keys() - .map(|name| Suggestion { name, target: None }) - .chain(self.aliases.iter().map(|(name, alias)| Suggestion { - name, - target: Some(alias.target.name.lexeme()), - })), + .values() + .filter(|recipe| recipe.is_public()) + .map(|recipe| Suggestion { + name: recipe.name(), + target: None, + }) + .chain( + self + .aliases + .values() + .filter(|alias| alias.is_public()) + .map(|alias| Suggestion { + name: alias.name.lexeme(), + target: Some(alias.target.name.lexeme()), + }), + ), ) } diff --git a/src/subcommand.rs b/src/subcommand.rs index ffb5f5f1..9b15b520 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -521,7 +521,7 @@ impl Subcommand { BTreeMap::new() } else { let mut aliases = BTreeMap::<&str, Vec<&str>>::new(); - for alias in module.aliases.values().filter(|alias| !alias.is_private()) { + for alias in module.aliases.values().filter(|alias| alias.is_public()) { aliases .entry(alias.target.name.lexeme()) .or_default() diff --git a/tests/misc.rs b/tests/misc.rs index 3c572bbe..859be071 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -1351,19 +1351,62 @@ b: fn run_suggestion() { Test::new() .arg("hell") - .justfile( - r#" -hello a b='B ' c='C': - echo {{a}} {{b}} {{c}} - -a Z="\t z": -"#, - ) + .justfile("hello:") .stderr("error: Justfile does not contain recipe `hell`\nDid you mean `hello`?\n") .status(EXIT_FAILURE) .run(); } +#[test] +fn private_recipes_are_not_suggested() { + Test::new() + .arg("hell") + .justfile( + " + [private] + hello: + ", + ) + .stderr("error: Justfile does not contain recipe `hell`\n") + .status(EXIT_FAILURE) + .run(); +} + +#[test] +fn alias_suggestion() { + Test::new() + .arg("hell") + .justfile( + " + alias hello := bar + + bar: + ", + ) + .stderr( + "error: Justfile does not contain recipe `hell`\nDid you mean `hello`, an alias for `bar`?\n", + ) + .status(EXIT_FAILURE) + .run(); +} + +#[test] +fn private_aliases_are_not_suggested() { + Test::new() + .arg("hell") + .justfile( + " + [private] + alias hello := bar + + bar: + ", + ) + .stderr("error: Justfile does not contain recipe `hell`\n") + .status(EXIT_FAILURE) + .run(); +} + #[test] fn line_continuation_with_space() { Test::new() From 87efe026176229661ad9559a596d0c45c2392c16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 11:54:11 -0700 Subject: [PATCH 10/18] Bump softprops/action-gh-release to 2.4.1 (#2919) --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7a15b81f..0c290887 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -109,7 +109,7 @@ jobs: shell: bash - name: Publish Archive - uses: softprops/action-gh-release@v2.3.4 + uses: softprops/action-gh-release@v2.4.1 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: false @@ -119,7 +119,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Changelog - uses: softprops/action-gh-release@v2.3.4 + uses: softprops/action-gh-release@v2.4.1 if: >- ${{ startsWith(github.ref, 'refs/tags/') @@ -156,7 +156,7 @@ jobs: shasum -a 256 * > ../SHA256SUMS - name: Publish Checksums - uses: softprops/action-gh-release@v2.3.4 + uses: softprops/action-gh-release@v2.4.1 with: draft: false files: SHA256SUMS From c5113480f436bdab1dc4710b5786e60f7435b02d Mon Sep 17 00:00:00 2001 From: SkyBird <52884766+SkyBird233@users.noreply.github.com> Date: Sun, 26 Oct 2025 03:05:27 +0800 Subject: [PATCH 11/18] Build loongarch64 release binaries (#2886) --- .github/workflows/release.yaml | 18 ++++++++++++++---- www/install.sh | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c290887..5a2efcd5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,17 +34,21 @@ jobs: matrix: target: - aarch64-apple-darwin + - aarch64-pc-windows-msvc - aarch64-unknown-linux-musl - arm-unknown-linux-musleabihf - armv7-unknown-linux-musleabihf + - loongarch64-unknown-linux-musl - x86_64-apple-darwin - x86_64-pc-windows-msvc - - aarch64-pc-windows-msvc - x86_64-unknown-linux-musl include: - target: aarch64-apple-darwin os: macos-latest target_rustflags: '' + - target: aarch64-pc-windows-msvc + os: windows-latest + target_rustflags: '' - target: aarch64-unknown-linux-musl os: ubuntu-latest target_rustflags: '--codegen linker=aarch64-linux-gnu-gcc' @@ -54,14 +58,14 @@ jobs: - target: armv7-unknown-linux-musleabihf os: ubuntu-latest target_rustflags: '--codegen linker=arm-linux-gnueabihf-gcc' + - target: loongarch64-unknown-linux-musl + os: ubuntu-latest + target_rustflags: '--codegen linker=loongarch64-linux-gnu-gcc-14' - target: x86_64-apple-darwin os: macos-latest target_rustflags: '' - target: x86_64-pc-windows-msvc os: windows-latest - - target: aarch64-pc-windows-msvc - os: windows-latest - target_rustflags: '' - target: x86_64-unknown-linux-musl os: ubuntu-latest target_rustflags: '' @@ -86,6 +90,12 @@ jobs: sudo apt-get update sudo apt-get install gcc-arm-linux-gnueabihf + - name: Install LoongArch64 Toolchain + if: ${{ matrix.target == 'loongarch64-unknown-linux-musl' }} + run: | + sudo apt-get update + sudo apt-get install gcc-14-loongarch64-linux-gnu + - name: Install AArch64 Toolchain (Windows) if: ${{ matrix.target == 'aarch64-pc-windows-msvc' }} run: | diff --git a/www/install.sh b/www/install.sh index 1d7a035d..6d704b20 100755 --- a/www/install.sh +++ b/www/install.sh @@ -134,6 +134,7 @@ if [ -z "${target-}" ]; then arm64-Darwin) target=aarch64-apple-darwin;; armv6l-Linux) target=arm-unknown-linux-musleabihf;; armv7l-Linux) target=armv7-unknown-linux-musleabihf;; + loongarch64-Linux) target=loongarch64-unknown-linux-musl;; x86_64-Darwin) target=x86_64-apple-darwin;; x86_64-Linux) target=x86_64-unknown-linux-musl;; x86_64-MINGW64_NT) target=x86_64-pc-windows-msvc;; From e776c474525173f9604a0ffe6b1977f83e1a75a2 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 25 Oct 2025 12:27:45 -0700 Subject: [PATCH 12/18] Use a case statement to install target dependencies (#2929) --- .github/workflows/release.yaml | 41 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5a2efcd5..6a406708 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -78,28 +78,25 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Install AArch64 Toolchain - if: ${{ matrix.target == 'aarch64-unknown-linux-musl' }} + - name: Install Target Dependencies run: | - sudo apt-get update - sudo apt-get install gcc-aarch64-linux-gnu libc6-dev-i386 - - - name: Install ARM Toolchain - if: ${{ matrix.target == 'arm-unknown-linux-musleabihf' || matrix.target == 'armv7-unknown-linux-musleabihf' }} - run: | - sudo apt-get update - sudo apt-get install gcc-arm-linux-gnueabihf - - - name: Install LoongArch64 Toolchain - if: ${{ matrix.target == 'loongarch64-unknown-linux-musl' }} - run: | - sudo apt-get update - sudo apt-get install gcc-14-loongarch64-linux-gnu - - - name: Install AArch64 Toolchain (Windows) - if: ${{ matrix.target == 'aarch64-pc-windows-msvc' }} - run: | - rustup target add aarch64-pc-windows-msvc + case ${{ matrix.target }} in + aarch64-pc-windows-msvc) + rustup target add aarch64-pc-windows-msvc + ;; + aarch64-unknown-linux-musl) + sudo apt-get update + sudo apt-get install gcc-aarch64-linux-gnu libc6-dev-i386 + ;; + arm-unknown-linux-musleabihf|armv7-unknown-linux-musleabihf) + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf + ;; + loongarch64-unknown-linux-musl) + sudo apt-get update + sudo apt-get install gcc-14-loongarch64-linux-gnu + ;; + esac - name: Generate Manpage run: | @@ -208,7 +205,7 @@ jobs: - name: Deploy Pages uses: peaceiris/actions-gh-pages@v4 - if: ${{ needs.prerelease.outputs.value }} + if: ${{ !needs.prerelease.outputs.value }} with: github_token: ${{secrets.GITHUB_TOKEN}} publish_branch: gh-pages From d18eba65fa9689c00b130714f07c3d6e56953920 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 25 Oct 2025 12:50:15 -0700 Subject: [PATCH 13/18] Preserve module groups when formatting (#2930) --- src/analyzer.rs | 4 ++-- src/item.rs | 9 +++++++-- src/justfile.rs | 10 +++++++--- src/parser.rs | 2 +- tests/format.rs | 22 ++++++++++++++++++++++ 5 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/analyzer.rs b/src/analyzer.rs index 70abef9b..bc6cbd56 100644 --- a/src/analyzer.rs +++ b/src/analyzer.rs @@ -15,7 +15,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { pub(crate) fn analyze( asts: &'run HashMap>, doc: Option, - groups: &[String], + groups: &[StringLiteral<'src>], loaded: &[PathBuf], name: Option>, paths: &HashMap, @@ -28,7 +28,7 @@ impl<'run, 'src> Analyzer<'run, 'src> { mut self, asts: &'run HashMap>, doc: Option, - groups: &[String], + groups: &[StringLiteral<'src>], loaded: &[PathBuf], name: Option>, paths: &HashMap, diff --git a/src/item.rs b/src/item.rs index 89f95dc5..69cbb224 100644 --- a/src/item.rs +++ b/src/item.rs @@ -15,7 +15,7 @@ pub(crate) enum Item<'src> { Module { absolute: Option, doc: Option, - groups: Vec, + groups: Vec>, name: Name<'src>, optional: bool, relative: Option>, @@ -45,11 +45,16 @@ impl Display for Item<'_> { write!(f, " {relative}") } Self::Module { + groups, name, - relative, optional, + relative, .. } => { + for group in groups { + writeln!(f, "[group: {group}]")?; + } + write!(f, "mod")?; if *optional { diff --git a/src/justfile.rs b/src/justfile.rs index 6f92fe57..558a6317 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -13,7 +13,7 @@ pub(crate) struct Justfile<'src> { #[serde(rename = "first", serialize_with = "keyed::serialize_option")] pub(crate) default: Option>>, pub(crate) doc: Option, - pub(crate) groups: Vec, + pub(crate) groups: Vec>, #[serde(skip)] pub(crate) loaded: Vec, #[serde(skip)] @@ -468,8 +468,12 @@ impl<'src> Justfile<'src> { recipes } - pub(crate) fn groups(&self) -> &[String] { - &self.groups + pub(crate) fn groups(&self) -> Vec<&str> { + self + .groups + .iter() + .map(|group| group.cooked.as_str()) + .collect() } pub(crate) fn public_groups(&self, config: &Config) -> Vec { diff --git a/src/parser.rs b/src/parser.rs index 6ddd161c..f00d87f0 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -411,7 +411,7 @@ impl<'run, 'src> Parser<'run, 'src> { let mut groups = Vec::new(); for attribute in attributes { if let Attribute::Group(group) = attribute { - groups.push(group.cooked); + groups.push(group); } } diff --git a/tests/format.rs b/tests/format.rs index f1e225fc..f4daa032 100644 --- a/tests/format.rs +++ b/tests/format.rs @@ -1589,3 +1589,25 @@ fn private_variable() { ) .run(); } + +#[test] +fn module_groups_are_preserved() { + Test::new() + .justfile( + r#" + [group('bar')] + [group("baz")] + mod foo + "#, + ) + .write("foo.just", "") + .arg("--dump") + .stdout( + r#" + [group: 'bar'] + [group: "baz"] + mod foo + "#, + ) + .run(); +} From 4830528299a8c4938a5d2ea097cb71b1394f2f1c Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Sat, 25 Oct 2025 13:01:39 -0700 Subject: [PATCH 14/18] Preserve module docs when formatting (#2931) --- src/item.rs | 5 +++++ tests/format.rs | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/item.rs b/src/item.rs index 69cbb224..d615e4c8 100644 --- a/src/item.rs +++ b/src/item.rs @@ -45,12 +45,17 @@ impl Display for Item<'_> { write!(f, " {relative}") } Self::Module { + doc, groups, name, optional, relative, .. } => { + if let Some(doc) = doc { + writeln!(f, "# {doc}")?; + } + for group in groups { writeln!(f, "[group: {group}]")?; } diff --git a/tests/format.rs b/tests/format.rs index f4daa032..d02f356a 100644 --- a/tests/format.rs +++ b/tests/format.rs @@ -1611,3 +1611,23 @@ fn module_groups_are_preserved() { ) .run(); } + +#[test] +fn module_docs_are_preserved() { + Test::new() + .justfile( + r" + # bar + mod foo + ", + ) + .write("foo.just", "") + .arg("--dump") + .stdout( + r" + # bar + mod foo + ", + ) + .run(); +} From 6ed918dec97b0e3dc9db2dcf042eff122258235e Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Sat, 1 Nov 2025 20:09:17 -0400 Subject: [PATCH 15/18] Fix `env()` usage in readme (#2936) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee983481..72c8c289 100644 --- a/README.md +++ b/README.md @@ -1721,7 +1721,7 @@ A default can be substituted for an empty environment variable value with the ```just set unstable -foo := env('FOO') || 'DEFAULT_VALUE' +foo := env('FOO', '') || 'DEFAULT_VALUE' ``` #### Executables From 1b32e275ebeb7ce250b8a46c128f8d2f027ccd1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:37:41 -0800 Subject: [PATCH 16/18] Update softprops/action-gh-release to 2.4.2 (#2948) --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6a406708..82e59958 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -116,7 +116,7 @@ jobs: shell: bash - name: Publish Archive - uses: softprops/action-gh-release@v2.4.1 + uses: softprops/action-gh-release@v2.4.2 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: false @@ -126,7 +126,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Changelog - uses: softprops/action-gh-release@v2.4.1 + uses: softprops/action-gh-release@v2.4.2 if: >- ${{ startsWith(github.ref, 'refs/tags/') @@ -163,7 +163,7 @@ jobs: shasum -a 256 * > ../SHA256SUMS - name: Publish Checksums - uses: softprops/action-gh-release@v2.4.1 + uses: softprops/action-gh-release@v2.4.2 with: draft: false files: SHA256SUMS From 11e65d60a890435c30c9a4ad0ed99cab56ced125 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 12 Nov 2025 12:59:49 -0800 Subject: [PATCH 17/18] Only initialize signal handler once (#2953) --- src/run.rs | 14 ++++++++++++++ src/signal_handler.rs | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/run.rs b/src/run.rs index 53e37fb5..056c9fa7 100644 --- a/src/run.rs +++ b/src/run.rs @@ -34,3 +34,17 @@ pub fn run(args: impl Iterator + Clone>) -> Result<() error.code().unwrap_or(EXIT_FAILURE) }) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn run_can_be_called_more_than_once() { + let tmp = testing::tempdir(); + fs::write(tmp.path().join("justfile"), "foo:").unwrap(); + let search_directory = format!("{}/", tmp.path().to_str().unwrap()); + run(["just", &search_directory].iter()).unwrap(); + run(["just", &search_directory].iter()).unwrap(); + } +} diff --git a/src/signal_handler.rs b/src/signal_handler.rs index 0aee6e26..30664581 100644 --- a/src/signal_handler.rs +++ b/src/signal_handler.rs @@ -3,6 +3,7 @@ use super::*; pub(crate) struct SignalHandler { caught: Option, children: BTreeMap, + initialized: bool, verbosity: Verbosity, } @@ -10,7 +11,11 @@ impl SignalHandler { pub(crate) fn install(verbosity: Verbosity) -> RunResult<'static> { let mut instance = Self::instance(); instance.verbosity = verbosity; - Platform::install_signal_handler(|signal| Self::instance().interrupt(signal)) + if !instance.initialized { + Platform::install_signal_handler(|signal| Self::instance().handle(signal))?; + instance.initialized = true; + } + Ok(()) } pub(crate) fn instance() -> MutexGuard<'static, Self> { @@ -35,11 +40,12 @@ impl SignalHandler { Self { caught: None, children: BTreeMap::new(), + initialized: false, verbosity: Verbosity::default(), } } - fn interrupt(&mut self, signal: Signal) { + fn handle(&mut self, signal: Signal) { if signal.is_fatal() { if self.children.is_empty() { process::exit(signal.code()); From 2442930d75c7000bc004ccdd5b8c35e502b22966 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 12 Nov 2025 13:07:51 -0800 Subject: [PATCH 18/18] Release 1.43.1 (#2954) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump version: 1.43.0 → 1.43.1 - Update changelog - Update changelog contributor credits - Update dependencies --- CHANGELOG.md | 17 +++ Cargo.lock | 303 ++++++++++++++++++++++++++------------------------- Cargo.toml | 2 +- 3 files changed, 173 insertions(+), 149 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a983fc..77a3f460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ Changelog ========= +[1.43.1](https://github.com/casey/just/releases/tag/1.43.1) - 2025-11-12 +------------------------------------------------------------------------ + +### Fixed +- Only initialize signal handler once ([#2953](https://github.com/casey/just/pull/2953) by [casey](https://github.com/casey)) +- Preserve module docs when formatting ([#2931](https://github.com/casey/just/pull/2931) by [casey](https://github.com/casey)) +- Preserve module groups when formatting ([#2930](https://github.com/casey/just/pull/2930) by [casey](https://github.com/casey)) +- Don't suggest private recipes and aliases ([#2916](https://github.com/casey/just/pull/2916) by [casey](https://github.com/casey)) + +### Misc +- Update softprops/action-gh-release to 2.4.2 ([#2948](https://github.com/casey/just/pull/2948) by [app/dependabot](https://github.com/app/dependabot)) +- Fix `env()` usage in readme ([#2936](https://github.com/casey/just/pull/2936) by [laniakea64](https://github.com/laniakea64)) +- Use a case statement to install target dependencies ([#2929](https://github.com/casey/just/pull/2929) by [casey](https://github.com/casey)) +- Build loongarch64 release binaries ([#2886](https://github.com/casey/just/pull/2886) by [SkyBird233](https://github.com/SkyBird233)) +- Bump softprops/action-gh-release to 2.4.1 ([#2919](https://github.com/casey/just/pull/2919) by [app/dependabot](https://github.com/app/dependabot)) +- Update softprops/action-gh-release to 2.3.4 ([#2910](https://github.com/casey/just/pull/2910) by [app/dependabot](https://github.com/app/dependabot)) + [1.43.0](https://github.com/casey/just/releases/tag/1.43.0) - 2025-09-27 ------------------------------------------------------------------------ diff --git a/Cargo.lock b/Cargo.lock index 02268fc5..52ec74c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -31,9 +31,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.20" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -46,9 +46,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" @@ -99,9 +99,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "blake3" @@ -128,10 +128,19 @@ dependencies = [ ] [[package]] -name = "bstr" -version = "1.12.0" +name = "block2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "bstr" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", @@ -146,15 +155,15 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "camino" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" +checksum = "276a59bf2b2c967788139340c9f0c5b12d7fd6630315c15c217e559de85d2609" [[package]] name = "cc" -version = "1.2.39" +version = "1.2.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" +checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe" dependencies = [ "find-msvc-tools", "shlex", @@ -162,9 +171,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -187,9 +196,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.48" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", "clap_derive", @@ -197,9 +206,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.48" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", @@ -219,9 +228,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.47" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", "proc-macro2", @@ -231,15 +240,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "clap_mangen" -version = "0.2.29" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b4c3c54b30f0d9adcb47f25f61fcce35c4dd8916638c6b82fbd5f4fb4179e2" +checksum = "439ea63a92086df93893164221ad4f24142086d535b3a0957b9b9bea2dc86301" dependencies = [ "clap", "roff", @@ -299,9 +308,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -309,13 +318,13 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.5.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3" +checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" dependencies = [ - "dispatch", + "dispatch2", "nix", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -363,14 +372,20 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] -name = "dispatch" -version = "0.2.0" +name = "dispatch2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", +] [[package]] name = "dotenvy" @@ -380,9 +395,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "edit-distance" -version = "2.1.3" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f497e87b038c09a155dfd169faa5ec940d0644635555ef6bd464ac20e97397" +checksum = "324d428080b707bac399325341bd61af5ded1b30f33b7c949792ca464733c2d5" [[package]] name = "env_home" @@ -397,7 +412,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -414,9 +429,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "find-msvc-tools" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" +checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" [[package]] name = "generate-book" @@ -453,19 +468,19 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.7+wasi-0.2.4", + "wasip2", ] [[package]] @@ -515,9 +530,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" @@ -527,9 +542,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ "once_cell", "wasm-bindgen", @@ -537,7 +552,7 @@ dependencies = [ [[package]] name = "just" -version = "1.43.0" +version = "1.43.1" dependencies = [ "ansi_term", "blake3", @@ -588,9 +603,9 @@ checksum = "441225017b106b9f902e97947a6d31e44ebcf274b91bdbfb51e5c477fcd468e5" [[package]] name = "libc" -version = "0.2.176" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libredox" @@ -622,9 +637,9 @@ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memmap2" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" +checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" dependencies = [ "libc", ] @@ -660,6 +675,21 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "once_cell" version = "1.21.3" @@ -668,9 +698,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "option-ext" @@ -705,9 +735,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] @@ -735,9 +765,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -774,7 +804,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", ] [[package]] @@ -800,9 +830,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -812,9 +842,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -823,9 +853,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "roff" @@ -843,7 +873,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -993,9 +1023,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", @@ -1015,10 +1045,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.1", + "windows-sys 0.61.2", ] [[package]] @@ -1042,18 +1072,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", @@ -1068,9 +1098,9 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicase" @@ -1080,9 +1110,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-segmentation" @@ -1092,9 +1122,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "update-contributors" @@ -1115,7 +1145,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "js-sys", "wasm-bindgen", ] @@ -1132,15 +1162,6 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" version = "1.0.1+wasi-0.2.4" @@ -1152,9 +1173,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", "once_cell", @@ -1163,25 +1184,11 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1189,22 +1196,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ + "bumpalo", "proc-macro2", "quote", "syn", - "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" dependencies = [ "unicode-ident", ] @@ -1244,9 +1251,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.62.1" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", @@ -1257,9 +1264,9 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.60.1" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", @@ -1268,9 +1275,9 @@ dependencies = [ [[package]] name = "windows-interface" -version = "0.59.2" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", @@ -1279,24 +1286,24 @@ dependencies = [ [[package]] name = "windows-link" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-result" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ "windows-link", ] @@ -1312,18 +1319,18 @@ dependencies = [ [[package]] name = "windows-sys" -version = "0.61.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ "windows-link", ] [[package]] name = "windows-targets" -version = "0.53.4" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", "windows_aarch64_gnullvm", @@ -1338,51 +1345,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winsafe" diff --git a/Cargo.toml b/Cargo.toml index e1a0355f..92df931a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "1.43.0" +version = "1.43.1" authors = ["Casey Rodarmor "] autotests = false categories = ["command-line-utilities", "development-tools"]