ruby / ruby/typeprof

"A constant `TCPServer' is used but not defined in RBS" when requiring openssl

Open
#75 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
833
Forks
99
Avg merge
9h 30m
Merged PRs (30d)
12

Description

I'm not sure if this is technically a Ruby bug or a typeprof bug, but if you have a file with require 'openssl'you'll get the error: "A constant 'TCPServer' is used but not defined in RBS". This can be resolved by adding require 'socket' before require 'openssl'.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a minimal file containing only require 'openssl', then compare it with the version that requires 'socket' first. Trace how TypeProf loads and resolves the OpenSSL dependencies, and add a regression test showing that requiring OpenSSL alone no longer reports TCPServer as undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.