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

Refit should emit diagnostics for invalid interfaces #1885

Open
TimothyMakkison opened this issue Oct 18, 2024 · 0 comments
Open

Refit should emit diagnostics for invalid interfaces #1885

TimothyMakkison opened this issue Oct 18, 2024 · 0 comments

Comments

@TimothyMakkison
Copy link
Contributor

Refit should emit diagnostic warnings and errors for invalid methods and interfaces. Many exceptions in RequestBuilderImplementation could be statically determined via a source generator.

  • Invalid url backslash
  • Multiple CancellationToken params
  • HeadersCollection must be IDictionary

Severity to be determined layer.

More advanced checks may to read the attribute values. It isn't required but I'd prefer to reference ../Refit.csproj and construct each attribute in the source generator. I don't know if this could cause issues 🤔

Would this be considered to be a breaking change? It may prevent users from building code that previously ran, although it was likely invalid.

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
@TimothyMakkison and others