Skip to content

Commit

Permalink
Switch back to jobserver to drop the transitive syn dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
twistedfall committed Apr 20, 2024
1 parent daca578 commit 59a4a13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rgb = { version = "0.8.20", features = ["argb"], optional = true }
opencv-binding-generator = { version = "0.87.0", path = "binding-generator" }
cc = { version = "1.0.83", features = ["parallel"] }
dunce = "1"
jobslot = "0.2"
jobserver = "0.1"
once_cell = "1"
pkg-config = "0.3"
semver = "1"
Expand All @@ -45,7 +45,7 @@ matches = "0.1"
opencv-binding-generator = { version = "0.87.0", path = "binding-generator" }
cc = { version = ">=1.0.83", features = ["parallel"] }
dunce = "1"
jobslot = "0.2"
jobserver = "0.1"
once_cell = "1"
pkg-config = "0.3"
semver = "1"
Expand Down
8 changes: 4 additions & 4 deletions build/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fn collect_generated_bindings(modules: &[String], target_module_dir: &Path, manu
}

fn build_job_server() -> Result<Jobserver> {
unsafe { jobslot::Client::from_env() }
unsafe { jobserver::Client::from_env() }
.and_then(|client| {
let own_token_released = client.release_raw().is_ok();
let available_jobs = client.available().unwrap_or(0);
Expand Down Expand Up @@ -339,7 +339,7 @@ fn build_job_server() -> Result<Jobserver> {
.unwrap_or(2)
.max(1);
eprintln!("=== Creating a new job server with num_jobs: {num_jobs}");
jobslot::Client::new(num_jobs).ok().map(|client| Jobserver {
jobserver::Client::new(num_jobs).ok().map(|client| Jobserver {
client,
reacquire_token_on_drop: false,
})
Expand All @@ -348,7 +348,7 @@ fn build_job_server() -> Result<Jobserver> {
}

pub struct Jobserver {
client: jobslot::Client,
client: jobserver::Client,
reacquire_token_on_drop: bool,
}

Expand All @@ -361,7 +361,7 @@ impl Drop for Jobserver {
}

impl Deref for Jobserver {
type Target = jobslot::Client;
type Target = jobserver::Client;

fn deref(&self) -> &Self::Target {
&self.client
Expand Down

0 comments on commit 59a4a13

Please sign in to comment.