Skip to content

Conversation

@pboling
Copy link
Contributor

@pboling pboling commented Feb 3, 2025

Please help me support open source by sponsoring me - @pboling

@pboling
Copy link
Contributor Author

pboling commented Feb 3, 2025

This sits on top of #250, since that PR fixes CI, and adds more Ruby engines and versions to the matrix.

end

def build_gemspec(path = ".")
Dir.mkdir("tmp/stage/#{path}") rescue nil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an existing pattern in the tests I merely copied.

end

def build_modular_gemfile
Dir.mkdir("tmp/stage/gemfiles") rescue nil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an existing pattern in the tests I merely copied.

pboling added a commit to VitalConnectInc/turbo_tests that referenced this pull request Feb 3, 2025
@pboling
Copy link
Contributor Author

pboling commented Feb 12, 2025

ping @nickcharlton 🔶

@pboling pboling mentioned this pull request Feb 18, 2025
@n-rodriguez
Copy link
Contributor

@pboling

I think the test suite was already broken before I made any changes

I don't think so, see: https://github.com/thoughtbot/appraisal/actions/runs/10999060013, but it might be due to a change in Bundler 😢

@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2025

Interesting. Actually there may only be a few minor failures. From the Ruby 3.4 build:

            expected: 
"# This file was generated by Appraisal\n\nsource \"[https://rubygems.org\](https://rubygems.org/)"\n\nruby({:file=>\".ruby-version\"})\n\ngem \"appraisal\", :path => \"/home/runner/work/appraisal/appraisal\"\n"
            got:
"# This file was generated by Appraisal\n\nsource \"[https://rubygems.org\](https://rubygems.org/)"\n\n:ruby({file => \".ruby-version\"})\n\ngem \"appraisal\", :path => \"/home/runner/work/appraisal/appraisal\"\n"

The difference is there are spaces around the => for :file in got, but not expected. Oddly the spaces around => for :path are the same in both...

Also there is a semicolon before ruby for expected, but not for got. This seems like tests may not have been modified properly according to the way hashes print in Ruby 3.4?

@pboling
Copy link
Contributor Author

pboling commented Feb 20, 2025

@nickcharlton I tihnk some of the failures were legit broken stuff. I've fixed pretty much everything (and done some other things too) in a new PR:
#249

@n-rodriguez
Copy link
Contributor

@pboling thank you!
@nickcharlton LGTM

- Support debug for debugging with Ruby >= 2.7
- Support byebug for debugging with Ruby < 2.7
…d matrix

- all current jruby and truffleruby are compatible with Ruby 3.1 at minimum, thus are supported by latest bundler
- Use strip_heredoc uniformly in acceptance tests
- Differences in handling of whitespace between versions of Ruby are often seen as minor, and go unnoticed unless tests explicitly test white space as appraisal's test suite does.
@pboling
Copy link
Contributor Author

pboling commented Feb 21, 2025

Rebased on top of the PR that fixes the build (#250) down to Ruby 2.7.

@pboling
Copy link
Contributor Author

pboling commented Feb 24, 2025

Rebased on my lts branch again, which should make the build green here.

desc "Run the given task for all appraisals"
task appraisal: "appraisal:all"
desc("Run the given task for all appraisals")
task(:appraisal => "appraisal:all")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/HashSyntax: Use the new Ruby 1.9 hash syntax.

task(:all) do
ARGV.shift
exec "bundle exec appraisal rake #{ARGV.join(' ')}"
exec("bundle exec appraisal rake #{ARGV.join(" ")}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.

exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}"
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(" ")}`.")
exec("bundle exec appraisal #{appraisal.name} rake #{ARGV.join(" ")}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
Metrics/LineLength: Line is too long. [84/80]

"Please use `appraisal #{appraisal.name} rake #{ARGV.join(' ')}`."
exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}"
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(" ")}`.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.
Metrics/LineLength: Line is too long. [83/80]

warn "`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " +
"Please use `appraisal #{appraisal.name} rake #{ARGV.join(' ')}`."
exec "bundle exec appraisal #{appraisal.name} rake #{ARGV.join(' ')}"
warn("`rake appraisal:#{appraisal.name}` task is deprecated and will be removed soon. " \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [103/80]

end

# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal.
# This means formatting Hashes as Rockets, until support for Ruby 1.8 is dropped.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [85/80]

end
end

# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [97/80]


if enclosing_object
"{ #{items.join(', ')} }"
"{ #{items.join(", ")} }"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiteralsInInterpolation: Prefer single-quoted strings inside interpolations.

end

# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal.
# Otherwise, a project would not be able to use Appraisal to test compatibility
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [83/80]

Gem::Version.create(Bundler::VERSION) > Gem::Version.create("2.4.22")
end

# Appraisal needs to print Gemfiles in the oldest Ruby syntax that is supported by Appraisal.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [97/80]

@pboling
Copy link
Contributor Author

pboling commented Mar 19, 2025

@nickcharlton ping!

@nickcharlton
Copy link
Member

I haven't looked at this properly yet, because it's stacked on all of the other work. But once we break that out, we can come back to this and get it merged in!

@pboling
Copy link
Contributor Author

pboling commented Mar 26, 2025

Now that I'm starting to use this more heavily, I've discovered major side benefits of eval_gemfile. I call gemfiles invoked by eval_gemfile "modular gemfiles".

  1. Single source of truth (when possible)
  2. Don't need to run appraisal update if the changes are only to a modular gemfile.

You can see how powerful they are here:

As an example I added the gem minitest-retry to my modular gemfile at gemfiles/modular/mini_testing.gemfile, and I didn't need to re-bundle my Appraisals!

Screenshot 2025-03-26 at 13 01 09
Screenshot 2025-03-26 at 12 58 20
Screenshot 2025-03-26 at 12 57 08
Screenshot 2025-03-26 at 12 56 44

CC @nickcharlton

@pboling
Copy link
Contributor Author

pboling commented Jul 11, 2025

It is clear that the community needs these fixes.

PeevRb/dumpcar#49

I am personally implementing this branch across dozens of major projects currently.

Would Thoughtbot consider adding me as a maintainer?

Part of my reluctance in splitting this into small PRs is the long intervals spent waiting for attention from existing maintainers on the two existing PRs I submitted (which grew over time, but started out pretty small).

If the cycle time holds the split PRs may not all get merged for years, and the community will have fully splintered into hard coded dependencies on forks, which will invariably result in resistance to switching back to mainline and getting further upgrades (not least because git dependencies do not show up in many tools that check for out of date dependencies).

This tool is too important to let it die, and it might make more sense to create an appraisal org, and hard fork the gem to appraisal2, so it is untethered from thoughtbot. Status quo is not working well.

@n-rodriguez
Copy link
Contributor

This tool is too important to let it die

I do agree

it might make more sense to create an appraisal org

Why not if it helps adding maintainers to the project. On the other hand it should not be difficult to add maintainers to the current project in thoughtbot org.

hard fork the gem to appraisal2, so it is untethered from thoughtbot.

I don't think this is a good idea. I would prefer transferring appraisal gem to appraisal org rather than doing a hard fork to avoid multiplication of official repos.

@nickcharlton let us know if we can do anything to get this PR merged. thank you!

@pboling
Copy link
Contributor Author

pboling commented Jul 11, 2025

I agree that it could live on under Thoughtbot, but only just. I don't think Thoughtbot has the level of corporate interest in this project to sustain it. If they were aware of the issue and wanted to, something would have been done already.

They've already effectively killed this project twice.

First when it remained incompatible with GHA for years, I had to rip it out of projects I migrated to GHA from other CIs.

Second, after they fixed it to work with GHA, they dropped support for old Rubies, which coupled with the general lack of development, meant my choices were to rip it out again, or fix it.

It isn't clear Thoughtbot wants this project attached to them anymore aside from a historical byline. I think it is likely that the bulk of the company's interest lies outside of Ruby now... which is perfectly valid. They don't have to hold onto it forever.

Perhaps it is time for thoughtbot to move the project to a discrete org. I'll go ahead and create one in case the ball moves in that direction, and I'll sent owner invites to invested parties.

@pboling
Copy link
Contributor Author

pboling commented Jul 11, 2025

Also, thinking more about this, appraisal2, as a gem hard fork, does have a direct path to reunification. If the two converge, appraisal2 can depend on appraisal, and have a post install message to revert the dependency back to the original. This way the upgrade path will be advertized properly by things like bundle outdated when the new version is released directing people back. I think that's actually better than the git chaos which has no tracking, and no central manner of communicating about the tool's status.

So to that end I'll fork this to the new org, and rename it to appraisal2.

  • It will speed up all of my builds
  • save energy, and hence the planet, a little bit
  • In fact, because of the git dependency I have been forced to add and then remove the appraisal gem to each individal appraisal (with remove_gem)... this will simplify things significantly!

🚀

@pboling
Copy link
Contributor Author

pboling commented Jul 11, 2025

For better or worse:
https://github.com/appraisal-rb/appraisal2

@nickcharlton @n-rodriguez @deivid-rodriguez you've all been invited to the org, as the top three contributors to this project who had any involvement in the last several years.

@pboling
Copy link
Contributor Author

pboling commented Jul 11, 2025

I just realized that another mental blocker I had for redoing this PR in small parts is I actually already did a significant additional amount of work on top of it, fixing many other issues.

All of this work is going to be in appraisal2, and it all starts with this PR:

appraisal-rb#1

@pboling pboling closed this by deleting the head repository Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Appraisal doesn't support eval_gemfile

3 participants