Skip to content

fix: gate provide shim based on error request support#157

Merged
RAprogramm merged 1 commit intomainfrom
eye-of-ra/fix-library-build-for-msrv
Sep 30, 2025
Merged

fix: gate provide shim based on error request support#157
RAprogramm merged 1 commit intomainfrom
eye-of-ra/fix-library-build-for-msrv

Conversation

@RAprogramm
Copy link
Owner

Summary

  • detect whether std::error::Request is available and set masterror-specific cfg flags accordingly from build.rs
  • gate the provide shim, derives, and tests on the new cfg and enable the unstable feature only when required
  • bump the crate version to 0.24.11 and refresh README + changelog to document the fix

Testing

  • cargo +stable build --all-targets
  • cargo +stable test --all
  • cargo +stable clippy -- -D warnings
  • cargo +stable doc --no-deps
  • cargo audit
  • cargo +1.90.0 package --locked --allow-dirty
  • RUSTFLAGS="--cfg error_generic_member_access" cargo +1.90.0 package --locked --allow-dirty

https://chatgpt.com/codex/tasks/task_e_68db4110dcac832ba63fa03479c93ea6

@RAprogramm RAprogramm merged commit c74fec9 into main Sep 30, 2025
4 checks passed
@RAprogramm RAprogramm deleted the eye-of-ra/fix-library-build-for-msrv branch September 30, 2025 03:23
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

#![allow(unused_variables, non_shorthand_field_patterns)]
#[cfg(masterror_has_error_generic_member_access)]
use std::ptr;
use std::{error::Error as StdError, fmt};

[P1] Enable nightly feature for integration tests

The build script now emits masterror_has_error_generic_member_access together with masterror_requires_error_generic_feature when std::error::Request is only available behind the nightly error_generic_member_access feature. The library crate enables the feature flag via #![cfg_attr(..., feature(error_generic_member_access))], but tests/error_derive.rs does not. Once the new cfg evaluates to true, the #[cfg(masterror_has_error_generic_member_access)] blocks in this file will be compiled and will use std::error::request_* APIs, yet the crate still lacks #![feature(error_generic_member_access)], so the tests will fail to compile on nightly. Add the same conditional #![feature(error_generic_member_access)] at the top of this test module or gate the entire file when the feature is required.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant