-
Notifications
You must be signed in to change notification settings - Fork 268
[E2E] Streamlining server codegen project scaffolding #5775
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
Comments
After discussion, proposal has been narrowed down. The conversation has mostly converged on 1. Explicit invocation. But I feel we have not given 2. a little more thoughts. Please comment. 1. Explicit Invocation
2. Split between init & compile
|
Feels like it will keep prompting for override which is not great. I don't really like that we require the user to run this script after init again |
@timotheeguerin The reason for running the script after init is that some of the scaffolded components are dependent on the operations in the tsp file, and we anticipate that anyone using The idea of the npm In this scenario, we would also emit a readme.md with next steps, which would be altered based on the installed components, and we would also log next steps in the console, again, based on the emitters selected. |
ok I guess I might not understand fully the folow and what is getting generated.
|
@timotheeguerin Kind of. If I have not done anythjng to implement the service, I would run these two commands, although I would probably run After I have implemented the service, I would just run |
After discussion, here is the resolution:
|
Completed |
Overview:
The Service Codegen can streamline the development process with project scaffolding, making it crucial to scaffold the server project effectively to help users get started efficiently.
The scaffolded project may include various components that experience different levels of modification as the source project evolves:
Modifiable Components:
Unchanged Project Components: These include files such as .csproj and .settings that generally remain untouched.
Potentially Changing Components: Files like program.cs may require modifications as the project evolves.
Always Impacted by Spec Changes: For example, mock classes based on implementation interfaces will often need to be regenerated in response to specification updates.
Always Regenerated Components:
These components are not expected to be modified by users. They should reside in isolated folders to avoid accidental changes and are outside the scope of this discussion.
There are different use cases for when and how users may want to scaffold a project. Striking a balance between requiring explicit steps and always scaffolding the project is crucial to prevent accidental overwrites of user-modified code.
Option 1: Explicit Invocation
Users can run a command to explicitly scaffold the project. To lower the barrier for new users, a standard CLI command such as tsp scaffold could be introduced.
Pros:
Cons:
Option 2: Automatic Invocation in compile Path
In this approach, the project is always scaffolded during the compile process. This requires classifying files and implementing various levels of intelligence to handle modifications appropriately.
Pros:
Cons:
More complex to implement, as it requires advanced logic to detect and handle modifications.
May not align with some users’ expectations if their custom changes are unintentionally affected.
Option 3: Split the scaffolding between init & compile
The text was updated successfully, but these errors were encountered: