Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop implementing std's MetadataExt #342

Closed
sunfishcode opened this issue Jan 2, 2024 · 1 comment · Fixed by #343
Closed

Stop implementing std's MetadataExt #342

sunfishcode opened this issue Jan 2, 2024 · 1 comment · Fixed by #343

Comments

@sunfishcode
Copy link
Member

Rust is looking to seal std::os::unix::fs::MetadataExt:

rust-lang/rust#118916

As in #271 (which was before cap-std 1.0), cap-std can switch to defining its own copies of these traits. And since cap-std seems to be the only crate in the ecosystem that is affected, it should probably do this, to unblock std evolution.

However, this is a semver-incompatible change, so it'll require bumping cap-std to 3.0.

@cgwalters, who I know is particularly impacted by semver bumps

@cgwalters
Copy link
Contributor

Since the cap-std 1.0 ➡️ 2.0 bump I did ostreedev/ostree#3027 fixes the most painful thing to bump from my PoV. So don't let me stand in the way of any Rust improvements!

sunfishcode added a commit that referenced this issue Jan 3, 2024
…xt`.

Define our own copy of `MetadataExt` and `PermissionsExt` and change the
code to use them instead of `std::os::*::fs::MetadataExt` and
`std::os::*::fs::PermissionsExt'.

In general, we should be moving away from using std's `Ext` traits like
this, as they weren't meant to be used in this way.

Fixes #342.
sunfishcode added a commit that referenced this issue Jan 10, 2024
…xt`. (#343)

* Use custom traits instead of libstd's `MetadataExt` and `PermissionsExt`.

Define our own copy of `MetadataExt` and `PermissionsExt` and change the
code to use them instead of `std::os::*::fs::MetadataExt` and
`std::os::*::fs::PermissionsExt'.

In general, we should be moving away from using std's `Ext` traits like
this, as they weren't meant to be used in this way.

Fixes #342.

* Have cap-std re-export the new traits, and update tests.

 * Update the build.rs scripts to fix Rust feature detection.
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 a pull request may close this issue.

2 participants