Skip to content

Conversation

@korrat
Copy link
Contributor

@korrat korrat commented Jul 25, 2025

As described in #74, cap-std-ext v4.0.2 onwards do not build for Windows.

This PR fixes the problems introduced in v4.0.3, where a rustix-based API was improperly feature gated.

Additionally, the noxdev config for CapStdExtDirExt::walk seems unsupported under Windows so far and has been disabled there.

Fixes #74.

@korrat
Copy link
Contributor Author

korrat commented Jul 25, 2025

I've ensured that compilation succeeds, but was unable to run the test suite as I don't have access to a Windows machine at the moment.

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. It should be easy to add a GHA Windows build test here, I can help.

@korrat korrat force-pushed the korrat/push-wvxqwumulwuz branch from 4f25e44 to 8687bfc Compare July 25, 2025 13:11
@korrat korrat requested a review from cgwalters July 25, 2025 13:15
@cgwalters
Copy link
Member

I did #76 - you can cherry pick that commit into here if you want, or we can merge it over red and then verify this fixes it after you rebase.

@cgwalters cgwalters mentioned this pull request Jul 25, 2025
@korrat korrat force-pushed the korrat/push-wvxqwumulwuz branch 2 times, most recently from 19cf4d6 to 1c7c77e Compare July 25, 2025 14:58
@korrat korrat force-pushed the korrat/push-wvxqwumulwuz branch from 1c7c77e to c8df0c4 Compare July 25, 2025 15:44
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks!

assert!(td.remove_all_optional(p).unwrap());
td.symlink("linkdest", p)?;
assert!(td.remove_all_optional(p).unwrap());
#[cfg(not(windows))]
Copy link
Member

Choose a reason for hiding this comment

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

Kind of curious why you picked not(windows) vs unix here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because symlink is also gated as not(windows). But could be changed to unix. Not sure whether that would change Mac coverage.

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Marking needs-work for CI

@korrat korrat force-pushed the korrat/push-wvxqwumulwuz branch 2 times, most recently from 454425b to 1ea3233 Compare July 28, 2025 04:53
@korrat korrat force-pushed the korrat/push-wvxqwumulwuz branch from 1ea3233 to c28d722 Compare July 29, 2025 06:56
@korrat
Copy link
Contributor Author

korrat commented Jul 29, 2025

I have no idea why the test fails. Maybe someone can help debug on Windows?

@cgwalters cgwalters self-assigned this Jul 29, 2025
@cgwalters
Copy link
Member

Yes no worries, you've done a lot of work here. Thanks!

Until we can debug what the issue might be. It looks
to me like the `tempfile` crate has special logic here
https://github.com/Stebalien/tempfile/blob/0657fdf24925287e6d5544d9e321a48d7ceaafdc/src/file/imp/windows.rs#L92

But we're just relying on cap-std, and we need to dig to
see if there's something similar or it needs changes.
cgwalters
cgwalters approved these changes Jul 29, 2025
@cgwalters cgwalters merged commit 6024c04 into coreos:main Jul 29, 2025
7 checks passed
@korrat korrat deleted the korrat/push-wvxqwumulwuz branch July 30, 2025 05:59
@korrat
Copy link
Contributor Author

korrat commented Jul 30, 2025

Thanks, contributing has been a great experience!

@cgwalters
Copy link
Member

Awesome 😄 And thank you for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version 4.0.2 and later only work targetting Android/Linux

2 participants