Skip to content

fix(build): Do not copy target to Cargo's build directory#640

Merged
5K1PY merged 1 commit intomasterfrom
fix/rust-target
Feb 22, 2026
Merged

fix(build): Do not copy target to Cargo's build directory#640
5K1PY merged 1 commit intomasterfrom
fix/rust-target

Conversation

@5K1PY
Copy link
Collaborator

@5K1PY 5K1PY commented Feb 22, 2026

Fixes #593

@5K1PY 5K1PY requested a review from SvizelPritula February 22, 2026 14:39
@5K1PY 5K1PY self-assigned this Feb 22, 2026
@5K1PY 5K1PY added the build Changes to how user programs are built label Feb 22, 2026
files = sorted(
file
for file in glob.glob(g, recursive=True, include_hidden=True)
if all(not os.path.commonpath([exc, file]) == exc for exc in exclude)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this use TaskPath.is_prefix?

envs: list[tuple[str, ...]]
files: list[str]
globs: list[str]
globs: list[tuple[str, tuple[str, ...]]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the meaning of globs is clear at all.

for g in sorted(globs):
glob_sign = f"{g} -> " + " ".join(
glob.glob(g, recursive=True, include_hidden=True)
for g, exclude in sorted(globs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this share code with _globs_to_files?

@5K1PY 5K1PY requested a review from SvizelPritula February 22, 2026 15:33
Copy link
Contributor

@SvizelPritula SvizelPritula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, that is much better.

@5K1PY 5K1PY merged commit 463c098 into master Feb 22, 2026
2 checks passed
@5K1PY 5K1PY deleted the fix/rust-target branch February 22, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes to how user programs are built

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cargo strategy fails because target already exists

2 participants