Skip to content
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

executeInitializers blocks format on save in VSCode during first save of a file when VSCode is opened. #406

Open
NullVoxPopuli opened this issue Oct 15, 2024 · 2 comments

Comments

@NullVoxPopuli
Copy link
Member

NullVoxPopuli commented Oct 15, 2024

Note that this doesn't happen in neovim, but at the same time, I don't think I've told neovim to do anything with ELS on save.

This function:

async executeInitializers() {

Here is the ELS output channel information during first save
Info  - 1:10:45 PM] lazy init enabled, waiting for config from VSCode
"Initializing Ember Language Server at <repo>"
[Info  - 1:10:45 PM] UELS: executeInitializers
[Info  - 1:13:38 PM] Ember CLI project added at <repo>/apps/client
[Info  - 1:16:31 PM] <repo>/apps/client: registry initialized in 173472ms
[Info  - 1:16:31 PM] <repo>/apps/client: script registry initialized in 20ms
[Info  - 1:16:33 PM] soxhub-client registry version mismatch [-1, 0], regenerating...
[Info  - 1:16:33 PM] soxhub-client registry generated in 37ms, new version: 0
[Info  - 1:16:45 PM] Ember CLI project added at <repo>/apps/documentation
[Info  - 1:16:57 PM] <repo>/apps/documentation: registry initialized in 12717ms
[Info  - 1:16:57 PM] <repo>/apps/documentation: script registry initialized in 1ms
[Info  - 1:16:57 PM] documentation-kolay registry version mismatch [-1, 0], regenerating...
[Info  - 1:16:57 PM] documentation-kolay registry generated in 2ms, new version: 0
[Info  - 1:17:02 PM] Ember CLI project added at <repo>/libraries/client-core/test-app
[Info  - 1:17:07 PM] <repo>/libraries/client-core/test-app: registry initialized in 4858ms
[Info  - 1:17:07 PM] <repo>/libraries/client-core/test-app: script registry initialized in 2ms
[Info  - 1:17:07 PM] @auditboard/client-core-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:07 PM] @auditboard/client-core-tests registry generated in 1ms, new version: 0
[Info  - 1:17:08 PM] Ember CLI project added at <repo>/libraries/consts/test-app
[Info  - 1:17:08 PM] <repo>/libraries/consts/test-app: registry initialized in 209ms
[Info  - 1:17:08 PM] <repo>/libraries/consts/test-app: script registry initialized in 1ms
[Info  - 1:17:08 PM] @auditboard/consts-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:08 PM] @auditboard/consts-tests registry generated in 0ms, new version: 0
[Info  - 1:17:08 PM] Ember CLI project added at <repo>/libraries/data/test-app
[Info  - 1:17:09 PM] <repo>/libraries/data/test-app: registry initialized in 955ms
[Info  - 1:17:09 PM] <repo>/libraries/data/test-app: script registry initialized in 0ms
[Info  - 1:17:09 PM] @auditboard/data-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:09 PM] @auditboard/data-tests registry generated in 0ms, new version: 0
[Info  - 1:17:09 PM] Ember CLI project added at <repo>/libraries/ember-formatjs
[Info  - 1:17:09 PM] <repo>/libraries/ember-formatjs: registry initialized in 48ms
[Info  - 1:17:09 PM] <repo>/libraries/ember-formatjs: script registry initialized in 0ms
[Info  - 1:17:09 PM] @auditboard/ember-formatjs registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:09 PM] @auditboard/ember-formatjs registry generated in 0ms, new version: 0
[Info  - 1:17:10 PM] Ember CLI project added at <repo>/libraries/legacy-design-system
[Info  - 1:17:10 PM] <repo>/libraries/legacy-design-system: registry initialized in 455ms
[Info  - 1:17:10 PM] <repo>/libraries/legacy-design-system: script registry initialized in 1ms
[Info  - 1:17:10 PM] luna-design-system registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:10 PM] luna-design-system registry generated in 0ms, new version: 0
[Info  - 1:17:11 PM] Ember CLI project added at <repo>/libraries/luna-core/package
[Info  - 1:17:12 PM] <repo>/libraries/luna-core/package: registry initialized in 1029ms
[Info  - 1:17:12 PM] <repo>/libraries/luna-core/package: script registry initialized in 0ms
[Info  - 1:17:12 PM] luna registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:12 PM] luna registry generated in 0ms, new version: 0
[Info  - 1:17:14 PM] Ember CLI project added at <repo>/libraries/luna-core/test-app
[Info  - 1:17:15 PM] <repo>/libraries/luna-core/test-app: registry initialized in 1070ms
[Info  - 1:17:15 PM] <repo>/libraries/luna-core/test-app: script registry initialized in 0ms
[Info  - 1:17:15 PM] luna-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:15 PM] luna-tests registry generated in 0ms, new version: 0
[Info  - 1:17:19 PM] Ember CLI project added at <repo>/libraries/luna-layouts/test-app
[Info  - 1:17:23 PM] <repo>/libraries/luna-layouts/test-app: registry initialized in 3939ms
[Info  - 1:17:23 PM] <repo>/libraries/luna-layouts/test-app: script registry initialized in 1ms
[Info  - 1:17:23 PM] @auditboard/luna-layouts-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:23 PM] @auditboard/luna-layouts-tests registry generated in 1ms, new version: 0
[Info  - 1:17:23 PM] Ember CLI project added at <repo>/libraries/luna-utils/test-app
[Info  - 1:17:24 PM] <repo>/libraries/luna-utils/test-app: registry initialized in 388ms
[Info  - 1:17:24 PM] <repo>/libraries/luna-utils/test-app: script registry initialized in 0ms
[Info  - 1:17:24 PM] @auditboard/luna-utils-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:24 PM] @auditboard/luna-utils-tests registry generated in 0ms, new version: 0
[Info  - 1:17:27 PM] Ember CLI project added at <repo>/libraries/luna-views/test-app
[Info  - 1:17:32 PM] <repo>/libraries/luna-views/test-app: registry initialized in 5153ms
[Info  - 1:17:32 PM] <repo>/libraries/luna-views/test-app: script registry initialized in 1ms
[Info  - 1:17:32 PM] luna-views-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:32 PM] luna-views-tests registry generated in 1ms, new version: 0
[Info  - 1:17:35 PM] Ember CLI project added at <repo>/libraries/notifications/test-app
[Info  - 1:17:38 PM] <repo>/libraries/notifications/test-app: registry initialized in 2682ms
[Info  - 1:17:38 PM] <repo>/libraries/notifications/test-app: script registry initialized in 3ms
[Info  - 1:17:38 PM] @auditboard/notifications-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:38 PM] @auditboard/notifications-tests registry generated in 0ms, new version: 0
[Info  - 1:17:44 PM] Ember CLI project added at <repo>/libraries/resource-planner/test-app
[Info  - 1:17:50 PM] <repo>/libraries/resource-planner/test-app: registry initialized in 5914ms
[Info  - 1:17:50 PM] <repo>/libraries/resource-planner/test-app: script registry initialized in 2ms
[Info  - 1:17:50 PM] resource-planner-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:50 PM] resource-planner-tests registry generated in 1ms, new version: 0
[Info  - 1:17:50 PM] Ember CLI project added at <repo>/libraries/scheduler-pro/test-app
[Info  - 1:17:50 PM] <repo>/libraries/scheduler-pro/test-app: registry initialized in 151ms
[Info  - 1:17:50 PM] <repo>/libraries/scheduler-pro/test-app: script registry initialized in 1ms
[Info  - 1:17:50 PM] scheduler-pro-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:50 PM] scheduler-pro-tests registry generated in 0ms, new version: 0
[Info  - 1:17:51 PM] Ember CLI project added at <repo>/libraries/schema-decorators/test-app
[Info  - 1:17:51 PM] <repo>/libraries/schema-decorators/test-app: registry initialized in 557ms
[Info  - 1:17:51 PM] <repo>/libraries/schema-decorators/test-app: script registry initialized in 2ms
[Info  - 1:17:51 PM] schema-decorators-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:17:51 PM] schema-decorators-tests registry generated in 1ms, new version: 0
[Info  - 1:18:56 PM] Ember CLI project added at <repo>/libraries/schema-form/test-app
[Info  - 1:20:01 PM] <repo>/libraries/schema-form/test-app: registry initialized in 65323ms
[Info  - 1:20:01 PM] <repo>/libraries/schema-form/test-app: script registry initialized in 2ms
[Info  - 1:20:01 PM] @auditboard/schema-form-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:01 PM] @auditboard/schema-form-tests registry generated in 5ms, new version: 0
[Info  - 1:20:16 PM] Ember CLI project added at <repo>/libraries/schema-table/test-app
[Info  - 1:20:31 PM] <repo>/libraries/schema-table/test-app: registry initialized in 15010ms
[Info  - 1:20:31 PM] <repo>/libraries/schema-table/test-app: script registry initialized in 0ms
[Info  - 1:20:31 PM] @auditboard/schema-table-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:31 PM] @auditboard/schema-table-tests registry generated in 2ms, new version: 0
[Info  - 1:20:38 PM] Ember CLI project added at <repo>/libraries/sol-components/test-app
[Info  - 1:20:45 PM] <repo>/libraries/sol-components/test-app: registry initialized in 7366ms
[Info  - 1:20:45 PM] <repo>/libraries/sol-components/test-app: script registry initialized in 1ms
[Info  - 1:20:45 PM] @auditboard/sol-components-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:45 PM] @auditboard/sol-components-tests registry generated in 2ms, new version: 0
[Info  - 1:20:52 PM] Ember CLI project added at <repo>/libraries/ui-schema/test-app
[Info  - 1:20:58 PM] <repo>/libraries/ui-schema/test-app: registry initialized in 6814ms
[Info  - 1:20:58 PM] <repo>/libraries/ui-schema/test-app: script registry initialized in 1ms
[Info  - 1:20:58 PM] ui-schema-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:58 PM] ui-schema-tests registry generated in 1ms, new version: 0
[Info  - 1:20:59 PM] Ember CLI project added at <repo>/libraries/utils/test-app
[Info  - 1:20:59 PM] <repo>/libraries/utils/test-app: registry initialized in 561ms
[Info  - 1:20:59 PM] <repo>/libraries/utils/test-app: script registry initialized in 2ms
[Info  - 1:20:59 PM] @auditboard/utils-tests registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:59 PM] @auditboard/utils-tests registry generated in 0ms, new version: 0
[Info  - 1:20:59 PM] Unable to get project name from package.json at <repo>/tools/monorepo/src/tasks/new/files
[Info  - 1:20:59 PM] Ember CLI project added at <repo>/tools/monorepo/src/tasks/new/files
[Info  - 1:20:59 PM] <repo>/tools/monorepo/src/tasks/new/files: registry initialized in 0ms
[Info  - 1:20:59 PM] <repo>/tools/monorepo/src/tasks/new/files: script registry initialized in 0ms
[Info  - 1:20:59 PM] [Unknown Project] registry version mismatch [-1, 0], regenerating...
[Info  - 1:20:59 PM] [Unknown Project] registry generated in 0ms, new version: 0

