diff --git a/cli/go.mod b/cli/go.mod index 393a8e075c41c..da8b7f4dbca74 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -8,7 +8,6 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/adrg/xdg v0.3.3 github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f - github.com/bgentry/speakeasy v0.1.0 github.com/briandowns/spinner v1.18.1 github.com/cenkalti/backoff/v4 v4.1.3 github.com/deckarep/golang-set v1.8.0 @@ -53,6 +52,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.1 // indirect github.com/armon/go-radix v1.0.0 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/cli/internal/lockfile/lockfile.go b/cli/internal/lockfile/lockfile.go index 8b5f62a6626b6..d701801434aa1 100644 --- a/cli/internal/lockfile/lockfile.go +++ b/cli/internal/lockfile/lockfile.go @@ -31,11 +31,11 @@ func IsNil(l Lockfile) bool { // Package Structure representing a possible Pack type Package struct { // Key used to lookup a package in the lockfile - Key string `json:"key"` + Key string // The resolved version of a package as it appears in the lockfile - Version string `json:"version"` + Version string // Set to true iff Key and Version are set - Found bool `json:"-"` + Found bool } // ByKey sort package structures by key @@ -50,11 +50,7 @@ func (p ByKey) Swap(i, j int) { } func (p ByKey) Less(i, j int) bool { - if p[i].Key == p[j].Key { - return p[i].Version < p[j].Version - } - - return p[i].Key < p[j].Key + return p[i].Key+p[i].Version < p[j].Key+p[j].Version } var _ (sort.Interface) = (*ByKey)(nil) diff --git a/cli/internal/run/run.go b/cli/internal/run/run.go index be2f44698dea7..9ba736dae762d 100644 --- a/cli/internal/run/run.go +++ b/cli/internal/run/run.go @@ -264,13 +264,6 @@ func (r *run) run(ctx gocontext.Context, targets []string, executionState *turbo if globalHash, err := calculateGlobalHashFromHashableInputs(globalHashInputs); err == nil { r.base.Logger.Debug("global hash", "value", globalHash) - if executionState.GlobalHash != nil { - if *executionState.GlobalHash != globalHash { - return fmt.Errorf("global hash differs between Rust and Go: rust %v go %v", executionState.GlobalHash, globalHash) - } - r.base.Logger.Debug("global hash matches between Rust and Go") - } - g.GlobalHash = globalHash } else { return fmt.Errorf("failed to calculate global hash: %v", err) diff --git a/cli/internal/turbostate/turbostate.go b/cli/internal/turbostate/turbostate.go index 84202a168579c..5ac4e8137c4dc 100644 --- a/cli/internal/turbostate/turbostate.go +++ b/cli/internal/turbostate/turbostate.go @@ -97,7 +97,6 @@ type ExecutionState struct { SpacesAPIClientConfig APIClientConfig `json:"spaces_api_client_config"` PackageManager string `json:"package_manager"` CLIArgs ParsedArgsFromRust `json:"cli_args"` - GlobalHash *string `json:"global_hash"` } // APIClientConfig holds the authentication and endpoint details for the API client diff --git a/crates/turborepo-lib/src/execution_state.rs b/crates/turborepo-lib/src/execution_state.rs index 8fcdff8520978..407037cf60a7c 100644 --- a/crates/turborepo-lib/src/execution_state.rs +++ b/crates/turborepo-lib/src/execution_state.rs @@ -8,7 +8,6 @@ use crate::{ #[derive(Debug, Serialize)] pub struct ExecutionState<'a> { - global_hash: Option, pub api_client_config: APIClientConfig<'a>, pub spaces_api_client_config: SpacesAPIClientConfig<'a>, package_manager: PackageManager, @@ -45,16 +44,6 @@ impl<'a> TryFrom<&'a CommandBase> for ExecutionState<'a> { fn try_from(base: &'a CommandBase) -> Result { let run = Run::new((*base).clone()); - let global_hash; - #[cfg(debug_assertions)] - { - global_hash = Some(run.get_global_hash()?); - } - #[cfg(not(debug_assertions))] - { - global_hash = None; - } - let root_package_json = PackageJson::load(&base.repo_root.join_component("package.json")).ok(); @@ -86,7 +75,6 @@ impl<'a> TryFrom<&'a CommandBase> for ExecutionState<'a> { }; Ok(ExecutionState { - global_hash, api_client_config, spaces_api_client_config, package_manager,