Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nim CI broken after recent commit #142

Closed
timotheecour opened this issue May 5, 2020 · 9 comments
Closed

nim CI broken after recent commit #142

timotheecour opened this issue May 5, 2020 · 9 comments

Comments

@timotheecour
Copy link
Contributor

timotheecour commented May 5, 2020

nim CI broke after a recent commit; this could be root caused by the broken way in which nim tests nimble packages; investigating ...

note: as of cligen 34578fc


https://pipelines.actions.githubusercontent.com/ZRinn1OrR0LWxU3iWy1StaQcZRN2kXW9lHWwDJ3esfasrmfdRn/_apis/pipelines/1/runs/1087/signedlogcontent/3?urlExpires=2020-05-05T11%3A00%3A30.7579137Z&urlSigningMethod=HMACV1&urlSignature=kXw%2FA%2FnIdPvweqNFEOlAwrO582IYFVt7nrzz7ygwyoQ%3D

2020-05-05T10:11:52.5217820Z �[32mPASS: �[36mhttps://github.com/treeform/chroma C                        �[34m ( 5.25 sec)�[0m
2020-05-05T10:11:52.5218530Z �[32mPASS: �[36mhttps://github.com/status-im/nim-chronicles C               �[34m (39.52 sec)�[0m
2020-05-05T10:11:52.5219150Z �[1m�[31mFAIL: �[36mhttps://github.com/c-blake/cligen.git C�[0m
2020-05-05T10:11:52.5219820Z �[1m�[36mTest "https://github.com/c-blake/cligen.git" in category "nimble-packages"�[0m
2020-05-05T10:11:52.5220680Z �[1m�[31mFailure: reBuildFailed�[0m
2020-05-05T10:11:52.5220860Z package test failed
2020-05-05T10:11:52.5221400Z $ nim c -o:cligenn -r cligen.nim
2020-05-05T10:11:52.5222050Z Hint: used config file '/Users/runner/runners/2.169.1/work/Nim/Nim/config/nim.cfg' [Conf]
2020-05-05T10:11:52.5222710Z Hint: used config file '/Users/runner/runners/2.169.1/work/Nim/Nim/config/config.nims' [Conf]
2020-05-05T10:11:52.5222880Z Hint: system [Processing]
2020-05-05T10:11:52.5223040Z Hint: widestrs [Processing]
2020-05-05T10:11:52.5223180Z Hint: io [Processing]
2020-05-05T10:11:52.5223320Z Hint: cligen [Processing]
2020-05-05T10:11:52.5223460Z Hint: os [Processing]
2020-05-05T10:11:52.5223610Z Hint: strutils [Processing]
2020-05-05T10:11:52.5223760Z Hint: parseutils [Processing]
2020-05-05T10:11:52.5223900Z Hint: math [Processing]
2020-05-05T10:11:52.5224040Z Hint: bitops [Processing]
2020-05-05T10:11:52.5224180Z Hint: macros [Processing]
2020-05-05T10:11:52.5224330Z Hint: algorithm [Processing]
2020-05-05T10:11:52.5224480Z Hint: unicode [Processing]
2020-05-05T10:11:52.5224620Z Hint: pathnorm [Processing]
2020-05-05T10:11:52.5224770Z Hint: osseps [Processing]
2020-05-05T10:11:52.5224910Z Hint: posix [Processing]
2020-05-05T10:11:52.5225050Z Hint: times [Processing]
2020-05-05T10:11:52.5225200Z Hint: options [Processing]
2020-05-05T10:11:52.5225350Z Hint: typetraits [Processing]
2020-05-05T10:11:52.5225500Z Hint: tables [Processing]
2020-05-05T10:11:52.5225630Z Hint: hashes [Processing]
2020-05-05T10:11:52.5225790Z Hint: parseopt3 [Processing]
2020-05-05T10:11:52.5225940Z Hint: critbits [Processing]
2020-05-05T10:11:52.5226080Z Hint: argcvt [Processing]
2020-05-05T10:11:52.5226230Z Hint: strformat [Processing]
2020-05-05T10:11:52.5226370Z Hint: sets [Processing]
2020-05-05T10:11:52.5226500Z Hint: textUt [Processing]
2020-05-05T10:11:52.5226650Z Hint: terminal [Processing]
2020-05-05T10:11:52.5226790Z Hint: colors [Processing]
2020-05-05T10:11:52.5226930Z Hint: termios [Processing]
2020-05-05T10:11:52.5227080Z Hint: wordwrap [Processing]
2020-05-05T10:11:52.5227210Z Hint: gcarc [Processing]
2020-05-05T10:11:52.5227570Z Hint: sysUt [Processing]
2020-05-05T10:11:52.5227770Z Hint: macUt [Processing]
2020-05-05T10:11:52.5227920Z Hint: streams [Processing]
2020-05-05T10:11:52.5228060Z Hint: parsecfg [Processing]
2020-05-05T10:11:52.5228210Z Hint: lexbase [Processing]
2020-05-05T10:11:52.5228350Z Hint: humanUt [Processing]
2020-05-05T10:11:52.5228490Z Hint: textUt [Processing]
2020-05-05T10:11:52.5229280Z /Users/runner/.nimble/pkgs/cligen-0.9.45/cligen/humanUt.nim(1, 68) Warning: imported and not used: 'textUt' [UnusedImport]
2020-05-05T10:11:52.5230030Z /Users/runner/.nimble/pkgs/cligen-0.9.45/cligen/humanUt.nim(1, 61) Warning: imported and not used: 'posix' [UnusedImport]
2020-05-05T10:11:52.5230780Z /Users/runner/.nimble/pkgs/cligen-0.9.45/cligen/humanUt.nim(1, 24) Warning: imported and not used: 'algorithm' [UnusedImport]
2020-05-05T10:11:52.5231500Z /Users/runner/.nimble/pkgs/cligen-0.9.45/cligen/humanUt.nim(1, 35) Warning: imported and not used: 'sets' [UnusedImport]
2020-05-05T10:11:52.5231950Z /Users/runner/runners/2.169.1/work/Nim/Nim/pkgstemp/cligen/cligen/clCfgInit.nim(86, 53) Error: type mismatch: got <string, set[char], bool, keepPct: bool, termInAttr: bool>
2020-05-05T10:11:52.5232110Z but expected one of: 
2020-05-05T10:11:52.5232720Z proc specifierHighlight(fmt: string; pctTerm: set[char]; plain = false; pct = '%';
2020-05-05T10:11:52.5233300Z                        openBkt = {'{', '['}; closeBkt = {'}', ']'}): string
2020-05-05T10:11:52.5233980Z   first type mismatch at position: 4
2020-05-05T10:11:52.5234110Z   unknown named parameter: keepPct
2020-05-05T10:11:52.5234170Z 
2020-05-05T10:11:52.5234450Z expression: specifierHighlight(e.value, Whitespace, plain, keepPct = false, termInAttr = false)
2020-05-05T10:11:52.5234560Z 
2020-05-05T10:40:37.1497280Z �[32mPASS: �[36mhttps://github.com/samuelroy/coco C                         �[34m (17.33 sec)�[0m
2020-05-05T10:40:37.1498330Z �[32mPASS: �[36mhttps://github.com/PMunch/combparser C                      �[34m ( 4.38 sec)�[0m

and indeed I can reproduce locally;

nim c -o:cligenn -r cligen.nim

clCfgInit.nim(86, 53) Error: type mismatch: got <string, set[char], bool, keepPct: bool, termInAttr: bool>
but expected one of:
proc specifierHighlight(fmt: string; pctTerm: set[char]; plain = false; pct = '%';
                       openBkt = {'{', '['}; closeBkt = {'}', ']'}): string
  first type mismatch at position: 4
  unknown named parameter: keepPct

expression: specifierHighlight(e.value, Whitespace, plain, keepPct = false, termInAttr = false)
          of "usehdr", "usageheader":  c.useHdr   = hl(e.value)
@c-blake
Copy link
Owner

c-blake commented May 5, 2020

I cannot reproduce this failure with nim-1.2.0 or nim-devel..just copying your command line. What am I missing?

@SolitudeSF
Copy link
Contributor

it only works/fails if older version of cligen is nimble installed. you can see from traceback that it uses modules from different sources.

@timotheecour
Copy link
Contributor Author

timotheecour commented May 5, 2020

this sounds like another instance of nim-lang/Nim#13868 (comment) which points to important_package's broken way of testing packages

repro instructions:

nim -v e86a6d24d5ffe43e9dc7f230b80c274167376225

cd $dir
git clone https://github.com/c-blake/cligen.git cligen1 && cd cligen1
git checkout 71ce865a1af7d9db32e5fa0cd593a1bedcb0ddb2
nimble develop
cd $dir
git clone https://github.com/c-blake/cligen.git cligen2 && cd cligen2
nim c -o:cligenn -r -f cligen.nim # fails
nim c --path:. -o:cligenn -r -f cligen.nim # works

you may think this is silly, and indeed it is, but I think that's what's happening; not just to your package, this basically keeps breaking every few days for random packages.

this is very order-dependent (read: buggy), where package X depends on cligen at version N, but then cligen gets tested via version HEAD => bug.

simply passing --path:. works in this specific case but isn't a real general fix because HEAD may also need to be installed to pickup new dependencies.

@kaushalmodi
Copy link
Contributor

From

but expected one of:
proc specifierHighlight(fmt: string; pctTerm: set[char]; plain = false; pct = '%';
                       openBkt = {'{', '['}; closeBkt = {'}', ']'}): string
  first type mismatch at position: 4
  unknown named parameter: keepPct

The CI has somehow fetched a roughly 21 hr older version of humanUt.nim from this repo, and not the latest.

@c-blake
Copy link
Owner

c-blake commented May 5, 2020

Well, I can punch the 0.9.46 release very soon. I was going to as soon as I heard back from @kaushalmodi this morning. Would that help since there would be a new tagged version? { It's definitely not designed to be cross compatible with old versions of itself. That's a crazy high bar... ;-) }

@c-blake
Copy link
Owner

c-blake commented May 5, 2020

I certainly don't want to hold up the whole Nim CI procedures (which do sound too fragile).

@timotheecour
Copy link
Contributor Author

timotheecour commented May 5, 2020

The CI has somehow fetched a roughly 21 hr older version of humanUt.nim from this repo, and not the latest.

exactly what I'm diagnosing in nim-lang/Nim#13868 (comment) : nimble installs latest tag, but tests latest HEAD

Would that help since there would be a new tagged version

yes it will fix it in this case, so good enough as a quick fix, but the underlying testament bug remains ...

It's definitely not designed to be cross compatible with old versions of itself. That's a crazy high bar

once testament is fixed that won't be needed (current bar is HEAD vs latest tag, not tag N vs tag N-1)

@c-blake
Copy link
Owner

c-blake commented May 5, 2020

Ok. I am closing this issue since it's not really a cligen package issue. Hopefully testament can be made more robust.

@c-blake c-blake closed this as completed May 5, 2020
@kaushalmodi
Copy link
Contributor

Well, I can punch the 0.9.46 release very soon. I was going to as soon as I heard back from @kaushalmodi this morning.

I am good with the release. The HEAD of this repo is working fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants