Fixes tests.
This commit is contained in:
parent
432c91b938
commit
53856db8ff
10 changed files with 14 additions and 13 deletions
|
|
@ -298,11 +298,11 @@ proc processDeps(pkginfo: PackageInfo, options: Options): seq[string] =
|
|||
for p in result:
|
||||
let pkgInfo = getPkgInfo(p, options)
|
||||
if pkgsInPath.hasKey(pkgInfo.name) and
|
||||
pkgsInPath[pkgInfo.name] != pkgInfo.specialVersion:
|
||||
pkgsInPath[pkgInfo.name] != pkgInfo.version:
|
||||
raise newException(NimbleError,
|
||||
"Cannot satisfy the dependency on $1 $2 and $1 $3" %
|
||||
[pkgInfo.name, pkgInfo.specialVersion, pkgsInPath[pkgInfo.name]])
|
||||
pkgsInPath[pkgInfo.name] = pkgInfo.specialVersion
|
||||
[pkgInfo.name, pkgInfo.version, pkgsInPath[pkgInfo.name]])
|
||||
pkgsInPath[pkgInfo.name] = pkgInfo.version
|
||||
|
||||
# We add the reverse deps to the JSON file here because we don't want
|
||||
# them added if the above errorenous condition occurs
|
||||
|
|
@ -409,7 +409,7 @@ proc installFromDir(dir: string, requestedVer: VersionRange, options: Options,
|
|||
pkgInfo.specialVersion = $requestedVer.spe
|
||||
|
||||
# Dependencies need to be processed before the creation of the pkg dir.
|
||||
result.paths = processDeps(pkginfo, depsOptions)
|
||||
result.paths = processDeps(pkgInfo, depsOptions)
|
||||
|
||||
if options.depsOnly:
|
||||
result.pkg = pkgInfo
|
||||
|
|
|
|||
|
|
@ -273,7 +273,6 @@ proc readPackageInfo(nf: NimbleFile, options: Options,
|
|||
if onlyMinimalInfo:
|
||||
result.name = minimalInfo.name
|
||||
result.version = minimalInfo.version
|
||||
result.specialVersion = result.version
|
||||
result.isNimScript = true
|
||||
result.isMinimal = true
|
||||
else:
|
||||
|
|
@ -288,6 +287,9 @@ proc readPackageInfo(nf: NimbleFile, options: Options,
|
|||
" " & getCurrentExceptionMsg() & "."
|
||||
raise newException(NimbleError, msg)
|
||||
|
||||
# By default specialVersion is the same as version.
|
||||
result.specialVersion = result.version
|
||||
|
||||
# The package directory name may include a "special" version
|
||||
# (example #head). If so, it is given higher priority and therefore
|
||||
# overwrites the .nimble file's version.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue