Skip to content

apple silicon: os.cpus() returns [] (empty array) #112122

@codekitchen

Description

@codekitchen
  • VSCode Version: Visual Studio Code - Exploration
    Version: 1.53.0-exploration
    Commit: 47a314c
    Date: 2020-12-08T08:33:00.164Z (18 hrs ago)
    Electron: 11.0.3
    Chrome: 87.0.4280.67
    Node.js: 12.18.3
    V8: 8.7.220.25-electron.0
    OS: Darwin arm64 20.1.0
  • OS Version: Big Sur 11.0.1

Steps to Reproduce:

  1. Toggle the Developer Tools
  2. Type in console: require('os').cpus()

Does this issue occur when all extensions are disabled?: Yes

Sorry if this is the wrong place to report this, as it seems likely this is actually an Electron issue, but I saw in some other issues that you're currently building your own custom Electron builds for Apple Silicon.

I was exploring why the Hashicorp Terraform extension was never finishing its initialization phase, and I tracked it down to the fast-glob npm package using os.cpus().length to determine how many workers to use. Granted, they should add a sanity check here, but this seems likely to cause other issues too.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugelectronIssues and items related to Electronmacos-big-surverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions