Repository navigation
[http-client-java] Remove Node APIs outside Java execution - #12511
Merged
Timothee Guerin (timotheeguerin) merged 2 commits intoNov 6, 2026
Merged
Timothee Guerin (timotheeguerin) merged 2 commits into
Timothee Guerin (timotheeguerin) merged 2 commits into
Conversation
Contributor
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
Timothee Guerin (timotheeguerin)
marked this pull request as ready for review
November 6, 2026 14:22
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Java emitter’s compiler-API cleanup.
No open issues 🎉
What changed in this PR
This PR reduces Node.js dependencies in the Java emitter by using TypeSpec compiler APIs outside native Java execution. It prepares for future playground support but does not enable browser execution itself.
Changes:
- Replace Node assertions with
compilerAssertfor model invariants. - Use compiler-host APIs for directory creation and resource-path resolution.
- Add an internal changelog entry; native Java process execution remains unchanged.
| File | Description |
|---|---|
packages/http-client-java/emitter/src/emitter.ts |
Replace Node filesystem and path helpers with compiler APIs. |
packages/http-client-java/emitter/src/code-model-builder.ts |
Replace Node assertion failures with compiler assertions. |
.chronus/changes/http-client-java-browser-safe-utilities.md |
Document the internal portability cleanup. |
Review effort: Balanced
Weidong Xu (weidongxu-microsoft)
approved these changes
Nov 6, 2026
Alan Zimmer (alzimmermsft)
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Java emitter uses Node-only assertions and filesystem helpers outside the native generator runner. These dependencies complicate running the emitter in the playground and mix portability cleanup into the WASM work.
Use
compilerAssertfor model invariants and compiler-host APIs for directory creation and resource-path resolution. This separates the runtime-independent cleanup from the Java playground prototype: Azure/typespec-azure#5988.The runtime-source scan leaves only
child_process, used forjava -versionand launching the generator JAR. Those paths are unchanged and remain for the WASM follow-up; this PR does not enable browser execution by itself.