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

de-dupe winapi #23430

Closed
paulrouget opened this issue May 20, 2019 · 9 comments
Closed

de-dupe winapi #23430

paulrouget opened this issue May 20, 2019 · 9 comments

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 20, 2019

Servo uses 2 version of winapi. 0.2 and 0.3.

We need to dedupe it. It doesn't look trivial.

@Eijebong
Copy link
Member

@Eijebong Eijebong commented May 20, 2019

It would be trivial if mio released a new version... We've been waiting for more than a year now.

@jdm
Copy link
Member

@jdm jdm commented May 20, 2019

@paulrouget If we need to dedupe it for the Hololens work, go ahead and make a fork of mio and add a Cargo replacement that uses it.

@Eijebong
Copy link
Member

@Eijebong Eijebong commented May 20, 2019

If you need anything else, just ping me (kind of got some experience with that ;))

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 20, 2019

I'll give it a try tomorrow. I think there's a bit more than just mio.

@atouchet
Copy link
Contributor

@atouchet atouchet commented May 20, 2019

I believe iovec and mio are the main blockers. It would also help to merge #23405 to get rid of the term dependency.

@Eijebong
Copy link
Member

@Eijebong Eijebong commented May 20, 2019

Yeah mio is the main blocker but then you'll probably have to fix tokio stuff too. I did all the preparation work last year hoping for a mio release (which was promised Q1 2018). I think you could use mio master's branch which does have breaking changes for the next version now, but I'm not sure what kind of impact it'll have over the rest of the deps.

@CYBAI CYBAI mentioned this issue May 21, 2019
3 of 4 tasks complete
@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 23, 2019

This is getting difficult.

Here is the whole story, maybe someone can help:

  • I need to make it so Servo on Windows doesn't link to Opengl32.dll
  • one the reason why it links with opengl is because of winapi
  • there are 2 versions of winapi used in servo: 0.2 and 0.3. Both link to opengl.
  • I would just use something like this:
[patch]
winapi:0.2.8 = { path = "../winapi-rs-v2/" }
winapi:0.3.6 = { path = "../winapi-rs-v3/" }

... with a temporary workaround. But it's not possible to specify a version with [patch]: rust-lang/cargo#6169 so Cargo go bunker

  • I could use [replace] instead, but it's not allowed to use [replace] and [patch] in the same Cargo.toml, and I'm using [patch] extensively
  • I tried to update mio to winapi 0.3, but it's a rabbit hole
  • I tried to use the 0.7.x branch of mio, but it is based on a very old version of mio
  • I tried to apply the changes https://github.com/tokio-rs/mio/pull/777/files to mio, but again, rabbit hole
  • also winapi-rs is used extensively across Servo

The only viable options I see are:

  • someone fixes rust-lang/cargo#6169 - but it's probably hard
  • I try harder to patch mio to support winapi-rs, but even if I manage to do it, there are other things depending on winapi-rs
  • Try harder to only use [replace]

Any recommendation?

@Eijebong
Copy link
Member

@Eijebong Eijebong commented May 23, 2019

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented May 27, 2019

Fixed by #23449

@paulrouget paulrouget closed this May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.