Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Integration tests on Apple Silicon attempt to run under Rosetta and fail

Aperta
#1,072 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
electron, node.js, typescript

Direzione di ricerca

In extensions/ql-vscode, inizia da run-integration-tests.ts e dal punto di ingresso npm run integration; poi esamina il comportamento di download.ts di vscode-test a cui si fa riferimento. Riproduci il problema su un M1 Mac e confronta il binario Electron scaricato con il percorso ARM-native utilizzato dalla configurazione di avvio Run and Debug. Il lavoro è completato quando il comando avvia un VS Code ARM-native senza Rosetta e i test di integrazione hanno esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug VSCode

Describe the bug
Running npm run integration from the command line on an M1 Mac leads to the following error:

> vscode-codeql@1.5.9 integration
> node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace

Found .vscode-test/vscode-1.63.2. Skipping download.
Running integration tests in these directories: no-workspace,minimal-workspace
Next integration test dir: no-workspace
Launch args: --disable-extensions,--disable-gpu
rosetta error: /var/db/oah/279281325309952_279281325309952/79a831ad051c57eb341ad61bf19eea2efece2baf38aaf9eb68316bb0af278da6/Electron.aot: attachment of code signature supplement failed: 1

Exit code:   null
Done

Unexpected exception while running tests: SIGTRAP

Explanation:

  • The run-integration-tests.ts test harness downloads a stable copy of VS Code to execute the tests in.
  • On Apple Silicon, this downloads an x86 VS Code / Electron binary, even if there is an ARM-native or universal VS Code binary installed.
% file .vscode-test/vscode-1.63.2/Visual Studio Code.app/Contents/MacOS/Electron
.vscode-test/vscode-1.63.2/Visual Studio Code.app/Contents/MacOS/Electron:: Mach-O 64-bit executable x86_64
  • I suspect this behaviour originates from vscode-test, specifically https://github.com/microsoft/vscode-test/blob/fd0e599cd8e096f58f226509c6b76c68f502e926/lib/download.ts#L50, because it only accepts darwin as the download platform, without allowing a choice between x86 or ARM.
  • This means that the integration tests attempt to run under Rosetta.
  • Rosetta fails to launch VS Code due to a code signature mismatch.
  • This error doesn't happen when running the integration tests from the Run and Debug UI. This is because the UI test launcher uses the tasks defined in launch.json, which start VS Code directly without going through run-integration-tests.ts, and use the same VS Code binary as the parent instance (which will be ARM native if you installed it on M1).

Version
VS Code 1.63.2
CodeQL for VS Code 1.5.9

To reproduce

  • Clone repo on an M1 Mac.
  • cd extensions/ql-vscode && npm install && npm run integration
  • Observe error.
  • Choose Launch Integration Tests from the Run and Debug view in the UI.
  • Observe no error.

Expected behavior
npm run integration should download and launch an ARM-native VS Code binary, without using Rosetta, and the tests should pass.

Additional context
Observed by @angelapwen and diagnosed in internal discussion.

Lingua principale
TypeScript
Stelle
539
Fork
240
Merge medio
2g 18h
PR unite (30g)
37

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/vscode-codeql

Tutte le issue di github/vscode-codeql

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.