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

Add code fixer to add [Obsolete] attribute on code that gets an 'obsolete' warning. #28549

Merged
merged 11 commits into from
Jan 3, 2019

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Jul 14, 2018

Fixes one of the cases reported here: #27168

Very simple feature. When it hears about "you're using something obsolete" from teh compiler, offers to add the 'obsolete' attribute itself to your code. Useful when doing something like overriding an obsolete member with something non-obsolete:

image

image

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner July 14, 2018 21:07
@CyrusNajmabadi
Copy link
Member Author

Tagging @dotnet/roslyn-ide @jcouv . Tests incoming.

@sharwell sharwell added the Need Design Review The end user experience design needs to be reviewed and approved. label Jul 14, 2018
@jcouv jcouv added the Area-IDE label Jul 15, 2018
@CyrusNajmabadi
Copy link
Member Author

@sharwell Do you have any other concerns?
@dotnet/roslyn-ide can i get eyes on this?

@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Jul 26, 2018
@CyrusNajmabadi
Copy link
Member Author

@sharwell Do you have any other concerns?
@dotnet/roslyn-ide can i get eyes on this?

Have the design concerns been discussed?

@jinujoseph jinujoseph added this to the 16.0 milestone Aug 8, 2018
@sharwell
Copy link
Member

@CyrusNajmabadi If the two remaining warnings I pointed out before (CS1062, CS1064 for collection initializers) can be implemented without a problem, it would be nice to have the complete feature done. Otherwise the primary code fix design here is approved. If there is a reason why it would be problematic to implement the last two cases, please let us know.

@sharwell sharwell removed the Need Design Review The end user experience design needs to be reviewed and approved. label Aug 13, 2018
@CyrusNajmabadi
Copy link
Member Author

@CyrusNajmabadi If the two remaining warnings I pointed out before (CS1062, CS1064 for collection initializers) can be implemented without a problem, it would be nice to have the complete feature done. Otherwise the primary code fix design here is approved. If there is a reason why it would be problematic to implement the last two cases, please let us know.

Should be no problem. Will do tonight/tomorrow.

Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs tests, but the implementation is looking complete. @CyrusNajmabadi if you won't be able to get the tests let me know and I'll try to find some time to add them to the branch you started.

@CyrusNajmabadi
Copy link
Member Author

@jaredpar @jasonmalinowski something is causing the CI system to cancel testing PRs:

image

@CyrusNajmabadi
Copy link
Member Author

@sharwell this is ready to go in. Can you look?

@jaredpar
Copy link
Member

jaredpar commented Nov 9, 2018

something is causing the CI system to cancel testing PRs

Are you referring to the behavior that when you push it cancels the PR builds that are in progress? If so I've already given the AzDev team the feedback that this behavior needs to be configurable. I specifically sent them some of our PRs as examples of how our users take advantage of the testing happening on every push. Fixing this is in the works but don't expect it anytime soonish.

@CyrusNajmabadi
Copy link
Member Author

Are you referring to the behavior that when you push it cancels the PR builds that are in progress?

Wat... is that what's happening? What sort of crazy CI behavior is that? :-/

If so I've already given the AzDev team the feedback that this behavior needs to be configurable. I specifically sent them some of our PRs as examples of how our users take advantage of the testing happening on every push. Fixing this is in the works but don't expect it anytime soonish.

Ok, great. Thanks for sending that message along. Let them know that a CI/CD system that doesn't actually do the 'C' part is really lacking :)

@CyrusNajmabadi
Copy link
Member Author

@jaredpar Feel free to point the devops team at their own messaging of the product: https://docs.microsoft.com/en-us/azure/devops/learn/what-is-continuous-integration

Continuous Integration (CI) is the process of automating the build and testing of code every time a team member commits changes to version control.

Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still missing tests for the following:

  • Cases where error: true is used (it would be good to create this test as a theory so it's easy to verify that the fix is offered if and only if error: false is used)
  • Obsolete collection initializer warnings

@CyrusNajmabadi
Copy link
Member Author

@sharwell

Cases where error: true is used

Tests added.

Obsolete collection initializer warnings

These tests are here already.

Thanks!

@sharwell
Copy link
Member

sharwell commented Jan 2, 2019

@jinujoseph for approval

@CyrusNajmabadi
Copy link
Member Author

@jinujoseph this can go in. thanks!

@sharwell sharwell merged commit e43eb38 into dotnet:master Jan 3, 2019
@CyrusNajmabadi
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved to merge Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee. Feature Request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants