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

Revert pin project lite #2422

Merged
merged 2 commits into from
Feb 5, 2021
Merged

Revert pin project lite #2422

merged 2 commits into from
Feb 5, 2021

Conversation

seanmonstar
Copy link
Member

It seems that the pin-project-lite isn't noticing the cfg(feature = "..") attributes on enum variants or fields, and also our CI didn't notice the failure of combining --features http1,client,server.

I'm reverting this change since it's the fastest way for me to unbreak and get a new release out.

Closes #2421

cc @jplatte @taiki-e

@seanmonstar seanmonstar merged commit 4445e73 into master Feb 5, 2021
@seanmonstar seanmonstar deleted the revert-pin-project-lite branch February 5, 2021 23:51
@taiki-e
Copy link
Contributor

taiki-e commented Feb 6, 2021

Oh, both seem to be related to the lack of documentation of crates I'm developing... (cargo-hack actually documents it, but that the current readme just lists the options and it is not very easy to read.)


It seems that the pin-project-lite isn't noticing the cfg(feature = "..") attributes on enum variants or fields

I think this is the limitation I mentioned in #2388 (comment).

pin-project-lite#3 is about attributes that apply only to the original struct/enum.
Proper handling of cfg/cfg_attr on fields and variants requires a more complex approach than the fix for pin-project-lite#3 (it needs to be aware of the kind of attribute and propagate some of it to projected type). Even pin-project could not find the correct solution other than "leave to the compiler". And it is impossible to use the same trick in pin-project-lite.

Perhaps a similar workaround as mentioned in that comment will work.


also our CI didn't notice the failure of combining --features http1,client,server.

This can be fixed by using cargo hack --feature-powerset (all combination of features) instead of cargo hack --each-feature (each feature) in CI.
However, if we use --feature-powerset, there will be more than 700 feature combinations, so we may need to use --depth (specify a max number of simultaneous feature flags of --feature-powerset) flag to limit the number of combinations.

Filed #2423 for this.

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.

Build failure with v0.14.3
2 participants