Skip to content

Commit

Permalink
Get rid of 12-year-old hack to add dynamic gem dependencies
Browse files Browse the repository at this point in the history
The hack, which acts as a C-extensions which ain't one:
https://en.wikibooks.org/wiki/Ruby_Programming/RubyGems#How_to_install_different_versions_of_gems_depending_on_which_version_of_ruby_the_installee_is_using

The problem with this hack is:

* it cannot pass build flags to depdent gems from bundler, i.e.
  ruby-debug-ide won't pass build.debase flags even though it triggers
  debase C-extension build as a dynamic dependency

  build.debase
    Set for the current user (/Users/kaka.dudu/.bundle/config): "--with-cflags=-Wno-error=incompatible-function-pointer-types"

* it's 2024 and LMND does not make Ruby IDEs, for application scope
  we don't need this hack, it's drawbacks and static dependencies for a
  narrower scope of Ruby runtimes is super fine, especially when it
  reduces vast amount of problems that developers may experience

TL;DR

* don't add dynamic dependencies, monolith already specifies them
  explicitly

  group :development do
    gem 'debase', '0.2.5.beta2'
    gem 'ruby-debug-ide', github: 'lemonade-hq/ruby-debug-ide', branch: 'master'
  end

Co-authored-by: Szymon Fiedler <[email protected]>
  • Loading branch information
mostlyobvious and fidel committed Mar 12, 2024
1 parent b671a1c commit b9e9ab3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
44 changes: 0 additions & 44 deletions ext/mkrf_conf.rb

This file was deleted.

2 changes: 0 additions & 2 deletions ruby-debug-ide.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and Rub
spec.executables = %w[rdebug-ide gdb_wrapper]
spec.files = FILES

spec.extensions << "ext/mkrf_conf.rb" unless ENV["NO_EXT"]

if RUBY_VERSION < "2.0"
spec.add_dependency("rake", "< 12.3")
elsif RUBY_VERSION < "2.1"
Expand Down

0 comments on commit b9e9ab3

Please sign in to comment.