My VSCode config:

{
  "editor.minimap.enabled": false,
  "debug.javascript.autoAttachFilter": "always",
  "debug.javascript.pickAndAttachOptions": {},
  "debug.terminal.clearBeforeReusing": true,
  "terminal.integrated.inheritEnv": true,
  "terminal.integrated.profiles.osx": {
    "bash": {
      "path": "/opt/homebrew/bin/bash",
      "icon": "terminal-bash"
    }
  },
  "terminal.integrated.defaultProfile.linux": "",
  "terminal.integrated.defaultProfile.osx": "bash",
  "debug.javascript.terminalOptions": {
    "autoAttachChildProcesses": true
  },
  "[glimmer-js]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.foldingStrategy": "indentation"
  },
  "[glimmer-ts]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.foldingStrategy": "indentation"
  },
  "eslint.validate": [
    "javascript",
    "typescript",
    "html",
    "glimmer-js",
    "glimmer-ts"
  ],
  "prettier.documentSelectors": [
    "**/*.gjs",
    "**/*.gts"
  ],
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "keyboard.touchbar.enabled": false,
  "typescript.tsserver.maxTsServerMemory": 9000,
  "terminal.integrated.scrollback": 10000,
  "git.commandsToLog": ["post-checkout", "pre-commit"]
}
@rtablada
Copy link

I have noticed that when saving, there are occasions where VSCode will say "waiting on Ember Language Server" in onSave but before formatting hook? Which seems odd since I'm not aware of ESL doing anything that would be save blocking (or maybe we could set this to be non-blocking and after save)?

Maybe there's some better VSCode level settings that can be pointed to if those hooks are already optout without changes to ESL?

@aklkv
Copy link

aklkv commented Oct 23, 2024

I ran into this as well, it works fine with yarn but starts to spin up several processes that take up 100% of CPU, only see this with pnpm projects

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

No branches or pull requests

3 participants