threading icon indicating copy to clipboard operation
threading copied to clipboard

Draft: Fix(SlimSystem): include std assertions and typedthreads

Open noahehall opened this issue 2 years ago • 0 comments

The Problem

  • import threading/channels throws error when --define:nimPreviewSlimSystem
/.nimble/pkgs2/threading-0.1.0-69d57091dff1983d92a3f39ed483bdb20d1b555c/threading/channels.nim(118, 3) 
Error: undeclared identifier: 'assert'
candidates (edit distance, scope distance); see '--spellSuggest': 

nim version

03:40 AM (fix/nimPreviewSlimSystem-import-std-modules %) 
$ nim --v
Nim Compiler Version 1.9.3 [Linux: amd64]
Compiled at 2023-05-02
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: aec5a4c4744a81e19954daf330bafac948098835
active boot switches: -d:release

The Fix

FYI: Doesnt quite fix the issue

git/foss/threading/threading/channels.nim(412, 3) 
Error: ambiguous call; both channels.assert(cond: untyped, msg: string)
 [template declared in /nim-#devel/lib/std/assertions.nim(54, 10)] 
and assertions.assert(cond: untyped, msg: string) 
[template declared in /nim-#devel/lib/std/assertions.nim(54, 10)] match for: ()

What am I doing wrong? i tried using --multimethods:on but that had 0 effect

noahehall avatar May 05 '23 08:05 noahehall