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

"Unable to load compilation data: No root directory found" #177

Open
chrmarti opened this issue Nov 8, 2018 · 20 comments
Open

"Unable to load compilation data: No root directory found" #177

chrmarti opened this issue Nov 8, 2018 · 20 comments

Comments

@chrmarti
Copy link

chrmarti commented Nov 8, 2018

From @joelonsql on November 8, 2018 7:44

  • VSCode Version: 1.28.2 7f3ce96ff4729c91352ae6def877e59c561f4850
  • OS Version: macOS 10.14.1

Steps to Reproduce:

  1. Reinstall VS Code, install jaredly.reason-vscode
  2. Open up any .ml file

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

Copied from original issue: microsoft/vscode#62766

@jaredly
Copy link
Owner

jaredly commented Nov 9, 2018

Does this happen on the reason-react example repo, for example? Or could you point me to a repo where this behavior shows up?

@mickeyvip
Copy link

I just had the same error.

In my case the problem was having a folder name with spaces: ~/My Reason Projects/project1. In that case there was another folder created (by the plugin?) ~/My%20Reason%20Projects/project1 with only node_modules.

Renaming the folder fixed the issue: ~/my-reason-projects/project1.

@yutao-li
Copy link

yutao-li commented Dec 5, 2018

i have the same issue too, on ubuntu 18.04, vscode 1.29.1, renaming does no help, and it happens on any repo, including the reason-react example repo.

@liweijian
Copy link

repro it.

MacOS 10.14.4.

Installed a brand new vscode and reason-vscode (v1.5.2)
image

Started by $ code . inside the project folder.

Created any .ml file:

image

@liweijian
Copy link

With log:

$ code . --verbose
[main 2019-05-04T05:29:59.630Z] Starting VS Code
[main 2019-05-04T05:29:59.632Z] from: /Applications/Visual Studio Code.app/Contents/Resources/app
[main 2019-05-04T05:29:59.632Z] args: { _: [ '/Users/ted/toys/ocaml/finallytagless101' ],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  version: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  verbose: true,
  status: false,
  'prof-modules': false,
  'prof-startup': false,
  'disable-extensions': false,
  'disable-gpu': false,
  logExtensionHostCommunication: false,
  'skip-getting-started': false,
  'skip-release-notes': false,
  'sticky-quickopen': false,
  'disable-restore-windows': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  nolazy: false,
  issue: false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'prof-code-loading': false,
  nodeless: false }
