Skip to content

Commit c14f9cd

Browse files
authored
Merge branch 'main' into copilot/typespec-ts-fail-to-build-multi-client-packages
2 parents 5bfefe9 + 6e9b765 commit c14f9cd

245 files changed

Lines changed: 6594 additions & 4128 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: fix
4+
packages:
5+
- "@azure-tools/typespec-ts"
6+
---
7+
8+
Add the license header to emitted `.mts`/`.mjs` files (e.g. the browser and react-native static helper variants such as `get-binary-stream-response-browser.mts`), which were previously skipped because the source-code detection only matched `.ts`/`.js` extensions.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@azure-tools/typespec-client-generator-core"
5+
---
6+
7+
Detect operation name conflicts when multiple services are combined into one client via `@client({service: [ServiceA, ServiceB]})`. Previously only same-namespace duplicates were caught; now cross-service operation name collisions emit the existing `duplicate-client-name` diagnostic.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@azure-tools/typespec-go"
5+
---
6+
7+
Write the typespec-go spector coverage report to the shared `@azure-tools/azure-http-specs/spec-coverage.json` location so the CI coverage upload uses the same convention as other emitters.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: feature
3+
packages:
4+
- "@azure-tools/typespec-go"
5+
---
6+
7+
During SDK generation, if a go.mod file exists, its module identity is used as the source of truth, including any major version suffix. This alleviates the need to update tspconfig.yaml whenever a new major version is required.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@azure-tools/typespec-go"
5+
- "@azure-tools/typespec-python"
6+
- "@azure-tools/typespec-ts"
7+
- "@azure-tools/typespec-java"
8+
---
9+
10+
Introduce a standardized opt-in `spector.config.yaml` for selecting which spector tests each emitter generates, loaded by the shared `@azure-tools/spector-runner` package (with a JSON schema generated from TypeSpec). Wire it into the Go (`tspcompile.js`), Python (`regenerate.ts`), TypeScript (`gen-spector.js`) and Java (`Generate.ps1`) regenerators. No change to the set of generated specs.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@azure-tools/typespec-client-generator-core"
5+
---
6+
7+
Add reference documentation for TCGC diagnostics so each diagnostic gets an auto-generated reference page.

.devcontainer/Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
FROM mcr.microsoft.com/devcontainers/javascript-node:20
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
22

3-
RUN corepack enable pnpm \
4-
&& echo 'alias pnpm="corepack pnpm"' >> /home/node/.bash_aliases
3+
# Install mise for toolchain management (node, pnpm, python, go, java, etc.)
4+
RUN curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh \
5+
&& echo 'eval "$(/usr/local/bin/mise activate bash)"' >> /home/vscode/.bashrc \
6+
&& echo 'eval "$(/usr/local/bin/mise activate zsh)"' >> /home/vscode/.zshrc
7+
8+
# Pre-install all toolchain versions pinned in mise.toml/mise.lock into the image
9+
COPY mise.toml mise.lock /tmp/mise-setup/
10+
RUN chown -R vscode:vscode /tmp/mise-setup
11+
USER vscode
12+
RUN cd /tmp/mise-setup && mise trust && mise install
13+
USER root
514

