Skip to content

Commit dd85f1b

Browse files
authored
Merge branch 'master' into named_bin
2 parents de14c93 + c9867cb commit dd85f1b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/nimble.nim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ proc activateSolvedPkgFeatures(solvedPkgs: seq[SolvedPackage], allPkgsInfo: seq[
9898
appendGloballyActiveFeatures(pkgWithFeature.get.basicInfo.name, activeFeatures)
9999

100100
proc processFreeDependenciesSAT(rootPkgInfo: PackageInfo, options: Options): HashSet[PackageInfo] =
101+
if rootPkgInfo.basicInfo.name.isNim: #Nim has no deps
102+
return initHashSet[PackageInfo]()
101103
if satProccesedPackages.len > 0:
102104
return satProccesedPackages
103105
var solvedPkgs = newSeq[SolvedPackage]()

tests/trequireflag.nim

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{.used.}
2-
import unittest, os
2+
import unittest, os, strformat, osproc
33
import testscommon
44
from nimblepkg/common import cd
55

@@ -18,4 +18,18 @@ suite "requires flag":
1818
let (outp, exitCode) = execNimble("--requires: stew; results > 0.1", "--solver:sat", "install")
1919
check exitCode == QuitSuccess
2020
check outp.processOutput.inLines("Success: results installed successfully.")
21-
check outp.processOutput.inLines("Success: stew installed successfully.")
21+
check outp.processOutput.inLines("Success: stew installed successfully.")
22+
23+
test "should be able to override the nim version":
24+
let nimqmlDir = getTempDir() / "nimqml"
25+
removeDir(nimqmlDir)
26+
echo "NIMQML DIR is ", nimqmlDir
27+
let cloneCmd = &"git clone https://github.com/seaqt/nimqml-seaqt.git {nimqmlDir}"
28+
check execCmd(cloneCmd) == 0
29+
cd nimqmlDir:
30+
let (output, exitCode) = execNimble("--requires: nim == 2.0.0", "install", "-l")
31+
check exitCode == QuitSuccess
32+
echo "OUTPUT is", output
33+
check output.processOutput.inLines("Success: nimqml installed successfully.")
34+
check output.processOutput.inLines("Installing [email protected]")
35+

0 commit comments

Comments
 (0)