Closed schneems closed 1 week ago
Here's a diff of what bundler does to the gemspec: https://gist.github.com/schneems/74016ca172baea81efe88d85f4cb42c5
If you try to stash this change then Bundler::Source::Git
will error because it assumes that all gemspecs have this "stub" line. Here's a backtrace: https://gist.github.com/schneems/d169d045731ac15cb0988985a659f5fc
You can work around this in the short term by putting this in your Gemfile:
class Bundler::Source::Git
def load_gemspec(file)
super
end
end
This works because this class inherits from Bundler::Source::Path
. I spoke with bundler core and
Bundler re-writes gem spec when installing a git gem:
https://twitter.com/schneems/status/1304138043419287552
Derailed benchmarks uses git to switch between commits to benchmark code changes in a library. This was originally written to benchmark changes in Rails, but it can be used for any library.
This feature fails when using a combination of:
To recreate this failure mode I've made an intentional commit on a branch in the wicked gem:
https://github.com/zombocom/wicked/commit/10e5dd18bf8a7792b57ace0fdd27b363951b364f
What happens when the
perf:library
command executes is derailed willcd
into the wicked directory and checkout a this commit, but this happens on top of an already modified gem spec (due to bundler).The first checkout succeeds (because it is already HEAD)
But the second checkout fails:
Here's the full test failure.