-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add an option to split generated pilota files #510
Add an option to split generated pilota files #510
Conversation
@Millione @PureWhiteWu Hi. I couldn't find tests for the related builders, could you please point me to one if they exist? |
Perhaps you can add one integration test in the tests folder for workspace mode?The builder is here https://github.com/cloudwego/volo/blob/main/volo-build/src/workspace.rs#L11 |
6706960
to
029121d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here can we split it in files?
@missingdays Hi, are things going well here? |
@Millione Hi, I'm waiting for the reply here - #510 (comment) |
Sorry for that, I forgot to say that can you check out why the generated code fails to compile in split mode? It seems related to the split mode implementation in pilota-build |
@Millione As I mentioned, Windows cannot handle files that only differ by case. For |
Maybe we can change the filename that only differ by case a little bit? For |
We can do that, I'll try to implement it |
@Millione Please see cloudwego/pilota#280. I added a test as well |
@missingdays cloudwego/pilota#280 gets merged, can you check out whether it works fine for here?
There is one more question left. There are some structs generated in one file because of volo-build, I think we should split it either. |
The tests pass now
In
stream.start_new_file_generation("ServiceResponseRecv.rs");
stream.push_str(...); // push the impl of ServiceResponseRecv
stream.finish_file_generation(); This way,
|
@missingdays Great thoughts. Point 2 and 3 look good to me, I think you can go for it. |
@Millione After exploring the code a bit more, I realized that we could use |
@Millione Hi. Splitting |
@missingdays I think it will still be too large and leaving it unsplit looks inconsistent to the user. Is the workload heavy? Can you elaborate on what you're going to do? We can work on it together to find out the best solution. |
@Millione you are right, it would be inconsistent. |
@missingdays Yes, I think it is needed here either. |
@Millione I added the functionality to split the services generated by As for the name deduplication, I didn't find a good way to do it. What would be the correct way to get all the needed service names so that we could check if the service name already exists? |
5e77d36
to
61aab66
Compare
@Millione Most of the changes should work for grpc as well. Only the splitting in |
@missingdays Yes, I agree with you. |
@Millione so what do you think, should we merge this change without the grpc support? |
@missingdays I think it's okay to merge this change for thrift users to get along with the benefits as soon as possible. But can you support the grpc later since it's almost the same job for thrift? |
51bc92e
to
2b9b79c
Compare
@Millione Yes, I'll get to that as soon as I can |
Fixes #454