--gc:arc fixes and testing
This commit is contained in:
parent
1820fdffcf
commit
f207911d38
3 changed files with 15 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import json, marshal, os, strformat, strutils, tables
|
||||
import json, os, strformat, strutils, tables
|
||||
|
||||
type
|
||||
ConanPackage* = ref object
|
||||
|
|
@ -272,7 +272,10 @@ proc loadConanInfo*(outdir: string): ConanPackage =
|
|||
file = outdir / conanInfo
|
||||
|
||||
if fileExists(file):
|
||||
result = to[ConanPackage](readFile(file))
|
||||
try:
|
||||
result = to(readFile(file).parseJson(), ConanPackage)
|
||||
except:
|
||||
discard
|
||||
|
||||
proc saveConanInfo*(pkg: ConanPackage, outdir: string) =
|
||||
## Save downloaded package info to `outdir/conaninfo.json`
|
||||
|
|
@ -280,7 +283,7 @@ proc saveConanInfo*(pkg: ConanPackage, outdir: string) =
|
|||
let
|
||||
file = outdir / conanInfo
|
||||
|
||||
writeFile(file, $$pkg)
|
||||
writeFile(file, $(%pkg))
|
||||
|
||||
proc parseConanManifest(pkg: ConanPackage, outdir: string) =
|
||||
# Get all library info from downloaded conan package
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import marshal, os, strutils
|
||||
import json, os, strutils
|
||||
|
||||
type
|
||||
JBBPackage* = ref object
|
||||
|
|
@ -143,7 +143,10 @@ proc loadJBBInfo*(outdir: string): JBBPackage =
|
|||
file = outdir / jbbInfo
|
||||
|
||||
if fileExists(file):
|
||||
result = to[JBBPackage](readFile(file))
|
||||
try:
|
||||
result = to(readFile(file).parseJson(), JBBPackage)
|
||||
except:
|
||||
discard
|
||||
|
||||
proc saveJBBInfo*(pkg: JBBPackage, outdir: string) =
|
||||
## Save downloaded package info to `outdir/jbbinfo.json`
|
||||
|
|
@ -151,7 +154,7 @@ proc saveJBBInfo*(pkg: JBBPackage, outdir: string) =
|
|||
let
|
||||
file = outdir / jbbInfo
|
||||
|
||||
writeFile(file, $$pkg)
|
||||
writeFile(file, $(%pkg))
|
||||
|
||||
proc dlJBBRequires*(pkg: JBBPackage, outdir: string)
|
||||
proc downloadJBB*(pkg: JBBPackage, outdir: string, main = true) =
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ var
|
|||
lexp = "liblzma version = "
|
||||
zexp = "zlib version = "
|
||||
|
||||
when (NimMajor, NimMinor, NimPatch) >= (1, 2, 0):
|
||||
cmd &= " --gc:arc"
|
||||
|
||||
testCall(cmd & lrcmd, "No build files found", 1)
|
||||
testCall(cmd & " -d:libssh2Conan" & sshcmd, "Need version for Conan uri", 1)
|
||||
testCall(cmd & " -d:libssh2JBB" & sshcmd, "Need version for BinaryBuilder.org uri", 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue