rust-lang / jobserver-rs

Apache License 2.0
69 stars 40 forks source link

Support `--jobserver-auth=fifo:PATH` #49

Closed weihanglo closed 1 year ago

weihanglo commented 1 year ago

GNU make 4.4, released in October 2022^1. The jobserver defaults to use named pipes (via mkfifo(3)) on supported platforms by introducing a new IPC style --jobserver-auth=fifo:PATH, which PATH is the path of fifo^2.

This commit makes sure that the new style --jobserver-auth=fifo:PATH can be forwarded to inherited processes correctly.

The support of creating a new client with named pipe will come as a follow-up pull request.

kaspar030 commented 1 year ago

Thanks for working on this! I'm looking forward to the follow-up PR, any chance to (draft) PR that already?

weihanglo commented 1 year ago

Haven't yet prepared the PR. However, making fn new() defaults to fifo is not a solution in the near feature, as build script in Cargo (which is a big dependant of jobserver) could still have a chance to invoke old make. Haven't thought about how to deal with breaking changes though.

I'd like to hear what you expect :)

weihanglo commented 1 year ago

Hi Alex. I amend the first commit to include your suggestions. Also add a new commit to test GNU Make 4.4 in CI, it compiles make from source as a temporary workaround.

weihanglo commented 1 year ago

Thanks for the quick review, @alexcrichton! Sorry for bombarding your inbox again. If you've got time, it would be helpful if we have a release for this update. No hurry and take your time :)

alexcrichton commented 1 year ago

Sure thing, done! If y'all would like I'm happy to transfer ownership of this repo as well, but it's quite low traffic so I also don't mind continuing to shepherd it.