From b34bfcabea00fc23cd66900d1766f29d45630aa5 Mon Sep 17 00:00:00 2001 From: flywind Date: Tue, 11 Jan 2022 16:06:24 +0800 Subject: [PATCH 1/2] enable weave --- compiler/cgen.nim | 4 ++-- testament/important_packages.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index c862d4d3065d1..a955ec7488071 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -48,8 +48,8 @@ proc addForwardedProc(m: BModule, prc: PSym) = m.g.forwardedProcs.add(prc) proc findPendingModule(m: BModule, s: PSym): BModule = - let ms = s.itemId.module #getModule(s) - result = m.g.modules[ms] + var ms = getModule(s) + result = m.g.modules[ms.position] proc initLoc(result: var TLoc, k: TLocKind, lode: PNode, s: TStorageLoc) = result.k = k diff --git a/testament/important_packages.nim b/testament/important_packages.nim index 7e15e7c65186c..84778480d4400 100644 --- a/testament/important_packages.nim +++ b/testament/important_packages.nim @@ -157,7 +157,7 @@ pkg "tiny_sqlite" pkg "unicodedb", "nim c -d:release -r tests/tests.nim" pkg "unicodeplus", "nim c -d:release -r tests/tests.nim" pkg "unpack" -pkg "weave", "nimble test_gc_arc", allowFailure = true +pkg "weave", "nimble test_gc_arc" pkg "websocket", "nim c websocket.nim" pkg "winim", "nim c winim.nim" pkg "with" From 1a042e01c75e827b28ae86a5f04ecaa8bfae478c Mon Sep 17 00:00:00 2001 From: flywind Date: Tue, 11 Jan 2022 17:47:54 +0800 Subject: [PATCH 2/2] workaround CI --- compiler/cgen.nim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index a955ec7488071..a48e4e0f21ad5 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -48,8 +48,13 @@ proc addForwardedProc(m: BModule, prc: PSym) = m.g.forwardedProcs.add(prc) proc findPendingModule(m: BModule, s: PSym): BModule = - var ms = getModule(s) - result = m.g.modules[ms.position] + # TODO fixme + if m.config.symbolFiles == v2Sf: + let ms = s.itemId.module #getModule(s) + result = m.g.modules[ms] + else: + var ms = getModule(s) + result = m.g.modules[ms.position] proc initLoc(result: var TLoc, k: TLocKind, lode: PNode, s: TStorageLoc) = result.k = k