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

float parsing: Add test for a fixed issue #18232

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

kaushalmodi
Copy link
Contributor

@kaushalmodi kaushalmodi commented Jun 10, 2021

Fixes #14407 .

This issue was fixed by #18139.

This command passes on my machine:

# cd to cloned Nim repo
testament r tests/errmsgs/treportunused.nim   

@kaushalmodi
Copy link
Contributor Author

@Araq I see that the order of the Hints got shuffled up when I added that let block at the end. Is that shuffling expected? For that reason, the diff of the discard block is bigger than I expected. I expected only line number changes in there. But instead, I also had to paste the exact order of Hints that I saw when compiling that test locally.

@kaushalmodi
Copy link
Contributor Author

kaushalmodi commented Jun 10, 2021

The order of the Hints messages is still an issue. The changes in this test passed on most machines, but failed on:

  1. an Azure Linux run: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=16979&view=logs&j=ba7bbfa4-f55c-5c34-6d52-1b6b4edd3f37&t=01b6eca1-ed82-5532-a6ed-8d9a0cd0188a&l=389

    -------- Expected -------
    treportunused.nim(28, 5) Hint: 's8' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(35, 3) Hint: 'v0.99' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(36, 3) Hint: 'v0.99.99' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(26, 7) Hint: 's6' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(25, 6) Hint: 's5' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(22, 10) Hint: 's2' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(23, 10) Hint: 's3' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(30, 6) Hint: 's10' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(21, 10) Hint: 's1' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(24, 6) Hint: 's4' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(27, 7) Hint: 's7' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(31, 6) Hint: 's11' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(29, 5) Hint: 's9' is declared but not used [XDeclaredButNotUsed]
    
    --------- Given  --------
    Hint: used config file '/home/vsts/work/1/s/config/nim.cfg' [Conf]
    Hint: used config file '/home/vsts/work/1/s/config/config.nims' [Conf]
    Hint: used config file '/home/vsts/work/1/s/tests/config.nims' [Conf]
    treportunused.nim(28, 5) Hint: 's8' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(36, 3) Hint: 'v0.99.99' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(26, 7) Hint: 's6' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(25, 6) Hint: 's5' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(22, 10) Hint: 's2' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(23, 10) Hint: 's3' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(30, 6) Hint: 's10' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(21, 10) Hint: 's1' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(24, 6) Hint: 's4' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(27, 7) Hint: 's7' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(31, 6) Hint: 's11' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(35, 3) Hint: 'v0.99' is declared but not used [XDeclaredButNotUsed]
    treportunused.nim(29, 5) Hint: 's9' is declared but not used [XDeclaredButNotUsed]
    
  2. most likely an unrelated error on Azure MacOS: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=16979&view=logs&j=30931762-47c4-53b3-6a83-316eb5a6b9d7&t=90890b9c-f12c-53eb-b238-5d782d0298c3&l=2982 .

@ringabout ringabout closed this Jun 22, 2021
@ringabout ringabout reopened this Jun 22, 2021
@timotheecour
Copy link
Member

The order of the Hints messages is still an issue

please open a separate issue to track that (and cross-link there); it's fixable using perhaps similar approach as I did in #13701 for sorting sigmatch errors

in the meantime you can use a different file for the test case as a workaround

@kaushalmodi
Copy link
Contributor Author

in the meantime you can use a different file for the test case as a workaround

Ok, I'll do that later today. Thanks.

@timotheecour
Copy link
Member

Ok, I'll do that later today. Thanks.

or wait for #18336 to get merged, that way we don't have to add another file here

@kaushalmodi
Copy link
Contributor Author

@timotheecour Looks like waiting for your PR merge is the only option 😃

 tests/errmsgs/t14407.nim c

Failure: reMsgsDiffer
Expected:
t14407.nim(11, 3) Hint: 'v0.99' is declared but not used [XDeclaredButNotUsed]
t14407.nim(12, 3) Hint: 'v0.99.99' is declared but not used [XDeclaredButNotUsed]


Gotten:
Hint: used config file '/home/vsts/work/1/s/config/nim.cfg' [Conf]
Hint: used config file '/home/vsts/work/1/s/config/config.nims' [Conf]
Hint: used config file '/home/vsts/work/1/s/tests/config.nims' [Conf]
t14407.nim(12, 3) Hint: 'v0.99.99' is declared but not used [XDeclaredButNotUsed]
t14407.nim(11, 3) Hint: 'v0.99' is declared but not used [XDeclaredButNotUsed]
CC: stdlib_assertions.nim
CC: stdlib_digitsutils.nim
CC: stdlib_system.nim
CC: t14407.nim
Hint:  [Link]
Hint: gc: refc; opt: none (DEBUG BUILD, `-d:release` generates faster code)
32505 lines; 0.770s; 25.949MiB peakmem; proj: t14407; out: t14407 [SuccessX]

@timotheecour
Copy link
Member

ping now that #18336 was merged

@kaushalmodi kaushalmodi force-pushed the add-test-issue-14407 branch from 915be25 to 3a6b7f2 Compare June 24, 2021 14:28
@kaushalmodi
Copy link
Contributor Author

@timotheecour PTAL This PR now passes the CI.

@Araq Araq merged commit f128f79 into nim-lang:devel Jun 24, 2021
PMunch pushed a commit to PMunch/Nim that referenced this pull request Mar 28, 2022
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

Successfully merging this pull request may close these issues.

backticks : Float-like part of a variable identifier is changed in [XDeclaredButNotUsed] Hint
4 participants