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

ExecuteTaskAsync marked as obsolete #1401

Closed
tomgallard opened this issue Jan 10, 2020 · 6 comments
Closed

ExecuteTaskAsync marked as obsolete #1401

tomgallard opened this issue Jan 10, 2020 · 6 comments

Comments

@tomgallard
Copy link
Contributor

Expected Behavior

Methods only marked as obsolete if there is an alternative available to use.

Actual Behavior

All the async methods on IRestClient have been marked as obsolete ( e.g. ExecuteTaskAsync which returns Task<IRestResponse> .

This means a whole load of compile time warnings/errors (all of our projects have warnings as errors enabled).

The only way round this is to either suppress this specific compile time warning (undesirable as will not then pick up on other uses of obsolete methods), or to go through and individually suppress the warning for each usage of these methods (hundreds of lines of code changes).

I would understand the use of Obsolete here if there was another alternative method call we should be using instead- but there isn't ! I'm not sure of the value that the Obsolete attribute is providing on these ExecuteTaskAsync methods- these are not obsolete as far as I can see as there is no alternative to use? Nor is it really useful to be told these are going to be renamed - as there's nothing I can do about it anyway.

Steps to Reproduce the Problem

  1. Write some code using IRestClient, call ExecuteTaskAsync
  2. Observe that compile warnings are created

Specifications

  • Version: 106.10.0 (commit 620a0fe )
  • Platform:
  • Subsystem:
@BrammyS
Copy link

BrammyS commented Jan 10, 2020

I ran into the same problem.

@alexeyzimarev
Copy link
Member

I am open to suggestions. The naming is bad in the first place. ExecuteAsync should've been used but it is how it is, the ExecuteAsync method is now used for the method signature that uses callback delegate and other parameters and that method will be removed.

@BrammyS
Copy link

BrammyS commented Jan 10, 2020

Okay that explains it a bit more.
I'm just going to have to ignore those warnings for now then.

@alexeyzimarev
Copy link
Member

Ok, I am able to make the ExecuteAsync method with the same signature as ExecuteTaskAsync.

I will continue moving to new names as far as signatures don't overlap. Hopefully, the next version will be better in that regard.

alexeyzimarev added a commit that referenced this issue Jan 11, 2020
@alexeyzimarev
Copy link
Member

Ok, I completed the work on new methods now.

@tomgallard
Copy link
Contributor Author

Thanks for sorting

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

3 participants