Skip to content

Specifying jobs = 0 in .cargo/config hangs cargo forever without output #9219

Closed
@orlp

Description

@orlp

If you specify jobs = 0 in .cargo/config, your cargo build invocations will hang forever without output. Note that if you try to invoke cargo build -j 0 it will warn you:

$ cargo build -j 0
error: jobs must be at least 1

Steps

  1. Place a .cargo/config in any valid location with the following content:

     [build]
     jobs = 0
    
  2. Run cargo build.

  3. You will never reach step 3.

Possible Solution(s)

Check for jobs being 0 when reading the config file.

Notes

Output of cargo version: latest master commit, 0b2059e.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-bugCategory: bugE-easyExperience: Easy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions