Skip to content

Don't include service-worker in main tsconfig project #248748

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented May 12, 2025

@mjbvz mjbvz self-assigned this May 12, 2025
@mjbvz mjbvz enabled auto-merge May 12, 2025 17:37
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

@vs-code-engineering vs-code-engineering bot added this to the May 2025 milestone May 12, 2025
@jakebailey
Copy link
Member

Thank you!

@mjbvz
Copy link
Collaborator Author

mjbvz commented May 23, 2025

@bpasero @jrieken This is more difficult than expect and I don't think I'll have time to get to it this iteration

I think the most correct approach would be to create a new tsconfig.service-worker.json just for the service worker script:

{
	"extends": "./tsconfig.base.json",
	"compilerOptions": {
		"composite": true,
		"outDir": "../out/vs",
		"lib": [
			"ES2022",
			"webworker"
		],
		"types": []
	},
	"files": [
		"./vs/workbench/contrib/webview/browser/pre/service-worker.ts"
	]
}

We can then use project references to make sure this project is compiled as part of the main tsconfig.json project

In my testing this fixed tuning tsc -p src/tsconfig.json but it doesn't work with our custom build pipeline. I'm not sure if there's a way to get it to project references to work with tsb

@mjbvz mjbvz modified the milestones: May 2025, June 2025 May 23, 2025
@mjbvz mjbvz mentioned this pull request May 23, 2025
@jrieken
Copy link
Member

jrieken commented May 26, 2025

tsb doesn't support project references and I don't think it ever will (given real fast compile times are on the horizon). Can't we just create yet another gulp compile task for this?

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.

5 participants