ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
371 stars 83 forks source link

Update debase logic in the Gemfile #202

Closed mrbiggred closed 2 years ago

mrbiggred commented 3 years ago

I don't think all the platform logic for the debase gem is required in the Gemfile but please feel free to correct me if I'm wrong. I stumbled across the issue of debase not getting installed when trying to get the Ruby Debug IDE development environment setup.

mrbiggred commented 3 years ago

Not all the tests have completed yet but I noticed one has failed already. The Ruby 2.0 one:

https://travis-ci.org/github/ruby-debug/ruby-debug-ide/jobs/734024227

I don't think this is my fault as it appears this test has been failing for a while. Best I can tell it started failing on commit https://github.com/ruby-debug/ruby-debug-ide/commit/18a3ba4f8941e5bc036ddb0272e1335095bfafe8:

https://travis-ci.org/github/ruby-debug/ruby-debug-ide/builds/589963410

Please let me know if my assumption is incorrect and test is failing because of my work. Thanks.

hurricup commented 3 years ago

I prefer not to change anything here without clear and understandable reason. Your changes do change semantic of the code written long ago and for some reason. Also, we are using pessimistic version constraint for a reason.

mrbiggred commented 3 years ago

@hurricup thanks for your feedback and sorry I did not explain the reason why I made the change in my PR comment. I made the changes because I encountered the following below error when trying to setup my development environment to make changes to the Ruby Debug IDE. I'm using Ruby 2.6.6.

> bundle install
Fetching gem metadata from http://rubygems.org/.......
Installing rake 13.0.1
Using bundler 2.1.4
Installing power_assert 1.2.0
Using ruby-debug-ide 0.7.2 from source at `.`
Installing test-unit 3.3.6
Bundle complete! 5 Gemfile dependencies, 5 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

The debase gem was not installed so when I ran the tests I got the following errors:

> rake
/usr/local/bin/ruby -I"lib:test:test-base" -I"/usr/local/bundle/gems/rake-13.0.1/lib" "/usr/local/bundle/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/rd_basic_test.rb" "test/rd_catchpoint_test.rb" "test/rd_condition_test.rb" "test/rd_enable_disable_test.rb" "test/rd_expression_info_test.rb" "test/rd_inspect_test.rb" "test/rd_stepping_breakpoints_test.rb" "test/rd_threads_and_frames_test.rb" "test/rd_variables_test.rb" "test/regression/rd_frame_segfault_test.rb" "test/ruby-debug/unescape_incoming_test.rb" "test/ruby-debug/xml_printer_test.rb" 

File does not exist: debase

rake aborted!
Command failed with status (1): [ruby -I"lib:test:test-base" -I"/usr/local/bundle/gems/rake-13.0.1/lib" "/usr/local/bundle/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/rd_basic_test.rb" "test/rd_catchpoint_test.rb" "test/rd_condition_test.rb" "test/rd_enable_disable_test.rb" "test/rd_expression_info_test.rb" "test/rd_inspect_test.rb" "test/rd_stepping_breakpoints_test.rb" "test/rd_threads_and_frames_test.rb" "test/rd_variables_test.rb" "test/regression/rd_frame_segfault_test.rb" "test/ruby-debug/unescape_incoming_test.rb" "test/ruby-debug/xml_printer_test.rb" ]
/usr/local/bundle/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
> bundle platform
Your platform is: x86_64-linux

Your app has gems that work on these platforms:
* ruby

Your Gemfile does not specify a Ruby version requirement.

> ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]

From what I can tell the current Gemfile logic would only install debase for the Ruby 2.0 to 2.5 on all platforms except for Windows. I think debase works on Windows.

https://bundler.io/man/gemfile.5.html#PLATFORMS

So I thought I would simplify the Gemfile so other contributors wouldn't encounter this issue. It appear that debase not getting installed is also the reason the Ruby 2.6 Travis test is failing:

https://travis-ci.org/github/ruby-debug/ruby-debug-ide/jobs/727942098

You will also encounter the debase not being installed error with Ruby 2.7.

Let me know if you change your mind about this change otherwise feel free to close this PR. If you do change your mind I am happy to re-add the pessimistic version constraints. All the best.

hurricup commented 3 years ago

Ok, then it looks like we only need to add 26 platform to the list of mris. Not re-work all the Gemfile. :)

mrbiggred commented 3 years ago

@hurricup I've reverted the Gemfile and added the 26 platform. I also added a section to the Readme about setting up you local development environment for Ruby Debug IDE. Let me know what you think.

mrbiggred commented 3 years ago

@hurricup it appears that ruby_26 was not added to bundler till version 2.1.0:

https://github.com/rubygems/bundler/blob/a45a7e778b04edfff03d6dd2f78a2db649d3805a/CHANGELOG.md#210pre1-august-28-2019

That is why most of the tests are failing:

https://travis-ci.org/github/ruby-debug/ruby-debug-ide/builds/734424087

Silly me for thinking this would be a nice quick PR. What are your thoughts?