question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Analyzing the top directory (home for example) for any reason ?

See original GitHub issue

I’m opening /home/pafer/Project/foo/main.py for example.

I open neovim inside /home/pafer/Projects/foo, and I create the file. Then I save it.

This happens:

image

It scans the entire /home/pafer/Projects without any reason, taking the CPU and make my computer slow.

What’s the output of :CocCommand pyright.version 1.1.154

What’s the output of :CocCommand workspace.showOutput Pyright

Here is the output, note that my python file and PWD are not in /home/pafer/Projects but in foo subdirectory ! But the “Workspace” is considered to be the top directory ?

Workspace: /home/pafer/Projects
Using python from /usr/bin/python

[Info  - 14:56:36] Pyright language server 1.1.154 starting
[Info  - 14:56:36] Server root directory: /home/pafer/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info  - 14:56:36] No configuration file found.
[Info  - 14:56:36] No pyproject.toml file found.
[Info  - 14:56:36] Setting pythonPath for service "Projects": "/usr/bin/python"
[Warn  - 14:56:36] stubPath /home/pafer/Projects/typings is not a valid directory.
[Info  - 14:56:36] Assuming Python version 3.9
[Info  - 14:56:36] Assuming Python platform Linux
[Warn  - 14:56:36] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 14:56:36] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 14:56:36] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 14:56:36] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 14:56:36] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 14:56:36] Searching for source files
[Info  - 14:56:36] Auto-excluding /home/pafer/Projects/XXX

[ A lot of my Prjects/XXX folders appears here]

[Info  - 14:56:49] Found 46577 source files
[Info  - 14:57:44] Emptying type cache to avoid heap overflow. Heap size used: 1539MB
[Info  - 14:57:58] Emptying type cache to avoid heap overflow. Heap size used: 1694MB
[Info  - 14:58:52] Emptying type cache to avoid heap overflow. Heap size used: 1645MB

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
fannheywardcommented, Jul 7, 2021
  1. I prefer to remove src from your patterns, I know some projects use this, but it’s not a good pattern
  2. coc-pyright already supports lots patterns, and coc has .git/.hg/.projections.json patterns, for most cases, it’s ok to work
  3. VSCode doesn’t create a project file by default, if you set something, VSCode will create .vscode folder
  4. Python projects don’t have a standard project-specific file, but pyproject.toml is used more and more often

https://github.com/fannheyward/coc-pyright/blob/ddc6e540be713512cbc468b5e9cf2cdb6d913426/package.json#L70-L82

0reactions
metal3dcommented, Jul 7, 2021

ho sorry, this one is the one used by default!

OK sorry.

The first point is not a bad pattern, sometimes, to add a README file and to not overload the “root” of the project, it’s not that bad to append a subdirectory for sources.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Structures of Directory in Operating System - GeeksforGeeks
The single-level directory is the simplest directory structure. In it, all files are contained in the same directory which makes it easy to ......
Read more >
Linux Directory Structure and Important Files Paths Explained
This article gives a breakdown of the Linux File System/directory structure, some of the critical files, their usability, and their ...
Read more >
What Is a Root Folder or Root Directory? - Lifewire
The root folder, aka root directory, is the highest folder in any folder-based hierarchy. For example, the root folder of the C drive...
Read more >
[AOS Only] What to do when /home partition or /home/nutanix ...
This article describes ways to safely free up space if /home partition or /home/nutanix directories of a CVM become full or do not...
Read more >
Project-oriented workflow - Tidyverse
Organize each logical project into a folder on your computer. · Make sure the top-level folder advertises itself as such. · Use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found