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

[Question] Is it possible to detect breaking changes on Attribute Level #548

Open
Lorilatschki opened this issue Apr 30, 2024 · 1 comment
Labels

Comments

@Lorilatschki
Copy link

Lorilatschki commented Apr 30, 2024

We currently planning to use CommandLineUtiles across our CLI tools. Since we want to ensure, that CLIs won't break in both, CLI level as well as behavior level (assuming a optional parameter in version 1.0.0 will be changed to a required parameter) we are looking for tooling support for that.

We found the PublicApiAnalyzers which will help to keep track on public properties/methods/types in general. With that, we can track adding new options or removed options within a CLI. So far so good.
However, if an optional parameter is accidently changed in terms of the attached [Option(...)] attribute to be mandatory now, we would like to have a similar approach to get notified or even build errors when a option is changed in a way, that it would result in a breaking change to a previous released version of the CLI tool.

We do have tests in place which testing the CLI, however having such a quality gate in place even before the tests are executed increases the quality and fast feedback.

We can implement such a roslyn analyzer our self, which also keep track on the attached attributes, maybe there is far better way to achieve this.

@natemcmaster
Copy link
Owner

The analyzers you referenced (which we also use in this project) are intended to detect changes to your library's binary surface. But I think the kind of changes you are looking for are more about ensuring that the available command line arguments and options are stable. For that, I don't know if analyzers will be capable of detecting changes to that. But, if you find a way to do it, feel free to share your findings for future people with similar questions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants