Uh oh!
There was an error while loading. Please reload this page.
http-client-java, clean generated java files in emitter - #8301
Conversation
366e7d9 to
bb21c2bCompareNo changes needing a change description found. |
You can try these changes here
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements functionality to clean generated Java files in the http-client-java emitter to address issue #8278. The implementation adds file deletion capabilities that identify and remove previously generated Java files before writing new ones, with support for partial updates.
- Added
deleteGeneratedJavaFilesmethods toFileUtilclass that can identify and delete generated Java files based on code generation markers - Updated file writing methods to return
Pathinstead ofFilefor consistency - Integrated the deletion functionality into both fluent and DPG code generation workflows
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
FileUtil.java | Added methods to delete generated Java files with marker detection and updated writeToFile to return Path |
FileUtilTests.java | Added comprehensive tests for the new file deletion functionality |
TypeSpecFluentPlugin.java | Updated to use new Path-returning writeToFile method |
TypeSpecPlugin.java | Updated to use new Path-returning writeToFile method |
Main.java | Integrated file deletion logic into both fluent and DPG generation workflows |
PartialUpdateOpsImpl.java | Deleted generated file (demonstrates the cleanup functionality) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
213fef8 to
d655baaCompare045fe1b to
5bbaed7CompareHaoling Dong (haolingdong-msft)
commented
Aug 29, 2025
Do we want to run autorest validation CI? |
I think there is no need. The code change (Main, TypeSpecPlugin##) is for TypeSpec along. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fix#8278
Limited to
srcfolder (as in practice I found without this limit, lot of IO on files innode_modules)Will do regen sync, and maybe more tests after release.