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

Replace pin-project with pin-project-lite #2170

Closed
ghost opened this issue May 31, 2020 · 6 comments · Fixed by #2273
Closed

Replace pin-project with pin-project-lite #2170

ghost opened this issue May 31, 2020 · 6 comments · Fixed by #2273

Comments

@ghost
Copy link

ghost commented May 31, 2020

NOTE(taiki-e): It's recommended to see #2170 (comment), if you are considering to do the same as this.

Almost any program doing async I/O uses futures-utils, which pulls in syn and quote dependencies, causing compilation times to be much higher than is needed.

We should consider replacing pin-project with pin-project-line, which is not using proc macros.

cc @taiki-e

@taiki-e
Copy link
Member

taiki-e commented Jun 5, 2020

  1. The first step is to merge Remove uses of pin_project::project attribute #2176. (done)
    Remove uses of pin_project::project attribute #2176 removes some uses of features that pin-project-lite doesn't support and switches the code to a style compatible with pin-project-lite.

  2. After the Remove uses of pin_project::project attribute #2176 is merged, look at the code passing any argument to #[pin_project]. These features are not supported in pin-project-lite, so consider whether we can add it to pin-project-lite or write equivalent code without that feature and unsafe.

@ghost
Copy link
Author

ghost commented Jun 15, 2020

Looks like the first step is done :)

@taiki-e
Copy link
Member

taiki-e commented Jun 23, 2020

Yeah. Also, I filed taiki-e/pin-project-lite#25 to start evaluating the second step.

@taiki-e
Copy link
Member

taiki-e commented Oct 1, 2020

taiki-e/pin-project-lite#28 adds enum support to pin-project-lite. I'm wondering what syntax is preferable, so I would appreciate any feedback.

@taiki-e
Copy link
Member

taiki-e commented Nov 13, 2020

I've released pin-project-lite 0.2 with support for enum. We can probably start this partially.

@taiki-e
Copy link
Member

taiki-e commented Jan 6, 2021

This issue seems mentioned in some projects, which already depend on proc-macros.
For your reference, I'll leave a note:

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 a pull request may close this issue.

1 participant