-
Notifications
You must be signed in to change notification settings - Fork 522
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
RFC: rgen transformer #21703
Comments
Are the arguments positional or named? |
named |
Could this be a Roslyn analyzer and code-fix? Wouldn't that make the usage from IDE more intuitive? |
@filipnavara we can move it too a code-fix too but we need to update all our bindings, which is going t be faster with a specific tool. Doing it in a code-fix or analyzer won't be manageable for our team, might be a good idea to provide it as a code-fix for smaller SDKs sharing the code with out tool. |
Code fixes can be applied to a whole file/project at once. There are even ways to run them automatically, dotnet/upgrade-assistant used to do that. |
To expand on the previous comment, the Roslynator CLI can apply analyzer code fixes project wide:
|
Objective
The rgen transformer tool is a key component in the transition from using reflection-based code generation as currently used in bgen to the new Roslyn based approach.
The objective of the transformer is to convert the old bindings to a format compatible with the new Roslyn-based code generator. For example, this will include converting interfaces to classes and updating outdated attributes.
Since this will be a 1:1 mapping, this allows for these transformations to be automated- significantly reducing manual intervention, helps to mitigate errors, and will expedite the transition process.
Workflow
rgen transformer will be a .NET command line tool that will load syntax trees from existing files containing the old bindings and perform transformations on the encountered nodes.
The tool will accept the following arguments:
The workflow will be as follows:
Testing
Throughout the development workflow, thorough unit tests will be added to ensure the tool works as expected, integrates well with the existing codebase, and is effective is providing a smooth transition to the new code generator.
Distribution
The tool will be available to download as a .NET global tool via NuGet as
dotnet-rgen-transform
(or something along those lines, name is subject to change). This ensures the tool will be accessible for both internal developers and external customers.The text was updated successfully, but these errors were encountered: