From 5307a31181329e76cbf4f20a698e8c25a52a30dd Mon Sep 17 00:00:00 2001 From: jmgomez Date: Fri, 17 Jan 2025 11:58:31 +0000 Subject: [PATCH] Fixes test --- src/nimble.nim | 4 +++- tests/tlockfile.nim | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/nimble.nim b/src/nimble.nim index 21926ba78..fffbccaef 100644 --- a/src/nimble.nim +++ b/src/nimble.nim @@ -1906,7 +1906,9 @@ proc lock(options: Options) = var baseDeps = if options.useSATSolver: - processFreeDependenciesSAT(pkgInfo, options, fromLock = true).toSeq + #only if we are actually locking (not upgrading) + let fromLock = options.action.typ == actionLock + processFreeDependenciesSAT(pkgInfo, options, fromLock).toSeq else: pkgInfo.getDependenciesForLocking(options) # Deps shared by base and tasks diff --git a/tests/tlockfile.nim b/tests/tlockfile.nim index 12d2f13ca..5cc0a12b0 100644 --- a/tests/tlockfile.nim +++ b/tests/tlockfile.nim @@ -84,7 +84,7 @@ license = "MIT" requires "nim >= 1.5.1" """ additionalFileContent = "proc foo() =\n echo \"foo\"\n" - alternativeAdditionalFileContent = "proc bar() =\n echo \"bar\"\n" + # alternativeAdditionalFileContent = "proc bar() =\n echo \"bar\"\n" definePackageConstants(PkgIdent.main) definePackageConstants(PkgIdent.dep1) @@ -235,7 +235,7 @@ requires "nim >= 1.5.1" result = lockFileName.readFile.parseJson{$lfjkPackages}{dep}{$lfjkPkgVcsRevision}.str proc addAdditionalFileAndPushToRemote( - repoPath, remoteName, remotePath, fileContent: string) = + repoPath, remoteName, remotePath, fileContent: string) {.used.} = cdNewDir remotePath: initRepo(isBare = true) cd repoPath: