Skip to content

feat(compiler): Add back empty project template to tsp init - #11476

Merged
iscai-msft merged 3 commits into
mainfrom
copilot/add-back-empty-project-tsp-init-option
Jul 30, 2026
Merged

feat(compiler): Add back empty project template to tsp init#11476
iscai-msft merged 3 commits into
mainfrom
copilot/add-back-empty-project-tsp-init-option

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Restores the "Empty project" option to tsp init — users wanted a minimal scaffold to start from scratch rather than being forced to choose a richer template.

Changes

  • templates/scaffolding.json — Added "empty" template (no libraries, no emitters, basic kind: project config)
  • templates/__snapshots__/empty/ — Snapshot files for the generated output: empty main.tsp, minimal package.json (compiler-only), standard tspconfig.yaml and .gitignore
  • test/e2e/init-templates.e2e.ts — Added snapshot generation and compile validation for the empty template

The empty template produces:

my-project/
├── .gitignore
├── main.tsp          # empty — start here
├── package.json      # @typespec/compiler only
└── tspconfig.yaml    # kind: project + commented options

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI linked an issue Jul 30, 2026 that may be closed by this pull request
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the compiler:core Issues for @typespec/compiler label Jul 30, 2026
Copilot AI changed the title [WIP] Add back empty project tsp init option feat(compiler): Add back empty project template to tsp init Jul 30, 2026
Copilot AI requested a review from timotheeguerin July 30, 2026 12:19
@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@11476

commit: 65ce066

@timotheeguerin

Copy link
Copy Markdown
Member

@copilot did you rebuild?

Run node eng/common/scripts/check-for-changed-files.ts
 M packages/compiler/templates/scaffolding.json

ERROR: Files above were changed during PR validation, but not included in the PR.
Include any automated changes such as sample output, spec.html, and ThirdPartyNotices.txt in your PR.
Error: Process completed with exit code 1.

…folding.json

Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot did you rebuild?

Run node eng/common/scripts/check-for-changed-files.ts

...

Fixed in the latest commit. The scaffolding.json is auto-generated by .scripts/build-init-templates.ts — I was editing scaffolding.json directly before. I've now added the empty template to the build script and regenerated scaffolding.json from it.

@timotheeguerin
timotheeguerin marked this pull request as ready for review July 30, 2026 14:55
@azure-sdk-automation

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@iscai-msft
iscai-msft added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 709bcd7 Jul 30, 2026
42 of 44 checks passed
@iscai-msft
iscai-msft deleted the copilot/add-back-empty-project-tsp-init-option branch July 30, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add back empty project tsp init option

3 participants