swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
121 stars 21 forks source link

Stuck on "Running Sphinx" with no further output #763

Closed neongreen-sc closed 3 months ago

neongreen-sc commented 3 months ago

Expected behavior

Sometimes Esbonio starts Sphinx (on Ctrl+K V) but there is no further output and the "Loading..." progress bar runs back and forth forever.

"Running Sphinx v7.1.2" is the last line of the output.

Building the project through the makefile works fine.

Actual behavior

-

Log output

[esbonio] Loaded extension 'esbonio.server.features.log'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_manager'
[esbonio] Loaded extension 'esbonio.server.features.preview_manager'
[esbonio] Loaded extension 'esbonio.server.features.directives'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.diagnostics'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.symbols'
[esbonio] Loaded extension 'esbonio.server.features.sphinx_support.directives'
[esbonio] Initialising esbonio v1.0.0b1
[esbonio] Language client: Visual Studio Code 1.86.2
[esbonio.Configuration] workspace/configuration: {
  "items": [
    {
      "section": "esbonio"
    },
    {
      "scopeUri": "file:///c%3A/workspace/infra",
      "section": "esbonio"
    }
  ]
}
[esbonio.Configuration] Scanning workspace folder: 'c:\workspace\infra'
[esbonio.Configuration] Workspace 'None' configuration: {
  "server": {
    "enabled": true,
    "enabledInPyFiles": true,
    "startupModule": "esbonio.server",
    "excludedModules": [],
    "includedModules": [],
    "logLevel": "debug",
    "completion": {
      "preferredInsertBehavior": "replace"
    },
    "enableDevTools": false,
    "debug": false,
    "showDeprecationWarnings": false
  },
  "sphinx": {
    "pythonCommand": [
      "c:\\workspace\\infra\\project\\.virtualenv\\Scripts\\python.exe"
    ],
    "enableSyncScrolling": true,
    "enableDevTools": false,
    "pythonPath": []
  },
  "preview": {
    "showLineMarkers": false
  }
}
[esbonio.Configuration] Workspace 'file:///c%3A/workspace/infra' configuration: {
  "server": {
    "enabled": true,
    "enabledInPyFiles": true,
    "startupModule": "esbonio.server",
    "excludedModules": [],
    "includedModules": [],
    "logLevel": "debug",
    "completion": {
      "preferredInsertBehavior": "replace"
    },
    "enableDevTools": false,
    "debug": false,
    "showDeprecationWarnings": false
  },
  "sphinx": {
    "pythonCommand": [
      "c:\\workspace\\infra\\project\\.virtualenv\\Scripts\\python.exe"
    ],
    "enableSyncScrolling": true,
    "enableDevTools": false,
    "pythonPath": []
  },
  "preview": {
    "showLineMarkers": false
  }
}
[esbonio] Registered 'workspace/didChangeConfiguration' handler
[esbonio] Registered 'workspace/didChangeWatchedFiles' handler
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
  "enabled": true,
  "showDeprecationWarnings": false,
  "debug": false,
  "enableDevTools": false,
  "startupModule": "esbonio.server",
  "enabledInPyFiles": true,
  "excludedModules": [],
  "completion": {
    "preferredInsertBehavior": "replace"
  },
  "logLevel": "debug",
  "includedModules": []
}
[esbonio.Configuration] ServerLogConfig(log_filter=[], log_level='debug', show_deprecation_warnings=False)
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: ''
[esbonio.Configuration] Resolved config: {
  "preferredInsertBehavior": "replace"
}
[esbonio.Configuration] CompletionConfig(preferred_insert_behavior='replace')
[esbonio.Configuration] File scope: ''
[esbonio.Configuration] Workspace scope: 'file:///c%3A/workspace/infra'
[esbonio.Configuration] Resolved config: {
  "pythonCommand": [
    "c:\\workspace\\infra\\project\\.virtualenv\\Scripts\\python.exe"
  ],
  "pythonPath": [],
  "enableDevTools": false,
  "enableSyncScrolling": true
}
[esbonio.Configuration] SphinxConfig(enable_dev_tools=False, enable_sync_scrolling=True, python_command=['c:\\workspace\\infra\\project\\.virtualenv\\Scripts\\python.exe'], build_command=[], env_passthrough=[], cwd='', python_path=[])
[esbonio.SphinxManager] Trying path: c:\workspace\infra\project
[esbonio.SphinxManager] Cwd: c:\workspace\infra
[esbonio.SphinxManager] Build command: ['sphinx-build', '-M', 'dirhtml', 'c:\\workspace\\infra\\project', 'C:\\Users\\username\\AppData\\Local\\swyddfa\\esbonio\\Cache\\128e3c9865cc20064acf4cbe6763a929']
[esbonio.SphinxManager] Starting sphinx agent: c:\workspace\infra\project\.virtualenv\Scripts\python.exe -m sphinx_agent
Running Sphinx v7.1.2

(Optional) Settings from conf.py

No response

neongreen-sc commented 3 months ago

"Restart language server" doesn't help. Restarting VSCode also doesn't help.

neongreen-sc commented 3 months ago

NB: on the same machine, in a different project Esbonio works fine.

neongreen-sc commented 3 months ago

Upgrading to latest Sphinx (7.2.6) didn't help.

alcarney commented 3 months ago

Have you tried editing a file in VSCode and saving it?

The server doesn't automatically trigger a build when opening the preview in a project with no previous builds - yet. It did at one point, (but I found it could lead to spawning infinite sphinx processes :sweat_smile: so had to disable it). Now that #744 is in, I'm hoping to be able to re-enable it for the next pre-release :crossed_fingers:

neongreen-sc commented 3 months ago

Ohhhhhhhhh. Yep, works now.