-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add list of supported platforms #1371
Comments
Could this be done in an automatic manner? I'm thinking of a method in which the number of tests that pass are counted for each (platform, architecture, binary) combination, then a big table is populated with color-coded percentages. The formula would be something like It wouldn't paint the whole picture, but on the upside it'd be very easy to maintain / keep up to date. |
This is how I'd envision the table. It's a Gdocs document with some random values. If needed, it could be exported to html, peppered with some CSS (for the color-coding and vertical text), and placed in a I'm making the assumption here that all the tests which cover functionality that is known to work for a limited set of platforms should be rewritten such that they intentionally fail on non-supported platforms. Something like: #[test]
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
fn test_cp_one_file_system() {
[...]
}
#[test]
#[cfg(windows)]
fn test_cp_one_file_system() {
// this platform is supported, but the test is not implemented due to logistics
}
#[test]
#[cfg(not(any(target_os = "linux", target_os = "freebsd", windows)))]
fn test_cp_one_file_system() {
assert!(false,"not supported");
} Or alternatively, a parser could be written that statically counts how many tests are platform-specific, and how many are not. That way it wouldn't be necessary to write the explicit failing test for unsupported platforms. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The current situation is that we have a table at https://github.com/uutils/coreutils/blob/main/README.target.md. The table has a disclaimer of not being up to date, because it's not automated. It can be generated but that takes a lot of resources. Additionally, the docs show some information via icons: I'd like to propose that we adopt a tier system like Rust 1, but a bit different to fit our project:
For Tier 1, we can add an automatically generated page to the docs in the same way that we add the icons: by just reading the cargo features. For Tier 2, we document what should work on the same page. I.e. expect the same features on OpenBSD as FreeBSD. The advantages are:
Footnotes |
sounds great, let's do it :) |
It might be beneficial to add a list of platforms we know we support. At the moment, those are Linux, macOS, Windows, FreeBSD, and Redox (we should be getting a PR updating support at some point). I believe Android should work too, but there might be some
target_os = "linux"
that should actually beany(target_os = "linux", target_os = "android")
. Many of thetarget_os = "macos"
should also probably beany(target_os = "macos", target_os = "ios")
.The text was updated successfully, but these errors were encountered: