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

Deprecation warnings for enum values print twice #8063

Closed
kaushalmodi opened this issue Jun 18, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@kaushalmodi
Copy link
Contributor

commented Jun 18, 2018

As an example, styleUnknown value of the Style enum in terminal.nim was deprecated in devel in 4616b28 using:

{.deprecated: [styleUnknown: styleItalic].}

Now below:

import terminal
stdout.styledWriteLine("italic text ", {styleUnknown})

prints the same warning twice:

...
Hint: ospaths [Processing]
test_styleUnknown_deprecation.nim(2, 41) Warning: use styleItalic instead; styleUnknown is deprecated [Deprecated]
test_styleUnknown_deprecation.nim(2, 41) Warning: use styleItalic instead; styleUnknown is deprecated [Deprecated]
@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2019

Above example doesn't work any more after the deprecation of styleUnknown was removed in 3f6168b#diff-ce51b27013ff02147c2d9740d61704b8L485.

@kaushalmodi

This comment has been minimized.

Copy link
Contributor Author

commented Jan 8, 2019

Here is a new test case:

type
  Foo* = enum
    fooX

{.deprecated: [fooA: fooX].}

let
  foo: Foo = fooA

echo foo

Though, looks like this bug of "double printing of deprecation" got fixed by some other commit. This is fixed as of d0366c5.

@timotheecour Any help on how to add test case for this before I close this issue? Thanks!

@narimiran

This comment has been minimized.

Copy link
Member

commented Jan 30, 2019

Though, looks like this bug of "double printing of deprecation" got fixed by some other commit.

On my end also looks ok.

Any help on how to add test case for this before I close this issue?

Three weeks was enough of waiting time. I'm closing this.

@narimiran narimiran closed this Jan 30, 2019

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 30, 2019

timotheecour added a commit to timotheecour/Nim that referenced this issue Jan 30, 2019

@timotheecour

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

@timotheecour Any help on how to add test case for this before I close this issue? Thanks!

=> #10508

Three weeks was enough of waiting time. I'm closing this.

@kaushalmodi just ping me again next time :)

Araq added a commit that referenced this issue Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.