Skip to content

Commit

Permalink
chore: delete unused npm lockfile impl in go (#4605)
Browse files Browse the repository at this point in the history
### Description

Now that we've been shipping Go code that calls Rust for a bit and the
Rust lockfile implementation hasn't seen any major issues, I feel
comfortable deleting the unused Go NPM lockfile code. If issues to crop
up, this code is just a `git revert` away.

### Testing Instructions

Rust unit tests and integration tests.
  • Loading branch information
chris-olszewski committed Apr 18, 2023
1 parent b2e76e0 commit 35e8584
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 574 deletions.
13 changes: 13 additions & 0 deletions cli/internal/lockfile/lockfile.go
Expand Up @@ -61,6 +61,19 @@ func (p ByKey) Less(i, j int) bool {

var _ (sort.Interface) = (*ByKey)(nil)

// TransitiveClosure the set of all lockfile keys that pkg depends on
func TransitiveClosure(
workspaceDir turbopath.AnchoredUnixPath,
unresolvedDeps map[string]string,
lockFile Lockfile,
) (mapset.Set, error) {
if lf, ok := lockFile.(*NpmLockfile); ok {
// We special case as Rust implementations have their own dep crawl
return npmTransitiveDeps(lf, workspaceDir, unresolvedDeps)
}
return transitiveClosure(workspaceDir, unresolvedDeps, lockFile)
}

func transitiveClosure(
workspaceDir turbopath.AnchoredUnixPath,
unresolvedDeps map[string]string,
Expand Down
@@ -1,6 +1,3 @@
//go:build rust
// +build rust

package lockfile

import (
Expand Down
276 changes: 0 additions & 276 deletions cli/internal/lockfile/npm_lockfile_go.go

This file was deleted.

0 comments on commit 35e8584

Please sign in to comment.