[main 2019-05-04T05:29:59.636Z] Resolving machine identifier...
[main 2019-05-04T05:29:59.636Z] Resolved machine identifier: fd84c16bbad63c38caa307d3370441b85489e1dba784476fa36f570183196c25
[main 2019-05-04T05:29:59.680Z] update#setState idle
[main 2019-05-04T05:29:59.717Z] windowsManager#open
2019-05-04 13:29:59.725 Electron[58078:1044127] *** WARNING: Textured window <AtomNSWindow: 0x7fa7a7103ea0> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
[main 2019-05-04T05:29:59.805Z] telemetry/optInStatus { optIn: true }
[main 2019-05-04T05:29:59.806Z] telemetry/machineIdFallback { usingFallbackGuid: false }
[main 2019-05-04T05:29:59.963Z] [storage state.vscdb] open(/Users/ted/Library/Application Support/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2019-05-04T05:29:59.999Z] [storage state.vscdb] Trace (event): PRAGMA user_version = 1;
[main 2019-05-04T05:29:59.999Z] [storage state.vscdb] Trace (event): CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)
[main 2019-05-04T05:30:00.027Z] [storage state.vscdb] getItems(): 37 rows
[main 2019-05-04T05:30:00.028Z] [storage state.vscdb] Trace (event): SELECT * FROM ItemTable
[main 2019-05-04T05:30:00.128Z] [storage state.vscdb] updateItems(): insert(Map(2) {telemetry.lastSessionDate => Sat, 04 May 2019 05:27:54 GMT, telemetry.currentSessionDate => Sat, 04 May 2019 05:30:00 GMT}), delete(Set(0) {})
[main 2019-05-04T05:30:00.129Z] [storage state.vscdb] Trace (event): BEGIN TRANSACTION
[main 2019-05-04T05:30:00.130Z] [storage state.vscdb] Trace (event): INSERT INTO ItemTable VALUES ('telemetry.lastSessionDate','Sat, 04 May 2019 05:27:54 GMT'),('telemetry.currentSessionDate','Sat, 04 May 2019 05:30:00 GMT')
[main 2019-05-04T05:30:00.130Z] [storage state.vscdb] Trace (event): END TRANSACTION
[58078:0504/133000.716307:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133000.747205:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133000.748230:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133000.752365:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133000.832635:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133000.924882:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:00.926Z] IPC#vscode-workbenchReady
[main 2019-05-04T05:30:00.926Z] windowsService#isFocused 1
[main 2019-05-04T05:30:00.928Z] windowsService#whenSharedProcessReady
[main 2019-05-04T05:30:00.928Z] windowsService#getRecentlyOpened 1
[58078:0504/133000.929448:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:00.929Z] windowsService#setRepresentedFilename 1
[58078:0504/133001.054702:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.055207:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.055552:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.056100:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.065Z] windowsService#startCrashReporter
[58078:0504/133001.115934:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.123Z] menubarService#updateMenubar 1
[main 2019-05-04T05:30:01.136Z] windowsService#getRecentlyOpened 1
[58078:0504/133001.250941:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.251332:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.262421:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.356Z] windowsService#setRepresentedFilename 1
[58078:0504/133001.357078:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.360868:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.366308:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.367790:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.369566:INFO:CONSOLE(3264)] "%c[Extension Host] %cdebugger listening on port 49417", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (3264)
[58078:0504/133001.499832:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.568733:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133001.650308:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.734Z] [storage state.vscdb] updateItems(): insert(Map(1) {extensionsAssistant/recommendations => {"vscjava.vscode-java-pack":1556941336485,"davidanson.vscode-markdownlint":1556937178756,"ionide.ionide-fsharp":1556947801500}}), delete(Set(0) {})
[main 2019-05-04T05:30:01.735Z] [storage state.vscdb] Trace (event): BEGIN TRANSACTION
[main 2019-05-04T05:30:01.736Z] [storage state.vscdb] Trace (event): INSERT INTO ItemTable VALUES ('extensionsAssistant/recommendations','{"vscjava.vscode-java-pack":1556941336485,"davidanson.vscode-markdownlint":1556937178756,"ionide.ionide-fsharp":1556947801500}')
[main 2019-05-04T05:30:01.737Z] [storage state.vscdb] Trace (event): END TRANSACTION
[58078:0504/133001.817338:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.856Z] windowsService#updateTouchBar 1
[58078:0504/133001.883513:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:01.883Z] IPC#vscode:broadcast vscode:changeColorTheme {"baseTheme":"vs-dark","background":"#1e1e1e"}
[58078:0504/133001.884148:INFO:CONSOLE(235)] "%c[IPC Library: File Watcher (chokidar)] %cStart watching: /Users/ted/toys/ocaml/finallytagless101]", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (235)
[58078:0504/133001.930878:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:02.020Z] windowsService#isFocused 1
[58078:0504/133002.093820:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.093923:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.094096:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.094397:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.094722:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.138097:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.138212:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.138301:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.138365:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.172005:INFO:CONSOLE(2370)] "No root directory found", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (2370)
[58078:0504/133002.205613:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133002.221194:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:02.278Z] menubarService#updateMenubar 1
[58078:0504/133003.328858:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.329079:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.860164:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.861334:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.869186:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:03.875Z] windowsService#getWindowCount
[main 2019-05-04T05:30:03.878Z] RequestService#request https://update.code.visualstudio.com/api/update/darwin/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8
[58078:0504/133003.883970:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.884101:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.884170:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133003.888156:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133004.582817:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:04.583Z] RequestService#request https://update.code.visualstudio.com/api/update/darwin/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8
[main 2019-05-04T05:30:04.755Z] windowsService#getWindowCount
[58078:0504/133004.756996:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:09.208Z] Lifecycle#app.on(before-quit)
[main 2019-05-04T05:30:09.208Z] Lifecycle#onBeforeShutdown.fire()
[main 2019-05-04T05:30:09.213Z] SharedProcess#close prevented
[main 2019-05-04T05:30:09.214Z] Lifecycle#window.on('close') - window ID 1
[main 2019-05-04T05:30:09.214Z] Lifecycle#unload() - window ID 1
[58078:0504/133009.216098:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.217913:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:09.218Z] Lifecycle#unload() - no veto (window ID 1)
[58078:0504/133009.219346:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.225479:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.226772:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.229543:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.231004:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[58078:0504/133009.239876:INFO:CONSOLE(1408)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1408)
[main 2019-05-04T05:30:09.251Z] Lifecycle#onBeforeWindowClose.fire() - window ID 1
[main 2019-05-04T05:30:09.253Z] Lifecycle#window.on('closed') - window ID 1
[main 2019-05-04T05:30:09.254Z] Lifecycle#onWillShutdown.fire()
[main 2019-05-04T05:30:09.272Z] Lifecycle#app.on(window-all-closed)
[main 2019-05-04T05:30:09.273Z] Lifecycle#app.on(will-quit)
[main 2019-05-04T05:30:09.277Z] [storage state.vscdb] close()

@hackwaly
Copy link

hackwaly commented May 4, 2019

If the path to project contains spaces, it will get same error.

@liweijian
Copy link

@hackwaly I think there's no spaces in the path of the project as the log shows

[main 2019-05-04T05:29:59.632Z] args: { _: [ '/Users/ted/toys/ocaml/finallytagless101' ],

@liweijian
Copy link

High light the related error log:

[58078:0504/133001.884148:INFO:CONSOLE(235)] "%c[IPC Library: File Watcher (chokidar)] %cStart watching: /Users/ted/toys/ocaml/finallytagless101]", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (235)

[58078:0504/133002.172005:INFO:CONSOLE(2370)] "No root directory found", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (2370)

@philippefuentes
Copy link

philippefuentes commented Jun 13, 2019

Hello,
Having the same problem (I'm on Mac), in my case my dev directory (for all my projects) is prefixed by '@' character, when I use a project without it, everything works fine.

does not work:

/Users/eussam/@DEV/@EUSSAM/@REASONREACT/a-reason-react-tutorial

works:

/Users/eussam/a-reason-react-tutorial

Would that be possible to support '@' ?, never had this problem before with VSCode
Thanks

@rybla
Copy link

rybla commented Jun 13, 2019

I'm getting the same issue. Using Visual Studio Code version 1.35.1. I make a new folder and just have an empty main.ml. Then opening and saving main.ml file triggers reason-vscode, and gives a pop-up error "No root directory found.

As far as I can tell, there are no spaces in any paths, as some previous comments have suggested might be the source of the problem.

Here's the debug.log from inside the generated node_modules folder:

Hello - from /Users/henry/.vscode/extensions/jaredly.reason-vscode-1.6.1/bin.native
Previous log location: /var/folders/zf/v8nbyny52fx1__vmdzwk9tf80000gn/T/lsp.log
Sending notification {"jsonrpc": "2.0", "method": "client/registerCapability", "params": {"registrations": [{"id": "watching", "method": "workspace/didChangeWatchedFiles", "registerOptions": {"watchers": [{"globPattern": "**/bsconfig.json", "globPattern": "**/.merlin"}]}}]}}
Sending response {"id": 0, "jsonrpc": "2.0", "result": {"capabilities": {"textDocumentSync": 1, "hoverProvider": true, "completionProvider": {"resolveProvider": true, "triggerCharacters": ["."]}, "signatureHelpProvider": {"triggerCharacters": ["("]}, "definitionProvider": true, "typeDefinitionProvider": true, "referencesProvider": true, "documentSymbolProvider": true, "codeActionProvider": true, "executeCommandProvider": {"commands": ["reason-language-server.add_to_interface_inner"]}, "codeLensProvider": {"resolveProvider": true}, "documentHighlightProvider": true, "documentRangeFormattingProvider": true, "documentFormattingProvider": true, "documentFormattingProvider": true, "renameProvider": true}}}
Read message 
{"jsonrpc":"2.0","method":"initialized","params":{}}
Read message 
{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"reason_language_server":{"location":"","build_system_override_by_root":{},"refmt":"","lispRefmt":"","format_width":80,"per_value_codelens":false,"dependencies_codelens":true,"opens_codelens":true,"show_module_path_on_hover":true,"reloadOnChange":false,"show_debug_errors":false,"autoRebuild":true,"useOldDuneProcess":true}}}}
Read message 
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml","languageId":"ocaml","version":1,"text":""}}}
Sending notification {"jsonrpc": "2.0", "method": "window/showMessage", "params": {"type": 1, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml","version":1},"contentChanges":[{"text":""}]}}
Read message 
{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml","version":1}}}
Sending notification {"jsonrpc": "2.0", "method": "window/showMessage", "params": {"type": 1, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/documentSymbol
[server] processing took 0.0150203704834ms
Sending response {"id": 1, "jsonrpc": "2.0", "error": {"code": -32603, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","id":2,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/codeLens
[server] processing took 0.0550746917725ms
Sending response {"id": 2, "jsonrpc": "2.0", "result": [{"range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}, "command": {"title": "Unable to load compilation data: No root directory found", "command": ""}}]}
Read message 
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml","version":1},"contentChanges":[{"text":""}]}}
Read message 
{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml","version":1}}}
Sending notification {"jsonrpc": "2.0", "method": "window/showMessage", "params": {"type": 1, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","id":3,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/documentSymbol
[server] processing took 0.0131130218506ms
Sending response {"id": 3, "jsonrpc": "2.0", "error": {"code": -32603, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","id":4,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/codeLens
[server] processing took 0.0100135803223ms
Sending response {"id": 4, "jsonrpc": "2.0", "result": [{"range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}, "command": {"title": "Unable to load compilation data: No root directory found", "command": ""}}]}
Read message 
{"jsonrpc":"2.0","id":5,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/documentSymbol
[server] processing took 0.0138282775879ms
Sending response {"id": 5, "jsonrpc": "2.0", "error": {"code": -32603, "message": "No root directory found"}}
Read message 
{"jsonrpc":"2.0","id":6,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///Users/henry/test/main.ml"}}}
[server] Got a method textDocument/codeLens
[server] processing took 0.0250339508057ms
Sending response {"id": 6, "jsonrpc": "2.0", "result": [{"range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}, "command": {"title": "Unable to load compilation data: No root directory found", "command": ""}}]}

@smorimoto
Copy link

Hmm...

Sending response {"id": 1, "jsonrpc": "2.0", "error": {"code": -32603, "message": "No root directory found"}}

@smorimoto
Copy link

debug errors:

[Error - 4:20:32 AM] Request textDocument/documentSymbol failed.
  Message: No root directory found
  Code: -32603 
[Error - 4:20:32 AM] Request textDocument/codeAction failed.
  Message: No root directory found
  Code: -32603 
[Error - 4:20:32 AM] Request textDocument/formatting failed.
  Message: No root directory found
  Code: -32603 

@smorimoto
Copy link

If I open Jane Street's Core, I didn't get this error. but it says can't find the .merlin file.

[Error - 3:12:26 PM] Request textDocument/documentSymbol failed.
  Message: Unable to read /Users/username/src/github.com/janestreet/core/src/.merlin
  Code: -32603

@smorimoto
Copy link

@jaredly This error occurs if bsconfig.json does not exist in the project root.

@smorimoto
Copy link

If you add only the configuration file, you will get a bs-platform could not be found error. This extension can also be used in native projects if these errors are fixed.

@tgrecojs
Copy link

@imbsky I still run into this issue regardless of bsconfig.json existing in my root directory or not.

it seems like this has to do with conflicting versions somewhere on my machine. pretty sure this only began to occur after i upgraded to the last version about a week ago.

@smorimoto
Copy link

I don't use this extension anymore.

@sunitjoshi
Copy link

Same problem here....Unable to load compilation data: No root directory found!

@atombender
Copy link

See my comment here for workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests