Repository navigation
Failure/Error: source: Pathname(filename).read #111
Copy link
Copy link
Closed
Description
Platform: Windows
Ruby: 2.7.2
Trying to run dead_end on my spec files. I added --require dead_end to my .rspec file. I manually delete an end in my code and run which produces this backtrace:
C:\_Programs\COSMOS\COSMOS\cosmos>rspec spec\microservices\microservice_spec.rb
An error occurred while loading ./spec/microservices/microservice_spec.rb.
Failure/Error: source: Pathname(filename).read,
Errno::ENOENT:
No such file or directory @ rb_sysopen - C
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `read'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `read'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end.rb:24:in `handle_error'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:17:in `rescue in load'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:14:in `load'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2112:in `load_file_handling_errors'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1615:in `block in load_spec_files'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `each'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:1613:in `load_spec_files'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:102:in `setup'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:86:in `run'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<top (required)>'
# C:/Ruby27-x64/bin/rspec:23:in `load'
# C:/Ruby27-x64/bin/rspec:23:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
# ------------------
# --- Caused by: ---
# SyntaxError:
# C:/_Programs/COSMOS/COSMOS/cosmos/spec/microservices/microservice_spec.rb:54: syntax error, unexpected end-of-input, expecting `end'
# C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/dead_end-3.0.1/lib/dead_end/auto.rb:15:in `load'
No examples found.
Finished in 0.00004 seconds (files took 0.68202 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
schneems commentedon Nov 12, 2021
Oof, sorry about that. Thanks for the report!
Fix windows compatibility
Fix windows compatibility
schneems commentedon Nov 12, 2021
Turns out that it wasn't just windows, it was any path with a colon
:in it. I'm surprised it's gone this far without anyone hitting this bug before. Fixed in #114 and released in 3.0.2. Can you try again and let me know if you hit additional issues?Thanks! I had a ton of fun making it. I'm happy to hear you enjoyed it.
schneems commentedon Nov 12, 2021
That's great, thanks for checking!
I used keynote to make the slides. I heavily use/abuse "magic move" to make multiple slides transform so it looks like I'm just animating a single slide here's the full deck exported to PDF with my notes https://speakerdeck.com/schneems/rubyconf-beware-the-dreaded-dead-end.
Most every keynote trick I learned I picked up from Searls or Caleb Thompson.
Usually, I don't go quite so animation-heavy on my slides as it does take a ton of time. I first gave the talk as 10 minutes for !!con, then 25 for RubyKaigi and then 35 for Ruby conf, so I didn't have to make them all in one go, it was natural to expand a bit more each time.