10000 [REJECTED & ABANDONED] once_cell dependency updates (for no-std usage) by brody4hire · Pull Request #2238 · rustls/rustls · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[REJECTED & ABANDONED] once_cell dependency updates (for no-std usage) #2238

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

Closed

Conversation

brody4hire
Copy link
Contributor
@brody4hire brody4hire commented Nov 25, 2024
  • specify most recent version in top-level Cargo.toml
  • remove redundant version specifier from rustls/Cargo.toml
  • specify required features in rustls/Cargo.toml instead of top-level Cargo.toml
  • move comment to the end of the line for once_cell dependency in rustls/Cargo.toml

RATIONALE - updated:

I think this would help ensure downstream user is using the more recent version of once_cell, as I think would be needed with the updates I proposed in PR #2200.

It looks to me like once_cell is only required for no-std, and usage may change somewhat further if PR #2200 is accepted. I was thinking that putting everything for once_cell (except for version spec) together could help improve cohesiveness and help further preparations for PR #2200.

@brody4hire brody4hire force-pushed the improve-consistency-once-cell branch from 0fb7353 to e3d763d Compare November 25, 2024 00:09
@brody4hire brody4hire changed the title improve consistency for once_cell dependency once_cell dependency updates (for no-std usage) Nov 25, 2024
- specify most recent version in top-level `Cargo.toml`
- remove redundant version specifier from `rustls/Cargo.toml`
- specify required features in `rustls/Cargo.toml` instead of top-level `Cargo.toml`
- move comment to the end of the line for `once_cell` dependency in `rustls/Cargo.toml`
@brody4hire brody4hire force-pushed the improve-consistency-once-cell branch from e3d763d to eae1327 Compare November 25, 2024 00:17
Copy link
Contributor Author
@brody4hire brody4hire left a comment

Choose a reason for hiding this comment

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

Unfortunately I am thinking that this proposal does introduce another inconsistency. This proposal specifies features required for once_cell in rustls/Cargo.toml, while features for the other dependencies are now specified in top-level Cargo.toml.

I personally feel this is the best way to specify features that are required for once_cell, which is only needed to support no-std.

In terms of opinion & feeling, I feel that it would be best to specify features for the other dependencies in the package-specific Cargo.toml, but am not so sure how hard I should press this feeling. I would like to leave this whole proposal open for discussion, I wouldn't mind if we reject this proposal in favor of some other solution to improve the consistency with these dependencies.

8000 Copy link
codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.65%. Comparing base (fa90405) to head (eae1327).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2238   +/-   ##
=======================================
  Coverage   94.65%   94.65%           
=======================================
  Files         102      102           
  Lines       23917    23917           
=======================================
  Hits        22638    22638           
  Misses       1279     1279           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@djc
Copy link
Member
djc commented Nov 25, 2024

I don't think we should take a separate PR for this. If #2200 has a specific lower bound it needs for once_cell, it should bump the dependency accordingly (and ideally not by requiring the latest version). Cargo.toml is used to describe the oldest version that is expected to work.

@brody4hire brody4hire marked this pull request as draft November 25, 2024 14:46
@brody4hire
Copy link
Contributor Author
brody4hire commented Nov 25, 2024

I don't think we should take a separate PR for this.

👍

If #2200 has a specific lower bound it needs for once_cell, it should bump the dependency accordingly (and ideally not by requiring the latest version). Cargo.toml is used to describe the oldest version that is expected to work.

Unfortunately I cannot tell for sure without some further analysis and testing.

I developed the proposed changes for #2200 assuming that we should be able to use the recent updates to once_cell, including some updates related to its use of portable-atomic and its critical-section option.

I personally think it would be ideal if we could find a way to test with dependencies all the way back to the minimum specified dependency versions, and I would be happy to raise a new issue if needed to discuss this. I do recall that portable-atomic is using Depedabot, which seems to update each minimum dependency version along with the updates to Cargo.lock. But yeah, this would probably be out of scope for the time being.

Closing this for now :)


P.S. I think cargo-minimal-versions is the right solution to test the older dependency versions, raised PR #2241 to test all features with minimal (direct) dependency versions.

@brody4hire brody4hire closed this Nov 25, 2024
@brody4hire brody4hire deleted the improve-consistency-once-cell branch November 25, 2024 14:48
@brody4hire brody4hire changed the title once_cell dependency updates (for no-std usage) [REJECTED & ABANDONED] once_cell dependency updates (for no-std usage) Nov 26, 2024
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.

2 participants
0