Repository: soutaro/steep (Ruby)

Issue:
Space in file path crashes and deadlocks `steep check`
I’m a GUI user (:
```
$ mkdir '/tmp/dump core'
$ cd '/tmp/dump core'
$ touch 'dummy.rb'
$ echo 'target :l do check "." end' > Steepfile
$ steep check
```
<details><summary>Output:</summary>

```
# Type checking files:

#<Thread:0x00007f7e90b57eb0 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:453 run> terminated with exception (report_on_exception is true):
/usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/generic.rb:770:in `check_path': bad component(expected absolute path component): /tmp/dump core/dummy.rb (URI::InvalidComponentError)
        from /usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/generic.rb:816:in `path='
        from /usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/generic.rb:192:in `initialize'
        from /usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/generic.rb:136:in `new'
        from /usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/generic.rb:136:in `build'
        from /usr/local/lib/ruby/gems/3.2.0/gems/uri-0.12.2/lib/uri/file.rb:55:in `build'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/path_helper.rb:23:in `to_uri'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:24:in `uri'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:32:in `block in as_json'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:32:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:32:in `as_json'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:826:in `block (2 levels) in start_type_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:816:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:816:in `block in start_type_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:763:in `start_type_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:706:in `process_message_from_client'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:472:in `block (4 levels) in start'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:465:in `block (3 levels) in start'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/master.rb:455:in `block (2 levels) in start'
$ ^C
/usr/local/lib/ruby/gems/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/transport/io/reader.rb:16:in `gets': Interrupt
        from /usr/local/lib/ruby/gems/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/transport/io/reader.rb:16:in `read'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:73:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8b24b178 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970bda50 native:0x00007f7e8b5fa6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8b44b680 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970d9590 native:0x00007f7e8b7fb6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'

16:18 /tmp/dump core
    $ /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8b64bd68 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970d5e20 native:0x00007f7e8b9fc6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8b84c748 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970ce080 native:0x00007f7e8bbfd6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8ba4d8a8 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970cae10 native:0x00007f7e8bdfe6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8bc4e1c0 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970c4a50 native:0x00007f7e8bfff6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e8be5e9b0 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d970bfb10 native:0x00007f7e9072f6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'
/usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `join': No live threads left. Deadlock? (fatal)
2 threads, 2 sleeps current:0x0000563d94ab7130 main thread:0x0000563d94ab7130
* #<Thread:0x00007f7e9537a828 sleep_forever>
   rb_thread_t:0x0000563d94ab7130 native:0x00007f7e955147c0 int:0

* #<Thread:0x00007f7e9007f6f0 /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:42 sleep_forever>
   rb_thread_t:0x0000563d9709ccb0 native:0x00007f7e8ff3f6c0 int:0
    depended by: tb_thread_id:0x0000563d94ab7130


        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:91:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/base_worker.rb:75:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:49:in `block in run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:37:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/tagged_logging.rb:99:in `tagged'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/worker.rb:23:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:69:in `block in fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:65:in `fork_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:24:in `start_worker'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:135:in `block in start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `times'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `each'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `map'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/server/worker_process.rb:134:in `start_typecheck_workers'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/drivers/check.rb:39:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:120:in `process_check'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/lib/steep/cli.rb:60:in `run'
        from /usr/local/lib/ruby/gems/3.2.0/gems/steep-1.5.3/exe/steep:11:in `<top (required)>'
        from /usr/local/bin/steep:25:in `load'
        from /usr/local/bin/steep:25:in `<main>'

```

</details>



Fix (patch):
diff --git a/lib/steep/path_helper.rb b/lib/steep/path_helper.rb
index 599f9d8a6..d9cc2de84 100644
--- a/lib/steep/path_helper.rb
+++ b/lib/steep/path_helper.rb
@@ -7,6 +7,7 @@ def to_pathname(uri, dosish: Gem.win_platform?)
       if uri.scheme == "file"
         path = uri.path or raise
         path.sub!(%r{^/([a-zA-Z])(:|%3A)//?}i, '\1:/') if dosish
+        path = URI::DEFAULT_PARSER.unescape(path)
         Pathname(path)
       end
     end
@@ -20,6 +21,7 @@ def to_uri(path, dosish: Gem.win_platform?)
       if dosish
         str_path.insert(0, "/") if str_path[0] != "/"
       end
+      str_path = URI::DEFAULT_PARSER.escape(str_path)
       URI::File.build(path: str_path)
     end
   end
diff --git a/lib/steep/services/stats_calculator.rb b/lib/steep/services/stats_calculator.rb
index 3cd8b0848..912eb77bd 100644
--- a/lib/steep/services/stats_calculator.rb
+++ b/lib/steep/services/stats_calculator.rb
@@ -1,7 +1,7 @@
 module Steep
   module Services
     class StatsCalculator
-      SuccessStats = Struct.new(:target, :path, :typed_calls_count, :untyped_calls_count, :error_calls_count, keyword_init: true) do
+      class SuccessStats < Struct.new(:target, :path, :typed_calls_count, :untyped_calls_count, :error_calls_count, keyword_init: true)
         def as_json
           {
             type: "success",
@@ -14,7 +14,7 @@ def as_json
           }
         end
       end
-      ErrorStats = Struct.new(:target, :path, keyword_init: true) do
+      class ErrorStats < Struct.new(:target, :path, keyword_init: true)
         def as_json
           {
             type: "error",
diff --git a/sig/steep/services/stats_calculator.rbs b/sig/steep/services/stats_calculator.rbs
index 129219635..619658743 100644
--- a/sig/steep/services/stats_calculator.rbs
+++ b/sig/steep/services/stats_calculator.rbs
@@ -1,17 +1,41 @@
 module Steep
   module Services
     class StatsCalculator
-      SuccessStats: untyped
+      class SuccessStats
+        attr_reader target: Project::Target
 
-      ErrorStats: untyped
+        attr_reader path: Pathname
 
-      attr_reader service: untyped
+        attr_reader typed_calls_count: Integer
 
-      def initialize: (service: untyped) -> void
+        attr_reader untyped_calls_count: Integer
 
-      def project: () -> untyped
+        attr_reader error_calls_count: Integer
 
-      def calc_stats: (untyped target, file: untyped) -> untyped
+        def initialize: (target: Project::Target, path: Pathname, typed_calls_count: Integer, untyped_calls_count: Integer, error_calls_count: Integer) -> void
+
+        def as_json: () -> Hash[Symbol, untyped]
+      end
+
+      class ErrorStats
+        attr_reader target: Project::Target
+
+        attr_reader path: Pathname
+
+        def initialize: (target: Project::Target, path: Pathname) -> void
+
+        def as_json: () -> Hash[Symbol, untyped]
+      end
+
+      type stats = SuccessStats | ErrorStats
+
+      attr_reader service: TypeCheckService
+
+      def initialize: (service: TypeCheckService) -> void
+
+      def project: () -> Project
+
+      def calc_stats: (Project::Target target, file: TypeCheckService::SourceFile) -> stats
     end
   end
 end
diff --git a/smoke/regression/hello world.rb b/smoke/regression/hello world.rb
new file mode 100644
index 000000000..3041c0766
--- /dev/null
+++ b/smoke/regression/hello world.rb
@@ -0,0 +1,1 @@
+1.foo()