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

Upstream libuv patches and upgrade libuv #6567

Closed
brson opened this issue May 17, 2013 · 7 comments
Closed

Upstream libuv patches and upgrade libuv #6567

brson opened this issue May 17, 2013 · 7 comments

Comments

@brson
Copy link
Contributor

brson commented May 17, 2013

We have several android patches and two patches cherry-picked from upstream libuv.

@lucab
Copy link
Contributor

lucab commented May 21, 2013

I saw that you already updated the submodule. I took the current patches and rebased in a single commit on top of libuv HEAD, it is at lucab/libuv@f71151f. If @ILyoan is fine with it, I'd like to send a PR upstream for this.

@ILyoan
Copy link
Contributor

ILyoan commented May 22, 2013

I don't mind if it works on android smoothly.
@yichoi what do you think about this?

@yichoi
Copy link
Contributor

yichoi commented May 23, 2013

why not. feel free to send a PR

@lucab
Copy link
Contributor

lucab commented May 29, 2013

In the meanwhile I spotted an almost identical PR to libuv for android: joyent/libuv#805
Given that the code is almost the same and should be fine also for rust, I'll probably drop my branch and wait for the other PR to be merged...

@lucab
Copy link
Contributor

lucab commented May 31, 2013

Ok, the other PR has just been merged.
@brson, I think you can either update the submodule to joyent@eb1f60c022 or wait for the next stable tag before synching.

@alexcrichton
Copy link
Member

I'm attempting to upgrade libuv for #6436, and from the looks of this, we no longer need the android fixes, but to fix the process issues we do need a workaround-patch for the meantime. As soon as the corresponding issue is fixed (mentioned on #6436), then we can reset back to joyent/master.

@alexcrichton
Copy link
Member

Unfortunately, it looks like I won't be able to upgrade libuv at this time. The main blocker for me was that I just couldn't get libuv master to build on mingw right now. If that can be done, I think that we can revisit upgrading libuv. @olsonjeffery mentions that the libuv folks aren't really supporting mingw as a first class platform, they prefer msvc.

bors added a commit that referenced this issue Aug 28, 2013
…r=brson

This overhauls `std::run` to instead run on top of libuv. This is *not* in a mergeable state, I've been attempting to diagnose failures in the compiletest suite. I've managed to find a fair number of bugs so far, but I still  don't seem to be done yet.

Notable changes:
* This requires upgrading libuv. From the discussion on #6567, I took libuv master from a few days ago, applied one patch to fix process spawning with multiple event loops in libuv, and pushed to my own fork
* The build system for libuv has changed since we last used it. There's some extra checkout from a google build system which apparently does all the magic if you don't want to require autotools, and the google system just requires python. I updated the Makefile to get this build system and build libuv with it instead. This is untested on windows and arm, and both will probably need to see some improvement.
* This required adding some pipe bindings to libuv as well. Currently the support is pretty simple and probably completely unsafe for pipes, but you at least get read/write methods. This is necessary for capturing output of processes.
* I didn't redesign `std::run` at all, I simply tried to reimplement all the existing functionality on top of libuv. Some functions ended up dying, but nothing major. All uses of `std::run` in the compiler still work just fine.

I'm not quite sure how the rest of the runtime deals with this, but I marked process structures as `no_send` because the waiting/waking up has to happen in the same event loop right now. If processes start migrating between event loops then very bad things can happen. This may be what threadsafe I/O would fix, and I would be more than willing to rebase on that if it lands first.

Anyway, for now I wanted to put this up for review, I'm still investigating the corruption/deadlock bugs, but this is in an *almost* workable state. Once I find the bugs I'll also rebase on the current master.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 30, 2021
…arth

Fix path_to_res for enum inherent items

changelog: none

I tried to add `Option::is_some` to the paths but got a false positive from the invalid paths lint. Turns out the `path_to_res` function does not find inherent impls for enums. I fixed this and took the liberty to do some additional cleanup in the method.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 30, 2021
`manual_filter_map` and `manual_find_map`

changelog: Add `manual_filter_map` and replace `find_map` with `manual_find_map`

Replaces rust-lang#6453

Fixes rust-lang#3188
Fixes rust-lang#4193

~Depends on rust-lang#6567 (to fix an internal lint false positive)~

This replaces `filter_map` and `find_map` with `manual_filter_map` and `manual_find_map` respectively. However, `filter_map` is left in place since it is used for a variety of other cases. See discussion in rust-lang#6453.
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

No branches or pull requests

5 participants