Draft
Conversation
amomchilov
commented
Jul 28, 2023
| if defined?(SESSION) | ||
| # puts("const_defined? #{ DEBUGGER__.const_defined?(:SESSION)}, defined? #{defined?(SESSION)}") | ||
| # if defined?(SESSION) | ||
| if DEBUGGER__.const_defined?(:SESSION) |
Author
There was a problem hiding this comment.
I don't quite understand why, but defined?(SESSION) and DEBUGGER__.const_defined?(:SESSION) behave differently.
Without changing this, the if was being entered, SESSION was attempted to be loaded, and then not found because it's defined dynamically.
amomchilov
commented
Jul 28, 2023
|
|
||
| spec.add_dependency "irb", ">= 1.5.0" # for binding.irb(show_code: false) | ||
| spec.add_dependency "reline", ">= 0.3.1" | ||
| spec.add_development_dependency "zeitwerk", "~> 2.6.9" |
Author
There was a problem hiding this comment.
Imma be real, I have no idea what the difference is between this, and gemspec.add_development_dependency 🫥
Member
There was a problem hiding this comment.
I think it just depends on how the variable from Gem::Specification.new do |spec| is named. In most cases it seems to be named spec?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Constantly restarting your debugger to make your changes take effect is a total pain.
This PR tries to apply Zeitwerk to autoload constants and live reload files as they change (not yet working). I only do it to
open.rb, and not other commands likestart.rb.