Skip to content

Commit 6fb375f

Browse files
Merge pull request #210 from gnpaone/sync-action
Sync source repo
2 parents 1d38792 + ffc517f commit 6fb375f

5 files changed

Lines changed: 31 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
Changelog
22
=========
33

4-
[1.42.1](https://github.com/casey/just/releases/tag/1.42.1) - 2025-07-14
4+
[1.42.2](https://github.com/casey/just/releases/tag/1.42.2) - 2025-07-15
55
------------------------------------------------------------------------
66

77
### Fixed
8+
- Fix scope lookup for nested submodules ([#2820](https://github.com/casey/just/pull/2820) by [casey](https://github.com/casey))
89

10+
[1.42.1](https://github.com/casey/just/releases/tag/1.42.1) - 2025-07-14
11+
------------------------------------------------------------------------
12+
13+
### Fixed
914
- Export variables to submodules ([#2816](https://github.com/casey/just/pull/2816) by [casey](https://github.com/casey))
1015
- Only override root-justfile variable assignments ([#2815](https://github.com/casey/just/pull/2815) by [casey](https://github.com/casey))
1116

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "just"
3-
version = "1.42.1"
3+
version = "1.42.2"
44
authors = ["Casey Rodarmor <casey@rodarmor.com>"]
55
autotests = false
66
categories = ["command-line-utilities", "development-tools"]

src/recipe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl<'src, D> Recipe<'src, D> {
5959

6060
pub(crate) fn module_path(&self) -> String {
6161
let mut path = self.namepath.to_string();
62-
path.truncate(path.find("::").unwrap_or_default());
62+
path.truncate(path.rfind("::").unwrap_or_default());
6363
path
6464
}
6565

tests/scope.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,22 @@ fn aliases_in_submodules_run_with_submodule_scope() {
3232
.stderr("echo X X\n")
3333
.run();
3434
}
35+
36+
#[test]
37+
fn dependencies_in_nested_submodules_run_with_submodule_scope() {
38+
Test::new()
39+
.write(
40+
"b.just",
41+
"
42+
x := 'y'
43+
44+
foo:
45+
@echo {{ x }}
46+
",
47+
)
48+
.write("a.just", "mod b")
49+
.stdout("y\n")
50+
.justfile("mod a")
51+
.args(["a", "b", "foo"])
52+
.run();
53+
}

0 commit comments

Comments
 (0)