-
Notifications
You must be signed in to change notification settings - Fork 81
Migrate @azure-tools/typespec-go from autorest.go into this repo #4628
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
Open
tadelesh
wants to merge
42
commits into
main
Choose a base branch
from
go-migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
a85a74c
Go emitter migrate to typespec-azure repo
318d074
fix lint
9766f31
Merge remote-tracking branch 'origin/main' into go-migration
f9acb87
fix(ci-go): quote command substitutions to satisfy shellcheck SC2086
3c03b63
fix(typespec-go): fix spelling typos and configure cspell
ff41435
fix(cspell): lowercase Go emitter words for case-insensitive matching
22d28c5
chore: sync labels for emitter:go
f184a20
fix(ci-go): use full pnpm install for unit/docs jobs
2bec532
fix(typespec-go): un-ignore test fixtures required by regenerate
cbd0588
chore: re-sync labels to align emitter order with eng/config/labels.ts
8913669
update
db99e1a
chore: sync CONTRIBUTING.md banner with sync-labels script output
788114b
feat(typespec-go): auto-sync generated tests with azure-sdk-assets ba…
dd74d9a
docs(typespec-go): document syncBaseline conflict semantics
c0e06fa
build: add go to mise tools
52b6d86
update
33fbf2f
update lock file
f521ecb
fix(typespec-go): drop stale source-map-support import
c92d47b
docs(typespec-go): add development guide
881fb8f
docs(typespec-go): build via turbo, not tsc directly
5fd74f2
docs(typespec-go): document installing golangci-lint and shadow locally
e471cb6
refine doc
f07167b
update cspell
81707a2
test(typespec-go): run go tests across local, http-specs, azure-http-…
8bfba84
fix(typespec-go): discover go tests by module to skip disabled specs
f1af5c6
test(typespec-go): lint all test roots; drop redundant test-file filter
9511cbe
refine doc
f59b155
Use adapted type when adapting a literal enum value
955ce9a
Merge remote-tracking branch 'origin/main' into go-migration
992ed89
Merge remote-tracking branch 'origin/main' into go-migration
483ca99
build: update pnpm-lock.yaml for merged core submodule
8904cd8
format
3759486
fix(typespec-go): resolve lint failures (deprecation warnings + OOM)
8a84128
revert
tadelesh 35af6d2
Merge branch 'main' into go-migration
tadelesh 538e211
fix merge issue
tadelesh d9cd537
chore: regenerate label policy files via sync-labels
298a2f7
test(typespec-go): disable armcognitiveservices regen (TCGC override …
12e847f
Merge remote-tracking branch 'origin/main' into go-migration
86dd12d
remove all arm tests
6300d67
ci: migrate sdk-regenerate pipeline from autorest.go
f63d29b
Revert "ci: migrate sdk-regenerate pipeline from autorest.go"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
.chronus/changes/typespec-go-move-into-typespec-azure-2026-06-11-14-30-00.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| changeKind: internal | ||
| packages: | ||
| - "@azure-tools/typespec-go" | ||
| --- | ||
|
|
||
| Move `@azure-tools/typespec-go` from `Azure/autorest.go` into `Azure/typespec-azure`. The previously-private workspace packages `@azure-tools/codegen.go`, `@azure-tools/codemodel.go`, and `@azure-tools/naming.go` are now inlined into `src/codegen`, `src/codemodel`, and `src/naming` respectively. No behavior changes for emitter consumers. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Setup Go | ||
|
tadelesh marked this conversation as resolved.
|
||
| description: Setup Go for typespec-go package development and CI | ||
| inputs: | ||
| go-version: | ||
| required: false | ||
| description: Go version for setup-go | ||
| default: "1.26.1" | ||
|
|
||
| runs: | ||
| using: composite | ||
|
|
||
| steps: | ||
| - name: Setup Go ${{ inputs.go-version }} | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: ${{ inputs.go-version }} | ||
| cache: false | ||
|
|
||
| - name: Log Go version | ||
| shell: bash | ||
| run: go version | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| name: "go / test e2e" | ||
|
tadelesh marked this conversation as resolved.
|
||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - release/* | ||
| paths: | ||
| - "packages/typespec-go/**" | ||
| - ".github/workflows/ci-go.yml" | ||
| - ".github/actions/setup-go/**" | ||
| merge_group: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: "Build" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build | ||
| run: pnpm turbo run --filter "@azure-tools/typespec-go..." build | ||
|
|
||
| test: | ||
| name: "Mock API Tests (Go ${{ matrix.go-version }})" | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| go-version: ["1.26.1", "1.25.8"] | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - uses: ./.github/actions/setup-go | ||
| with: | ||
| go-version: ${{ matrix.go-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build | ||
| run: pnpm turbo run --filter "@azure-tools/typespec-go..." build | ||
|
|
||
| - name: Build spector and specs | ||
| run: | | ||
| pnpm turbo run --filter "@typespec/spector..." build | ||
| pnpm --filter "@typespec/http-specs" exec tsc -p ./tsconfig.build.json | ||
| pnpm --filter "@azure-tools/azure-http-specs" exec tsc -p ./tsconfig.build.json | ||
|
|
||
| - name: Install Go lint tools | ||
| run: | | ||
| go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest | ||
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.11.4 | ||
| echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Regenerate | ||
| run: pnpm run regenerate | ||
| working-directory: packages/typespec-go | ||
| env: | ||
| TYPESPEC_GO_SKIP_BASELINE: "1" | ||
|
|
||
| - name: Lint | ||
| run: pnpm run lint:go | ||
| working-directory: packages/typespec-go | ||
|
|
||
| - name: Run Go e2e tests against spector | ||
| run: pnpm run test:go:e2e | ||
| working-directory: packages/typespec-go | ||
|
|
||
| unit: | ||
| name: "Unit Tests" | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build | ||
| run: pnpm turbo run --filter "@azure-tools/typespec-go..." build | ||
|
|
||
| - name: Test | ||
| run: pnpm run test:ci | ||
| working-directory: packages/typespec-go | ||
|
|
||
| docs: | ||
| name: "Docs Validation" | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: ./.github/actions/setup | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build | ||
| run: pnpm turbo run --filter "@azure-tools/typespec-go..." build | ||
|
|
||
| - name: Regenerate emitter docs | ||
| run: pnpm run regen-docs | ||
| working-directory: packages/typespec-go | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| [tools] | ||
| python = "3.12" | ||
| uv = "latest" | ||
| go = "1.26.1" | ||
| java = "microsoft-11" | ||
| maven = "3.9.16" |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
doesn't need to be part of this PR if the emitter wasn't built to handle it nicely but did you try to add it to the playground as well?
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.
do you mean let playground could review go emitted code? that's not the goal for this pr. we just want to do the migration first before deprecate autorest.go.