sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text
https://lsp.sublimetext.io/
MIT License
1.65k stars 182 forks source link

ValueError: path is on mount 'D:', start on mount 'F:' #251

Closed evandrocoan closed 6 years ago

evandrocoan commented 6 years ago

For debugging I added:

File: Data/Packages/LSP/plugin/diagnostics.py
244:             for file_path, source_diagnostics in diagnostics_by_file.items():
245:                 print( "base_dir: " + base_dir )
246:                 print( "file_path: " + file_path )
247:                 relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path

When I have 2 distinct projects open, on 2 different Sublime Text windows, and one project is on disk D and the other is on Disk F, I got this error when I switch between their windows on Sublime Text:

``` DPI scale: 1 startup, version: 3156 windows x32 channel: dev executable: /F/SublimeText/sublime_text.exe working dir: /F/SublimeText packages path: /F/SublimeText/Data/Packages state path: /F/SublimeText/Data/Local zip path: /F/SublimeText/Packages zip path: /F/SublimeText/Data/Installed Packages ignored_packages: ["Anaconda", "ApplySyntax", "BracketHighlighter", "BuildView", "C++ Completions", "C++ Qt Completions", "C++ Snippets", "CodeIntel", "ColorHelper", "DictionaryAutoComplete", "FileManager", "Find++", "Gist", "Git", "GitGutter", "GotoLastEditEnhanced", "Javatar", "JediPythonAutoCompletion", "LocalHistory", "MatlabCompletions", "MatlabFilenameAutoComplete", "MySQLSnippets", "ProjectSpecificSyntax", "ScopeAlways", "SublimeLinter-javac", "SyncedSideBar", "TypeScript", "Vintage", "WordHighlight"] pre session restore time: 2.9462 loading dictionary Packages/Language - English and Portuguese/EN_PT.dic startup time: 5.34121 first paint time: 5.34821 Packages/PackageDev/Package/Sublime Text Settings/Sublime Text Settings.sublime-syntax: context scope:source.regexp-replacement#escaped has a scope name, but is unreachable, so the name will never be used reloading plugin Default.arithmetic reloading plugin Default.auto_indent_tag reloading plugin Default.block reloading plugin Default.colors reloading plugin Default.comment reloading plugin Default.convert_color_scheme reloading plugin Default.convert_syntax reloading plugin Default.copy_path reloading plugin Default.delete_word reloading plugin Default.detect_indentation reloading plugin Default.duplicate_line reloading plugin Default.echo reloading plugin Default.exec reloading plugin Default.fold reloading plugin Default.font reloading plugin Default.goto_line reloading plugin Default.history_list reloading plugin Default.indentation reloading plugin Default.install_package_control reloading plugin Default.kill_ring reloading plugin Default.mark reloading plugin Default.new_templates reloading plugin Default.open_context_url reloading plugin Default.open_in_browser reloading plugin Default.pane reloading plugin Default.paragraph reloading plugin Default.paste_from_history reloading plugin Default.profile reloading plugin Default.quick_panel reloading plugin Default.rename reloading plugin Default.run_syntax_tests reloading plugin Default.save_on_focus_lost reloading plugin Default.scroll reloading plugin Default.set_unsaved_view_name reloading plugin Default.settings reloading plugin Default.show_scope_name reloading plugin Default.side_bar reloading plugin Default.sort reloading plugin Default.swap_line reloading plugin Default.switch_file reloading plugin Default.symbol reloading plugin Default.transform reloading plugin Default.transpose reloading plugin Default.trim_trailing_white_space reloading plugin Default.ui reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin ShellScript.ShellScript reloading plugin 0_packages_manager_loader.00-packages_manager reloading plugin 0_packages_manager_loader.01-package_setting_context reloading plugin 0_packages_manager_loader.01-pygments reloading plugin 0_packages_manager_loader.10-PythonDebugTools reloading plugin 0_packages_manager_loader.15-coverage reloading plugin 0_packages_manager_loader.20-EstimatedTimeLeft reloading plugin 0_packages_manager_loader.30-ChannelManager reloading plugin 0_packages_manager_loader.50-backrefs reloading plugin 0_packages_manager_loader.50-markupsafe reloading plugin 0_packages_manager_loader.50-pymdownx reloading plugin 0_packages_manager_loader.50-python-markdown reloading plugin 0_packages_manager_loader.50-pyyaml reloading plugin 0_packages_manager_loader.50-regex reloading plugin 0_packages_manager_loader.51-python-jinja2 reloading plugin 0_packages_manager_loader.55-jsonschema reloading plugin 0_packages_manager_loader.55-mdpopups reloading plugin tests reloading plugin 0_settings_loader.install_package_control_extended reloading plugin 0_settings_loader.synced_side_bar_watcher reloading plugin A File Icon.A File Icon reloading plugin AceJump.ace_jump reloading plugin ActiveViewJumpBack.active_view_jump_back reloading plugin AddFolderToProject.AddFolderToProject reloading plugin AdvancedCSV.csvplugin reloading plugin Alignment.Alignment reloading plugin AlignTab.aligner reloading plugin AlignTab.aligntab reloading plugin AlignTab.hist reloading plugin AlignTab.parser reloading plugin AlignTab.table reloading plugin AlignTab.wclen reloading plugin AllAutocomplete.all_views_completions reloading plugin AltUp.run_multiple_commands reloading plugin Amxmodx.AMXXEditor reloading plugin AmxxChannel.commands reloading plugin AmxxChannel.fix_main_menus reloading plugin AmxxChannel.settings reloading plugin ANSIescape.ansi reloading plugin AutoFileName.autofilename reloading plugin AutoFileName.getimageinfo reloading plugin AutomaticPackageReloader.package_reloader reloading plugin AutoRefresh.AutoRefresh reloading plugin AutoWrap.autowrap reloading plugin BetterCoffeeScript.CoffeeScript reloading plugin BetterFindBuffer.find_results reloading plugin BufferScroll.BufferScroll reloading plugin CaseConversion.case_conversion reloading plugin CaseConversion.case_parse reloading plugin CaseConversion.ToggleTitleCase reloading plugin ChainOfCommand.chain reloading plugin ChangeQuotes.change_quotes reloading plugin ChannelRepositoryTools.ordereddict reloading plugin ChannelRepositoryTools.tests reloading plugin ChannelRepositoryTools.upgrade reloading plugin ClearCursorsCarets.clear_cursors_carets reloading plugin ClickableURLs.clickable_urls reloading plugin ClipboardScopeCopy.clipboard_scope_copy reloading plugin Color Highlighter.color_converter reloading plugin Color Highlighter.color_highlighter reloading plugin Color Highlighter.color_hover_listener reloading plugin Color Highlighter.color_scheme reloading plugin Color Highlighter.color_scheme_color_highlighter reloading plugin Color Highlighter.color_searcher reloading plugin Color Highlighter.color_selection_listener reloading plugin Color Highlighter.colors reloading plugin Color Highlighter.content_listener reloading plugin Color Highlighter.convert_color_command reloading plugin Color Highlighter.css_colors reloading plugin Color Highlighter.dummy_event_listener reloading plugin Color Highlighter.gutter_icons_color_highlighter reloading plugin Color Highlighter.load_resource reloading plugin Color Highlighter.main reloading plugin Color Highlighter.path reloading plugin Color Highlighter.phantoms_color_highlighter reloading plugin Color Highlighter.pick_color_command reloading plugin Color Highlighter.regex_compiler reloading plugin Color Highlighter.regions reloading plugin Color Highlighter.set_setting_command reloading plugin Color Highlighter.settings reloading plugin Color Highlighter.st_helper reloading plugin Color Highlighter.topsort reloading plugin ColorSchemeEditor.ColorSchemeEditor-ST2 reloading plugin ColorSchemeUnit.plugin reloading plugin ColumnSelect.column_select reloading plugin CompareSideBySide.sbs_compare reloading plugin ConvertToUTF8.ConvertToUTF8 reloading plugin CopyFilepathWithLineNumbers.CopyFilepathWithLineNumbers reloading plugin CopyWithLineNumbersReloaded.copy_with_line_numbers reloading plugin DefaultSyntax.default_syntax reloading plugin DeleteCurrentFile.DeleteCurrentFile reloading plugin DistractionFreeWindow.distraction_free_window reloading plugin DocBlockr.jsdocs reloading plugin DocBlockr.test_runner reloading plugin DuplicateSelections.duplicate_selections reloading plugin EditPreferences.__init__ reloading plugin EditPreferences.commands_base reloading plugin EditPreferences.edit_package_files reloading plugin EditPreferences.extract_snippets reloading plugin EditPreferences.helper_commands reloading plugin EditPreferences.helpers reloading plugin EditPreferences.insert_binding_repr reloading plugin EditPreferences.jsonix reloading plugin EditPreferences.list_commands reloading plugin EditPreferences.list_menu_bindings reloading plugin EditPreferences.list_settings reloading plugin EditPreferences.list_shortcut_keys reloading plugin EditPreferences.list_theme_selectors reloading plugin EditPreferences.package_resources reloading plugin EditPreferences.quick_panel_cols reloading plugin EditPreferences.scheduler reloading plugin Emmet.emmet-plugin reloading plugin ExpandRegion.__init__ reloading plugin ExpandRegion.expand_region_handler reloading plugin ExpandRegion.expand_to_indent reloading plugin ExpandRegion.expand_to_line reloading plugin ExpandRegion.expand_to_quotes reloading plugin ExpandRegion.expand_to_regex_set reloading plugin ExpandRegion.expand_to_semantic_unit reloading plugin ExpandRegion.expand_to_subword reloading plugin ExpandRegion.expand_to_symbols reloading plugin ExpandRegion.expand_to_word reloading plugin ExpandRegion.expand_to_word_with_dots reloading plugin ExpandRegion.expand_to_xml_node reloading plugin ExpandRegion.ExpandRegion reloading plugin ExpandRegion.html reloading plugin ExpandRegion.javascript reloading plugin ExpandRegion.latex reloading plugin ExpandRegion.python reloading plugin ExpandRegion.utils reloading plugin ExportHtml.ExportBbcode reloading plugin ExportHtml.ExportHtml reloading plugin ExportHtml.HtmlAnnotations reloading plugin ExportHtml.support reloading plugin ExtendedTabSwitcher.ExtendedSwitcher reloading plugin ExtractText.clean_save_file_modifications reloading plugin ExtractText.extract_to_file reloading plugin FileDiffs.file_diffs reloading plugin FileHistory.file_history reloading plugin FileRename.file_rename reloading plugin FindKeyConflicts.find_key_conflicts reloading plugin FixCommandPalette.fixed_command_palette_input_history reloading plugin FixProjectSwitchRestartBug.fix_project_switch_restart_bug reloading plugin FixSelectionAfterIndent.fix_selection_after_indent reloading plugin ForceRewriteSublimeSettings.force_rewrite_sublime_settings reloading plugin FuzzyFileNav.fuzzy_file_nav reloading plugin FuzzyFileNav.multiconf reloading plugin FuzzyFileNav.notify reloading plugin FuzzyFilePath.command_goto_file reloading plugin FuzzyFilePath.command_insert_path reloading plugin FuzzyFilePath.command_rebuild_cache reloading plugin FuzzyFilePath.command_replace_region reloading plugin FuzzyFilePath.command_show_context reloading plugin FuzzyFilePath.command_show_current_settings reloading plugin FuzzyFilePath.command_show_info reloading plugin FuzzyFilePath.completion reloading plugin FuzzyFilePath.controller reloading plugin FuzzyFilePath.current_state reloading plugin FuzzyFilePath.expression reloading plugin FuzzyFilePath.ProjectListener reloading plugin FuzzyFilePath.query reloading plugin FuzzyFilePath.QueryCompletionListener reloading plugin FuzzyFilePath.TestRunner reloading plugin FuzzyFilePath.ViewListener reloading plugin Glue.__init__ reloading plugin Glue.Glue reloading plugin Glue.GlueBrowser reloading plugin Glue.GlueCmds reloading plugin Glue.GlueIO reloading plugin Glue.GlueSidebarOpener reloading plugin GoogleSpellCheck.google-spell-check reloading plugin HighlightBuildErrors.HighlightBuildErrors reloading plugin HighlightWords.HighlightWords reloading plugin HorizontalScroll.scroll_width reloading plugin HungryBackspace.hungry_backspace reloading plugin Incrementor.incrementor reloading plugin IncrementSelection.IncrementSelection reloading plugin IndentAndBraces.indent-and-braces reloading plugin IndentSize.IndentSizeCommand reloading plugin InsertNums.InsertNums reloading plugin InvertSelection.invertselection reloading plugin JumpAlongIndent.file_scanner reloading plugin JumpAlongIndent.jump_along_indent reloading plugin JumpAlongIndent.view_helper reloading plugin KeepPastedTextSelected.keep_pasted_text_selected reloading plugin LaTeXSmartQuotes.getTeXRoot reloading plugin LaTeXSmartQuotes.smartquotes reloading plugin LaTeXTools.01_reload_submodules reloading plugin LaTeXTools.02_temp_file_cleanup reloading plugin LaTeXTools.03_reset_phantoms reloading plugin LaTeXTools.auto_label reloading plugin LaTeXTools.biblatex_crossref_completions reloading plugin LaTeXTools.biblatex_field_name_completions reloading plugin LaTeXTools.biblatex_name_completions reloading plugin LaTeXTools.biblatex_snippet_completions reloading plugin LaTeXTools.biblatex_syntax_listener reloading plugin LaTeXTools.change_environment reloading plugin LaTeXTools.context_provider reloading plugin LaTeXTools.create_mousemap reloading plugin LaTeXTools.delete_temp_files reloading plugin LaTeXTools.detect_spellcheck reloading plugin LaTeXTools.getTeXRoot reloading plugin LaTeXTools.jumpto_anywhere reloading plugin LaTeXTools.jumpto_tex_file reloading plugin LaTeXTools.jumpToPDF reloading plugin LaTeXTools.kpsewhich reloading plugin LaTeXTools.latex_cite_completions reloading plugin LaTeXTools.latex_cwl_completions reloading plugin LaTeXTools.latex_directive_completions reloading plugin LaTeXTools.latex_env_completions reloading plugin LaTeXTools.latex_fill_all reloading plugin LaTeXTools.latex_glossary_completions reloading plugin LaTeXTools.latex_input_completions reloading plugin LaTeXTools.latex_installed_packages reloading plugin LaTeXTools.latex_own_command_completions reloading plugin LaTeXTools.latex_ref_completions reloading plugin LaTeXTools.latexCommand reloading plugin LaTeXTools.latexDocumentationViewer reloading plugin LaTeXTools.latexEnvCloser reloading plugin LaTeXTools.latexEnvironment reloading plugin LaTeXTools.latextools_cache_listener reloading plugin LaTeXTools.latextools_default_settings reloading plugin LaTeXTools.latextools_plugin reloading plugin LaTeXTools.makePDF reloading plugin LaTeXTools.migrate reloading plugin LaTeXTools.open_detexify reloading plugin LaTeXTools.parseTeXlog reloading plugin LaTeXTools.reveal_folders reloading plugin LaTeXTools.search_commands reloading plugin LaTeXTools.smart_paste reloading plugin LaTeXTools.system_check reloading plugin LaTeXTools.texcount reloading plugin LaTeXTools.texMacro reloading plugin LaTeXTools.texSections reloading plugin LaTeXTools.texSyntaxListener reloading plugin LaTeXTools.toc_quickpanel reloading plugin LaTeXTools.toggle_settings reloading plugin LaTeXWordCount.WordCount reloading plugin LESS.less_completions reloading plugin LineEndingsUnify.LineEndingsUnify reloading plugin LinesMultisets.choose_view reloading plugin LinesMultisets.execute_operation reloading plugin LSP.boot reloading plugin MarkdownPreview.helper reloading plugin MarkdownPreview.markdown_settings reloading plugin MarkdownPreview.markdown_wrapper reloading plugin MarkdownPreview.MarkdownPreview reloading plugin MarkdownToBBCode.MarkdownToBBCode reloading plugin Maven.config_generator reloading plugin Maven.import reloading plugin Maven.maven reloading plugin MaxPane.layouts_doc reloading plugin MaxPane.max_pane reloading plugin MoveText.move_text reloading plugin MultiEditUtils.MultiEditUtils reloading plugin MultiEditUtils.selection_fields reloading plugin NumberKing.king reloading plugin OpenAutoCompletion.open_auto_completion reloading plugin Origami.origami reloading plugin OverrideAudit.override_audit reloading plugin OverrideCommitCompletion.overwrite_commit_completion reloading plugin OverrideEditSettingsDefaultContents.override_edit_settings_default_contents reloading plugin OverrideUnpackedPackages.override_unpacked_packages reloading plugin package_setting_context.__init__ reloading plugin PackageDev._logging reloading plugin PackageDev.main reloading plugin PackageResourceViewer.package_resource_viewer reloading plugin PackageResourceViewer.package_resources reloading plugin PackagesManager.1_reloader reloading plugin PackagesManager.2_bootstrap reloading plugin PackagesManager.PackagesManager reloading plugin PathTranslator.PathTranslator reloading plugin PowerCursors.power_cursors reloading plugin PrettyJSON.PrettyJson reloading plugin PrettyJSON.PrettyJsonListeners reloading plugin PythonDebugTools.setup reloading plugin QuickSettings.quick_settings reloading plugin RandomEverything.__init__ reloading plugin RandomEverything.random reloading plugin REG.jumptoregkey reloading plugin ReIndent.ReIndent reloading plugin REPL.__init__ reloading plugin REPL.completions reloading plugin REPL.lang_integration reloading plugin REPL.run_existing_command reloading plugin REPL.sublimerepl reloading plugin REPL.sublimerepl_build_system_hack reloading plugin REPL.text_transfer reloading plugin ScopeHunter.scope_hunter reloading plugin ScopeHunter.scope_hunter_notify reloading plugin ScopeHunter.support reloading plugin SelectAll.select_all_by_current_scope reloading plugin SelectAllSpellingErrors.select_all_spelling_errors reloading plugin SelectUntil.edit reloading plugin SelectUntil.select-until reloading plugin SemanticLineWrap.semantic_wrap reloading plugin SideBarEnhancements.SideBar reloading plugin SideBarEnhancements.SideBarAPI reloading plugin SideBarEnhancements.SideBarDefaultDisable reloading plugin SideBySideSettings.sxs_settings reloading plugin SQLExec.SQLExec reloading plugin SQLKeywordUppercase.sql_keyword_uppercase reloading plugin SQLTools.SQLTools reloading plugin StickySearch.StickySearch reloading plugin StudioChannel.commands reloading plugin StudioChannel.settings reloading plugin SublimeLinter.busy_indicator_view reloading plugin SublimeLinter.commands reloading plugin SublimeLinter.status_bar_view reloading plugin SublimeLinter.sublime_linter reloading plugin SublimeTutorial.sublime_tutor reloading plugin SyncViewScroll.syncscroll reloading plugin SyntaxManager.syntaxmgr reloading plugin TabsExtra.support reloading plugin TabsExtra.tab_menu reloading plugin TabsExtra.tab_sort_helper reloading plugin TabsExtra.tabs_extra reloading plugin TerminalShortcuts.Terminal reloading plugin TextPastry.text_pastry reloading plugin TextPastry.text_pastry_addons reloading plugin TextPastry.text_pastry_clipboard reloading plugin TextPastry.text_pastry_selection reloading plugin ToggleWords.ToggleWords reloading plugin Trimmer.Trimmer reloading plugin UnitTesting.ut reloading plugin ViewSettingsFreely.view_settings_freely reloading plugin Whitespace.Whitespace reloading plugin WordCount.WordCount reloading plugin WrapPlus.wrap_plus plugins loaded Loaded LaTeXTools plugins ['pdf_builder'] from path F:\SublimeText\Data\Packages\LaTeXTools\builders\pdfBuilder.py Loaded LaTeXTools plugins ['simple_builder', 'traditional_builder', 'script_builder', 'basic_builder'] from path F:\SublimeText\Data\Packages\LaTeXTools\builders syncScroll starting Loaded LaTeXTools plugins ['base_viewer'] from path F:\SublimeText\Data\Packages\LaTeXTools\viewers\base_viewer.py Loaded LaTeXTools plugins ['sumatra_viewer', 'evince_viewer', 'okular_viewer', 'zathura_viewer', 'preview_viewer', 'command_viewer', 'skim_viewer'] from path F:\SublimeText\Data\Packages\LaTeXTools\viewers LSP: global clients: pyls=True LSP: starting active= F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py other= 0 LSP: starting in F:\SublimeText\Data LSP: starting ['pyls'] LSP: --> initialize Loaded LaTeXTools plugins ['new_bibliography', 'traditional_bibliography'] from path F:\SublimeText\Data\Packages\LaTeXTools\bibliography_plugins OverrideAudit: Initializing OverrideAudit: Sublime version is unchanged; skipping automatic report Loading LaTeXTools plugins... Emmet: No need to update PyV8 Loaded LaTeXTools plugins [] from path F:\SublimeText\Data\Packages\LaTeXTools\builders\pdfBuilder.py Loaded LaTeXTools plugins [] from path F:\SublimeText\Data\Packages\LaTeXTools\builders reloading plugin AmxxChannel.commands reloading plugin StudioChannel.commands reloading settings Packages/User/BufferScroll.sublime-settings Loaded LaTeXTools plugins [] from path F:\SublimeText\Data\Packages\LaTeXTools\viewers\base_viewer.py Loaded LaTeXTools plugins [] from path F:\SublimeText\Data\Packages\LaTeXTools\viewers Loaded LaTeXTools plugins [] from path F:\SublimeText\Data\Packages\LaTeXTools\bibliography_plugins ```