615
RUN git config --global submodule.recurse true

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "Standard",
33
"build": {
4-
"dockerfile": "Dockerfile"
4+
"dockerfile": "Dockerfile",
5+
"context": ".."
56
},
6-
"postCreateCommand": "git submodule update --recursive --init",
7+
"postCreateCommand": "git submodule update --recursive --init && mise trust && pnpm install",
78
"customizations": {
89
// Configure properties specific to VS Code.
910
"vscode": {

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
* @bterlson @markcowl @timotheeguerin
1+
* @markcowl @timotheeguerin @xirzec
22

3-
/packages/typespec-client-generator-core @lmazuel @m-nash @iscai-msft @srnagar @joheredi
3+
/packages/typespec-client-generator-core @lmazuel @m-nash @iscai-msft
44
/packages/typespec-ts @maorleger @qiaozha @MaryGao @JialinHuang803 @xirzec
5-
/packages/azure-http-specs/specs/ @iscai-msft @lmazuel @m-nash @joheredi @srnagar @weidongxu-microsoft @tadelesh @jhendrixMSFT
5+
/packages/azure-http-specs/specs/ @iscai-msft @lmazuel @m-nash @weidongxu-microsoft @tadelesh @jhendrixMSFT @xirzec
66

7-
/docs/howtos/DataPlane*/ @lmazuel @m-nash @iscai-msft @srnagar @joheredi
7+
/docs/howtos/DataPlane*/ @lmazuel @m-nash @iscai-msft @xirzec
88

9-
/packages/typespec-python @iscai-msft @msyyc @tadelesh @l0lawrence @ChenxiJiang333 @kashifkhan
10-
/packages/typespec-java @weidongxu-microsoft @haolingdong-msft @XiaofeiCao @alzimmermsft
9+
/packages/typespec-python @iscai-msft @msyyc @tadelesh @l0lawrence @ChenxiJiang333 @kashifkhan @xirzec
10+
/packages/typespec-java @weidongxu-microsoft @haolingdong-msft @XiaofeiCao @alzimmermsft @jsquire
1111
/packages/typespec-go @jhendrixMSFT @HeathS @xirzec @lirenhe

.github/copilot-instructions.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
This document serves as an index to task-specific instructions for GitHub Copilot. Each task has its own detailed instructions file in the `.github/prompts` directory.
44

5+
## Development Environment (mise)
6+
7+
This repo pins its development tools with [mise](https://mise.jdx.dev) via `mise.toml` and `mise.lock`: Node.js, pnpm, Python, uv, Go, Java, and Maven.
8+
9+
- Check for mise first (`mise --version`). If it is installed, prefer the mise-managed tools over whatever happens to be on `PATH` — a globally installed `node`/`pnpm`/`python` is often the wrong version or misconfigured.
10+
- A fresh clone or git worktree is untrusted, so mise refuses to load its config. If you see `Config files in ... are not trusted`, run `mise trust` from the repo root, then continue.
11+
- Run `mise install` from the repo root to install the pinned versions. It is a fast no-op (`mise all tools are installed`) when everything is already present, so it is safe to run before other setup.
12+
- Non-interactive shells (including the ones agents run commands in) usually do not have mise activated, so the pinned tools are not on `PATH`. Prefix commands with `mise exec --` (for example `mise exec -- pnpm install`, `mise exec -- pnpm build`, `mise exec -- python --version`). Without it, commands can fail with confusing errors such as `The packageManager dependency "pnpm@..." in pnpm-lock.yaml must use a registry package path`.
13+
- Use `mise ls --current` to confirm which tool versions are active for this repo.
14+
- If mise is not installed, fall back to the tools on `PATH`, but match the versions in `mise.toml` and the `packageManager` field in `package.json`.
15+
516
## Install and Build
617

718
- Packages are located in the `packages` folder
8-
- Use `pnpm` as the package manager
19+
- Use `pnpm` as the package manager (prefix with `mise exec --` when mise is installed but not activated in the shell)
920
- Use `pnpm install` to install dependencies
1021
- Use `pnpm build` to build every package
1122
- Use `pnpm -r --filter "<pkgName>..." build` to build to a specific package `<pkgName>`
@@ -27,6 +38,7 @@ This document serves as an index to task-specific instructions for GitHub Copilo
2738

2839
- When creating worktrees or branches for new work, base them off the main Azure fork's `main` branch (Azure/typespec-azure). Depending on the user's local git remote setup, this may be called `upstream` or `origin`.
2940
- When creating worktrees (which clone the repo), always clone recursively with `--recurse-submodules` and run `git submodule update --init` if the `core/` submodule is missing or not at the correct commit. See [CONTRIBUTING.md - Cloning recursively](https://github.com/Azure/typespec-azure/blob/main/CONTRIBUTING.md#cloning-recursively) for details.
41+
- A new clone or worktree also needs `mise trust` (and `mise install` if tools are missing) before `pnpm` and other tools will work — see [Development Environment (mise)](#development-environment-mise).
3042
- When pushing changes and creating pull requests, push to your personal fork and open PRs against the main Azure fork's `main` branch.
3143

3244
## Available Task Instructions

0 commit comments

Comments
 (0)