diff --git a/src/nimblepkg/nimblesat.nim b/src/nimblepkg/nimblesat.nim index 17eea6c8..f8d68b8f 100644 --- a/src/nimblepkg/nimblesat.nim +++ b/src/nimblepkg/nimblesat.nim @@ -400,6 +400,11 @@ proc getSolvedPackages*(pkgVersionTable: Table[string, PackageVersions], output: for ver in p.versions.items: for dep, q in items graph.reqs[ver.req].deps: if dep notin graph.packageToDependency: + #debug print. show all packacges in the graph + for k, v in pkgVersionTable: + output.add &"Package {k} \n" + for v in v.versions: + output.add &"\t \t Version {v.version} requires: {v.requires} \n" output.add &"Dependency {dep} not found in the graph \n" return newSeq[SolvedPackage]() @@ -446,7 +451,7 @@ proc getPackageMinimalVersionsFromRepo*(repoDir, pkgName: string, downloadMethod let tags = getTagsList(repoDir, downloadMethod).getVersionList() var checkedTags = 0 for (ver, tag) in tags.pairs: - if checkedTags >= options.maxTaggedVersions: + if options.maxTaggedVersions > 0 and checkedTags >= options.maxTaggedVersions: # echo &"Tag limit reached for {pkgName}" break inc checkedTags @@ -463,7 +468,8 @@ proc getPackageMinimalVersionsFromRepo*(repoDir, pkgName: string, downloadMethod proc downloadMinimalPackage*(pv: PkgTuple, options: Options): seq[PackageMinimalInfo] = if pv.name == "": return newSeq[PackageMinimalInfo]() if pv.isNim and not options.disableNimBinaries: return getAllNimReleases(options) - + if pv.ver.kind == verSpecial: + return @[downloadPkInfoForPv(pv, options).getMinimalInfo(options)] let (downloadRes, downloadMeth) = downloadPkgFromUrl(pv, options) getPackageMinimalVersionsFromRepo(downloadRes.dir, pv.name, downloadMeth, options) diff --git a/src/nimblepkg/options.nim b/src/nimblepkg/options.nim index a974b7fb..2b06ec36 100644 --- a/src/nimblepkg/options.nim +++ b/src/nimblepkg/options.nim @@ -749,7 +749,7 @@ proc initOptions*(): Options = noColor: not isatty(stdout), startDir: getCurrentDir(), nimBinariesDir: getHomeDir() / ".nimble" / "nimbinaries", - maxTaggedVersions: 2 #TODO increase once we have a cache + maxTaggedVersions: 0 #TODO increase once we have a cache ) proc handleUnknownFlags(options: var Options) = diff --git a/tests/tsat.nim b/tests/tsat.nim index dbbe51c0..f0356036 100644 --- a/tests/tsat.nim +++ b/tests/tsat.nim @@ -3,7 +3,7 @@ import unittest, os import testscommon # from nimblepkg/common import cd Used in the commented tests import std/[tables, sequtils, json, jsonutils, strutils, times, options, strformat] -import nimblepkg/[version, nimblesat, options, config, download, packageparser, packageinfotypes, tools, packageinfo, cli] +import nimblepkg/[version, nimblesat, options, config, download, packageinfotypes, packageinfo] from nimblepkg/common import cd proc initFromJson*(dst: var PkgTuple, jsonNode: JsonNode, jsonPath: var string) = @@ -364,4 +364,9 @@ suite "SAT solver": cd "wronglytaggednim": removeDir("nimbledeps") let (_, exitCode) = execNimble("install", "-l") - check exitCode == QuitSuccess \ No newline at end of file + check exitCode == QuitSuccess + + +#[ + - TODO make sure all collected version requires are enumerated (they need to be taken into account in collectAllVersions after the getPackageMinimalVersionsFromRepo call) +]# \ No newline at end of file