``` LSP: --> initialized LSP: --> workspace/didChangeConfiguration LSP: pyls client registered for window 3 LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py reloading /F/SublimeText/Data/debug.txt indexing [job 5]: no files were indexed out of the 11 queued, abandoning crawl FuzzyFilePath cached 63 files in D:/User/Dropbox/SoftwareVersioning/python-language-server LSP: starting in D:\User\Dropbox\SoftwareVersioning\python-language-server LSP: starting ['pyls'] LSP: --> initialize LSP: pyls not available for view D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py in window 2 indexing [job 6]: no files were indexed out of the 110 queued, abandoning crawl indexing [job 7]: no files were indexed out of the 110 queued, abandoning crawl LSP: Already starting on this window: pyls LSP: pyls not available for view D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py in window 2 LSP: --> initialized LSP: --> workspace/didChangeConfiguration LSP: pyls client registered for window 2 LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py base_dir: F:\SublimeText\Data file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py Error handling notification textDocument/publishDiagnostics Traceback (most recent call last): File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 221, in notification_handler self._notification_handlers[method](params) File "F:\SublimeText\Data\Packages\LSP\plugin\core\main.py", line 145, in lambda params: handle_diagnostics(params)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\diagnostics.py", line 52, in handle_diagnostics Events.publish("document.diagnostics", DiagnosticsUpdate(file_path, diagnostics)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\events.py", line 28, in publish listener(*args) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 166, in lambda update: handle_diagnostics(update)) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 174, in handle_diagnostics update_diagnostics_panel(window) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 247, in update_diagnostics_panel relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path File "./python3.3/ntpath.py", line 564, in relpath ValueError: path is on mount 'D:', start on mount 'F:' LSP: --> textDocument/hover FuzzyFilePath cached 8688 files in F:/SublimeText/Data FuzzyFilePath cached 8688 files in F:/SublimeText/Data ``` This seems to happens after merging the fix for: 1. https://github.com/tomv564/LSP/issues/247 ValueError: path is on mount 'D:', start on mount 'F:' At least, I think I did not had noticed this error before merging it on: 1. https://github.com/evandroforks/LSP/pull/2 Update from upstream repo tomv564/LSP@master If I continue switching between the windows and hoverving stuff, the errors keeps coming one time or another. It is not an exact science:

