Skip to content

Commit

Permalink
chore(lockfile): remove default turbo_version impl
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Jun 10, 2024
1 parent 3f07b70 commit fec8e1d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions crates/turborepo-lib/src/engine/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ mod test {
fn global_change(&self, _other: &dyn Lockfile) -> bool {
unreachable!()
}

fn turbo_version(&self) -> Option<String> {
None
}
}

struct MockDiscovery;
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-lockfiles/src/bun/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ impl Lockfile for BunLockfile {
// if the types don't match then we changed package managers
any_other.downcast_ref::<Self>().is_none()
}

fn turbo_version(&self) -> Option<String> {
None
}
}

impl Entry {
Expand Down
4 changes: 1 addition & 3 deletions crates/turborepo-lockfiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ pub trait Lockfile: Send + Sync + Any + std::fmt::Debug {
fn global_change(&self, other: &dyn Lockfile) -> bool;

/// Return any turbo version found in the lockfile
fn turbo_version(&self) -> Option<String> {
None
}
fn turbo_version(&self) -> Option<String>;
}

/// Takes a lockfile, and a map of workspace directory paths -> (package name,
Expand Down
4 changes: 4 additions & 0 deletions crates/turborepo-repository/src/package_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,10 @@ mod test {
fn global_change(&self, _other: &dyn Lockfile) -> bool {
unreachable!("global change detection not necessary for package graph construction")
}

fn turbo_version(&self) -> Option<String> {
None
}
}

#[tokio::test]
Expand Down

0 comments on commit fec8e1d

Please sign in to comment.