facebook / facebook/pyrefly

Add config option to mark files as not reachable

Open
#4,403 6 comments 0 reactions 1 assignee Claimed by @obassett View on GitHub
configuration good first issue language-server
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

I have a folder with some large generated files that I exclude via `project-excludes`. `pyrefly check` honors the setting, but `pyrefly lsp` does not seem to.

Here is a simplified example:

```
.
├── a.py
├── b.py
└── pyproject.toml
```

**pyproject.toml**
```toml
[tool.pyrefly]
search_path = [
'.'
]
project-excludes = [
'**/a.py',
]
```

**a.py**
```python
# The crasher from https://github.com/facebook/pyrefly/issues/3670
[(c:=)for c+]
[(c:=)for]
```

**b.py**
```python
# empty
```

### Steps to reproduce
- Open the folder in VS Code
- Make sure the Pyrefly extension is activated
- Open `b.py` to trigger warnings about the language server crashing
- Note: `pyrefly check` does not crash with the same folder

### Version info
- VS Code 1.127.0
- Pyrefly 1.2.0 extension (just the extension, no venv used)

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.