Skip to content

Promote ctest-next to ctest #4655

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

Merged
merged 3 commits into from
Aug 15, 2025
Merged

Conversation

mbyx
Copy link
Contributor

@mbyx mbyx commented Aug 14, 2025

Description

Promotes ctest-next to be the new ctest. Platforms not yet ported use the older version of ctest from crates.io as ctest-old. Testing for ctest-old has been removed from ctest-test.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot rustbot added the ctest Issues relating to the ctest crate label Aug 14, 2025
@mbyx mbyx force-pushed the libc-promote-ctest-next branch from 68558dc to b316b10 Compare August 14, 2025 16:30
@rustbot rustbot added the A-CI Area: CI-related items label Aug 14, 2025
Comment on lines 322 to 323
- name: Remove edition 2024 crates
run: perl -i -ne 'print unless /"ctest-(next|test)",/ || /"libc-test",/' Cargo.toml
run: perl -i -ne 'print unless /"ctest(?:-test)?",/ || /"libc-test",/' Cargo.toml
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this bit now since the ctest-next msrv is the ctest msrv.

While you're here, could you rename this job from "Check MSRV" to "Check ctest MSRV"?

Copy link
Contributor Author

@mbyx mbyx Aug 15, 2025

Choose a reason for hiding this comment

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

The version of cargo the CI uses doesn't seem to support 2024 edition. EDIT: It seems that the command used for MSRV picks up the old ctest and not the new one since they have the same name.

@mbyx mbyx force-pushed the libc-promote-ctest-next branch from b316b10 to 1637b76 Compare August 15, 2025 04:50
@mbyx mbyx force-pushed the libc-promote-ctest-next branch 3 times, most recently from be84053 to 28bf588 Compare August 15, 2025 05:10
@tgross35 tgross35 changed the title Libc promote ctest next Promote ctest-next to ctest Aug 15, 2025
Comment on lines 317 to 315
msrv="$(cargo metadata --format-version 1 | jq -r --arg CRATE_NAME ctest '.packages | map(select(.name == $CRATE_NAME)) | first | .rust_version')"
msrv="$(cargo metadata --format-version 1 | jq -r --arg CRATE_NAME ctest '.packages | map(select(.name == $CRATE_NAME)) | last | .rust_version')"
Copy link
Contributor

Choose a reason for hiding this comment

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

The ordering of the packages isn't guaranteed, so this may not always work. You can grab only the local crate by changing the map(select(...)) query to add and (.id | startswith("path+file"))

If you could rewrap this a bit too that would be good, the line is pretty long already. (Bash should let you split lines anywhere within the $(...))

@mbyx mbyx force-pushed the libc-promote-ctest-next branch from 28bf588 to c59da70 Compare August 15, 2025 10:12
@mbyx mbyx marked this pull request as ready for review August 15, 2025 10:22
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

🎉 🎉

@tgross35 tgross35 added this pull request to the merge queue Aug 15, 2025
Merged via the queue into rust-lang:main with commit 4439546 Aug 15, 2025
50 of 52 checks passed
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/libc"
rust-version = "1.63.0"
publish = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah autopublish failed, could you put up a PR to set this true? I'll get it later today if you're not active right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: CI-related items ctest Issues relating to the ctest crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants