inim-repl / INim

Interactive Nim Shell / REPL / Playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nimble test fails

timotheecour opened this issue · comments

@0atman
2 bugs:

bug 1

unittest.require had a long standing bug which I'm fixing in nim-lang/Nim#14676

this:

require getResponse(inputStream, outputStream, defLines) == "A == type string"

used to show:

[Suite] Interface Tests
    /Users/timothee/git_clone/nim/temp/INim/tests/test_interface.nim(34, 61): Check failed: getResponse(inputStream, outputStream, defLines) == "A == type string"
    getResponse(inputStream, outputStream, defLines) was A  : string

but did not actually make the test fail; after that PR the test fails, as it should; that indicates a bug in inim

bug 2

after fixing above issue, nimble test hangs in:

[Suite] INim Test Suite
  [OK] Get Nim Version
  [OK] Indent triggers
Hint: 47462 lines; 0.049s; 61.297MiB peakmem; Debug build; proj: /Users/timothee/git_clone/nim/temp/INim/tests/test_interface.nim; out: /Users/timothee/git_clone/nim/temp/INim/tests/test_interface [SuccessX]
/Users/timothee/git_clone/nim/Nim_devel/compiler/main.nim(402, 15) compiler msg initiated here [MsgOrigin]

[Suite] Interface Tests

Thanks Timothee, I admit I don't really understand this, but thank you for helping us track this bug!

This is on the development branch of Nim, right @timotheecour ?

@0atman Maybe we should change the CI to use the devel branch instead of stable. I can probably start developing in devel and rely on local tests to check against the stable branch if we can check against both versions at once.

For this exact case, using the devel branch would make the tests pass, but do we want to be testing against a version of nim our users aren't using? Probably not. Perhaps we should fork our tests based on the capability of the compiler?

a lot of packages test against both latest devel and latest realease of nim

If we test on both, we can prevent errors that might happen in the future. @timotheecour Does nimble test against stable and devel? If it does, we should be testing both in INim @0atman , so long as tests against devel in nimble don't break builds if the test passes in the latest stable. This way, we can fix upcoming bugs as nim releases new version without getting caught out by a new release

I get it now - Sounds really great! 👌

Does nimble test against stable and devel?

that depends on how you setup your CI (ie, how you install nim in your CI), not on nimble

Sweet, so I guess we configure the CI to test against both and fail if one fails. I haven't worked on CI's much, but I'd love to help out if you want an extra set of eyes on it @0atman

@Tangdongle Absolutely, I reckon we can do it together. I've set up many a CI in my time!

I think we'll have two github actions, one for stable, one for devel. The default behaviour is to require all steps to pass.

I'm working on it here #99

This is now fixed by building the devel branch using choosenim!