``` LSP: --> textDocument/hover FuzzyFilePath cached 8688 files in F:/SublimeText/Data FuzzyFilePath cached 8688 files in F:/SublimeText/Data PackagesManager: No updated packages FuzzyFilePath cached 63 files in D:/User/Dropbox/SoftwareVersioning/python-language-server LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: D:\User\Dropbox\SoftwareVersioning\python-language-server file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\config\config.py LSP: --> textDocument/hover LSP: --> textDocument/didOpen LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py base_dir: F:\SublimeText\Data file_path: F:\sublimetext\data\packages\pythondebugtools\all\python_debug_tools\logger.py base_dir: F:\SublimeText\Data file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py Error handling notification textDocument/publishDiagnostics Traceback (most recent call last): File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 221, in notification_handler self._notification_handlers[method](params) File "F:\SublimeText\Data\Packages\LSP\plugin\core\main.py", line 145, in lambda params: handle_diagnostics(params)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\diagnostics.py", line 52, in handle_diagnostics Events.publish("document.diagnostics", DiagnosticsUpdate(file_path, diagnostics)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\events.py", line 28, in publish listener(*args) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 166, in lambda update: handle_diagnostics(update)) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 174, in handle_diagnostics update_diagnostics_panel(window) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 247, in update_diagnostics_panel relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path File "./python3.3/ntpath.py", line 564, in relpath ValueError: path is on mount 'D:', start on mount 'F:' LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py base_dir: F:\SublimeText\Data file_path: F:\sublimetext\data\packages\pythondebugtools\all\python_debug_tools\logger.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py base_dir: F:\SublimeText\Data file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py Error handling notification textDocument/publishDiagnostics Traceback (most recent call last): File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 221, in notification_handler self._notification_handlers[method](params) File "F:\SublimeText\Data\Packages\LSP\plugin\core\main.py", line 145, in lambda params: handle_diagnostics(params)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\diagnostics.py", line 52, in handle_diagnostics Events.publish("document.diagnostics", DiagnosticsUpdate(file_path, diagnostics)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\events.py", line 28, in publish listener(*args) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 166, in lambda update: handle_diagnostics(update)) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 174, in handle_diagnostics update_diagnostics_panel(window) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 247, in update_diagnostics_panel relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path File "./python3.3/ntpath.py", line 564, in relpath ValueError: path is on mount 'D:', start on mount 'F:' LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover FuzzyFilePath cached 8688 files in F:/SublimeText/Data LSP: --> textDocument/hover FuzzyFilePath cached 63 files in D:/User/Dropbox/SoftwareVersioning/python-language-server LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: D:\User\Dropbox\SoftwareVersioning\python-language-server file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\python_ls.py base_dir: D:\User\Dropbox\SoftwareVersioning\python-language-server file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\config\config.py LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\LSP\plugin\core\logging.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py base_dir: F:\SublimeText\Data file_path: F:\sublimetext\data\packages\pythondebugtools\all\python_debug_tools\logger.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py base_dir: F:\SublimeText\Data file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py Error handling notification textDocument/publishDiagnostics Traceback (most recent call last): File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 221, in notification_handler self._notification_handlers[method](params) File "F:\SublimeText\Data\Packages\LSP\plugin\core\main.py", line 145, in lambda params: handle_diagnostics(params)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\diagnostics.py", line 52, in handle_diagnostics Events.publish("document.diagnostics", DiagnosticsUpdate(file_path, diagnostics)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\events.py", line 28, in publish listener(*args) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 166, in lambda update: handle_diagnostics(update)) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 174, in handle_diagnostics update_diagnostics_panel(window) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 247, in update_diagnostics_panel relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path File "./python3.3/ntpath.py", line 564, in relpath ValueError: path is on mount 'D:', start on mount 'F:' FuzzyFilePath cached 8688 files in F:/SublimeText/Data LSP: --> textDocument/didOpen LSP: <-- textDocument/publishDiagnostics base_dir: F:\SublimeText\Data file_path: F:\Python\lib\logging\__init__.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\LSP\plugin\core\logging.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\PythonDebugTools\tests\manual_tests.py base_dir: F:\SublimeText\Data file_path: F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py base_dir: F:\SublimeText\Data file_path: F:\sublimetext\data\packages\pythondebugtools\all\python_debug_tools\logger.py base_dir: F:\SublimeText\Data file_path: D:\User\Dropbox\SoftwareVersioning\python-language-server\pyls\__main__.py Error handling notification textDocument/publishDiagnostics Traceback (most recent call last): File "F:\SublimeText\Data\Packages\LSP\plugin\core\rpc.py", line 221, in notification_handler self._notification_handlers[method](params) File "F:\SublimeText\Data\Packages\LSP\plugin\core\main.py", line 145, in lambda params: handle_diagnostics(params)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\diagnostics.py", line 52, in handle_diagnostics Events.publish("document.diagnostics", DiagnosticsUpdate(file_path, diagnostics)) File "F:\SublimeText\Data\Packages\LSP\plugin\core\events.py", line 28, in publish listener(*args) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 166, in lambda update: handle_diagnostics(update)) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 174, in handle_diagnostics update_diagnostics_panel(window) File "F:\SublimeText\Data\Packages\LSP\plugin\diagnostics.py", line 247, in update_diagnostics_panel relative_file_path = os.path.relpath(file_path, base_dir) if base_dir else file_path File "./python3.3/ntpath.py", line 564, in relpath ValueError: path is on mount 'D:', start on mount 'F:' LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover FuzzyFilePath cached 63 files in D:/User/Dropbox/SoftwareVersioning/python-language-server LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover LSP: --> textDocument/hover FuzzyFilePath cached 8688 files in F:/SublimeText/Data FuzzyFilePath cached 63 files in D:/User/Dropbox/SoftwareVersioning/python-language-server ```


tomv564 commented 6 years ago

It might not be related to the fix for references, as this error happens when diagnostics are processed in window 2 after a file is opened in window 1.

The cause is a globally shared diagnostics event as seen here in diagnostics.py:

Events.subscribe("document.diagnostics",
                 lambda update: handle_diagnostics(update))

We used to filter events not for the current window by checking the path, but after https://github.com/tomv564/LSP/commit/341cdbe1010058a49c07fdd819ae37b79cb71ced that restriction was unintentionally removed.

The real solution is to create an Events instance per window.

evandrocoan commented 6 years ago

The real solution is to create an Events instance per window.

I can open the same project in several windows (Same project, different workspaces .sublime-workspace). Then should it be per .sublime-project or it is irrelevant?

Also, I am not having errors when I open a external file from the workspace, why this would not cause the error when opening an external file from the project but only switching windows? Is it because external files are treated as a especial case and are not covered in this?

tomv564 commented 6 years ago

It would still be per-window as you also get a language server process per window.

Feel free to investigate further on the external files difference - neither LSP nor language servers are required to support them so it’s entirely possible there are differences. On Sun, Jan 21, 2018 at 10:46 PM Evandro Coan notifications@github.com wrote:

The real solution is to create an Events instance per window.

I can open the same project in several windows (Same project, different workspaces). Then should it be per .sublime-project or it is irrelevant?

Also, I am not having errors when I open a external file from the workspace, why this would not cause the error when opening an external file from the project but only switching windows? Is it because external files are treated as a especial case and are not covered in this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tomv564/LSP/issues/251#issuecomment-359283796, or mute the thread https://github.com/notifications/unsubscribe-auth/AEMTOCaUEzojf2aOadyh85ZDpwBvAExDks5tM7AygaJpZM4Rl6TA .