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:
|
for p in result:
|
||||||
let pkgInfo = getPkgInfo(p, options)
|
let pkgInfo = getPkgInfo(p, options)
|
||||||
if pkgsInPath.hasKey(pkgInfo.name) and
|
if pkgsInPath.hasKey(pkgInfo.name) and
|
||||||
pkgsInPath[pkgInfo.name] != pkgInfo.specialVersion:
|
pkgsInPath[pkgInfo.name] != pkgInfo.version:
|
||||||
raise newException(NimbleError,
|
raise newException(NimbleError,
|
||||||
"Cannot satisfy the dependency on $1 $2 and $1 $3" %
|
"Cannot satisfy the dependency on $1 $2 and $1 $3" %
|
||||||
[pkgInfo.name, pkgInfo.specialVersion, pkgsInPath[pkgInfo.name]])
|
[pkgInfo.name, pkgInfo.version, pkgsInPath[pkgInfo.name]])
|
||||||
pkgsInPath[pkgInfo.name] = pkgInfo.specialVersion
|
pkgsInPath[pkgInfo.name] = pkgInfo.version
|
||||||
|
|
||||||
# We add the reverse deps to the JSON file here because we don't want
|
# We add the reverse deps to the JSON file here because we don't want
|
||||||
# them added if the above errorenous condition occurs
|
# them added if the above errorenous condition occurs
|
||||||
|
|
@ -409,7 +409,7 @@ proc installFromDir(dir: string, requestedVer: VersionRange, options: Options,
|
||||||
pkgInfo.specialVersion = $requestedVer.spe
|
pkgInfo.specialVersion = $requestedVer.spe
|
||||||
|
|
||||||
# Dependencies need to be processed before the creation of the pkg dir.
|
# 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:
|
if options.depsOnly:
|
||||||
result.pkg = pkgInfo
|
result.pkg = pkgInfo
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,6 @@ proc readPackageInfo(nf: NimbleFile, options: Options,
|
||||||
if onlyMinimalInfo:
|
if onlyMinimalInfo:
|
||||||
result.name = minimalInfo.name
|
result.name = minimalInfo.name
|
||||||
result.version = minimalInfo.version
|
result.version = minimalInfo.version
|
||||||
result.specialVersion = result.version
|
|
||||||
result.isNimScript = true
|
result.isNimScript = true
|
||||||
result.isMinimal = true
|
result.isMinimal = true
|
||||||
else:
|
else:
|
||||||
|
|
@ -288,6 +287,9 @@ proc readPackageInfo(nf: NimbleFile, options: Options,
|
||||||
" " & getCurrentExceptionMsg() & "."
|
" " & getCurrentExceptionMsg() & "."
|
||||||
raise newException(NimbleError, msg)
|
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
|
# The package directory name may include a "special" version
|
||||||
# (example #head). If so, it is given higher priority and therefore
|
# (example #head). If so, it is given higher priority and therefore
|
||||||
# overwrites the .nimble file's version.
|
# overwrites the .nimble file's version.
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ bin = @["issue289"]
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3", "https://github.com/nimble-test/packagea.git 0.6.0"
|
requires "nim >= 0.15.0", "https://github.com/nimble-test/packagea.git 0.6.0"
|
||||||
requires "https://github.com/nimble-test/packagea.git#head"
|
requires "https://github.com/nimble-test/packagea.git#head"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ license = "MIT"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ license = "MIT"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,5 @@ bin = @["c"]
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ license = "MIT"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,5 @@ bin = @["y"]
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ license = "MIT"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
requires "nim >= 0.15.3"
|
requires "nim >= 0.15.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ proc execNimble(args: varargs[string]): tuple[output: string, exitCode: int] =
|
||||||
quotedArgs = quoted_args.map((x: string) => ("\"" & x & "\""))
|
quotedArgs = quoted_args.map((x: string) => ("\"" & x & "\""))
|
||||||
|
|
||||||
result = execCmdEx(quotedArgs.join(" "))
|
result = execCmdEx(quotedArgs.join(" "))
|
||||||
echo(result.output)
|
|
||||||
|
|
||||||
proc processOutput(output: string): seq[string] =
|
proc processOutput(output: string): seq[string] =
|
||||||
output.strip.splitLines().filter((x: string) => (x.len > 0))
|
output.strip.splitLines().filter((x: string) => (x.len > 0))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue