Skip to content
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

Introducing @typespec/http-client-js #6178

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

joheredi
Copy link
Member

This PR introduces the new JavaScript emitter under the package @typespec/http-client-js. This emitter is built using @alloy-js and the new Emitter Framework, leveraging its structured and modular approach for code generation.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 27, 2025

All changed packages have been documented.

  • @typespec/compiler
  • @typespec/emitter-framework
  • @typespec/http-client
Show changes

@typespec/compiler - fix ✏️

Export missing type DiscriminatedUnionLegacy

@typespec/http-client - feature ✏️

Improvements to HttpClient context provider

@typespec/emitter-framework - fix ✏️

Improvements on the TestHarness

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 27, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@joheredi joheredi force-pushed the feature/js-emitter branch 2 times, most recently from fb08dfa to 5208264 Compare February 27, 2025 06:40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you meant to have this emitter part of our workspace, in this case it probably shouldn't have it own CI as it should run as part of the workspace CI

Copy link
Member Author

@joheredi joheredi Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spoke with Tim offline, we'll keep the emitter outside of the workspace and will bring it in once TypeSpec goes 1.0.0

Edit: Had a further discussion with Tim, and we’ve decided that keeping the emitter within the workspace provides a faster development feedback loop. We’ll aim to retain it within the workspace while being cautious of the risks given how close we are to release.

We'll hold off on merging this PR until Tuesday, and in the meantime, I’ll gather some data to assess its impact on CI runs. As a preliminary measurement, running pnpm test:e2e—which involves generating 52 Spector specs and executing all Spector tests—takes under a minute on a dev machine (44 seconds for spec generation, 8 seconds for test execution). I’ll collect similar CI data for comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants