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

The last --jobserver-auth flag should be used #66

Closed
ojeda opened this issue Jan 31, 2024 · 4 comments · Fixed by #67
Closed

The last --jobserver-auth flag should be used #66

ojeda opened this issue Jan 31, 2024 · 4 comments · Fixed by #67

Comments

@ojeda
Copy link

ojeda commented Jan 31, 2024

The first --jobserver-auth it finds is used, instead of the last like the Make manual asks:

Be aware that the MAKEFLAGS variable may contain multiple instances of the --jobserver-auth= option. Only the last instance is relevant.

$ echo 'fn main() {}' | MAKEFLAGS='--jobserver-auth= --jobserver-auth=3,4' rustc -
warning: failed to connect to jobserver from environment variable `MAKEFLAGS="--jobserver-auth= --jobserver-auth=3,4"`: cannot parse jobserver environment variable value: expected `fifo:PATH` or `R,W`, found ``
  |
  = note: the build environment is likely misconfigured

From rust-lang/rust#120515.

@weihanglo
Copy link
Member

Link to that paragraph

This is definitely a bug in the implementation and jobserver should try its best following how GNU make works.

The question is whether this is a breaking change needing a major version bump. Personally I don't think so. Having it in a major version bump will introduce much more inconsistency.

@NobodyXu
Copy link
Contributor

Does jobserver need to do the same for --jobserver-fds and uses the last instance of it?

If both --jobserver-fds and --jobserver-auth is present, which one shall we use?

Shall we just try both?

@weihanglo
Copy link
Member

Good question!

According to this announcement, --jobserver-fds was something internally used by make itself before made public.

There is no reason both of them are present. And to me, it seems better for --jobserver-auth to take precedence over the other.

@NobodyXu
Copy link
Contributor

Thanks!

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.

3 participants