Commit fa46739
committed
Raise an error when building a gem that has a self reference:
- ### Problem
A gem that has a self-reference in its dependencies would previously
get a warning during `gem build`, saying it's "discouradged".
A gem that includes a self-reference can't be updated due to bundler
filtering it out.
https://github.com/ruby/rubygems/blob/6fd37f4afeb3943cf508d1394fcf4338a1266f2e/bundler/lib/bundler/resolver.rb#L405-L410
I think we should be more strict and prevent the gem from building.
### Solution
Raise an explicit error.
This codepath is only hit when running `gem build`, so this change
won't affect existing consumers of those gems (it was previously
possible to install those gems, but not update them, see
#9346 for more context).1 parent 643174d commit fa46739
2 files changed
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
| 201 | + | |
| 202 | + | |
204 | 203 | | |
205 | 204 | | |
206 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2812 | 2812 | | |
2813 | 2813 | | |
2814 | 2814 | | |
2815 | | - | |
| 2815 | + | |
2816 | 2816 | | |
2817 | 2817 | | |
2818 | 2818 | | |
2819 | | - | |
2820 | | - | |
2821 | | - | |
2822 | | - | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
2823 | 2822 | | |
2824 | 2823 | | |
2825 | 2824 | | |
| |||
0 commit comments