Skip to content

Conversation

@schneems
Copy link
Collaborator

When vendoring a default gem in the Ruby repository it uses a different path structure:

$ tool/sync_default_gems.rb dead_end
Sync zombocom/dead_end 

This causes an error in the gemspec when trying to require a relative file. To overcome this error, other default gems will try to require the expected location and then fallback to a different path such as https://github.com/ruby/error_highlight/blob/f88b6fab2ff34559a0f08d019d574dbb52426a20/error_highlight.gemspec#L4-L8

When vendoring a default gem in the Ruby repository it uses a different path structure:

```
$ tool/sync_default_gems.rb dead_end
Sync zombocom/dead_end 
```

This causes an error in the gemspec when trying to require a relative file. To overcome this error, other default gems will try to require the expected location and then fallback to a different path such as https://github.com/ruby/error_highlight/blob/f88b6fab2ff34559a0f08d019d574dbb52426a20/error_highlight.gemspec#L4-L8
@AlexWayfer
Copy link

When vendoring a default gem in the Ruby repository it uses a different path structure

Please, describe me, what this process is. I see no tool/ directory in this repo. What is… "vendoring a default gem in the Ruby repository"? What is "vendoring" (almost know, but processes can be different), what is "a default gem" (default for what?), what is "the Ruby repository" (do you mean github.com/ruby/ruby or rubygems.org or something else?).

This causes an error in the gemspec when trying to require a relative file. To overcome this error, other default gems will try to require the expected location and then fallback to a different path such as

Does it mean that… *.gemspec file in the same location as lib/'s directory content is? If so — this is weird, but can be understandable, but I'd like to see an example, I mean the whole procedure after the answers to the questions above.

@schneems
Copy link
Collaborator Author

Here's the PR to ruby/ruby ruby/ruby#5859. Ruby has the concept of a "default gem" such as the "did you mean" gem that is required by default. I want to make dead_end a default gem so this change is needed. That path tool/sync_default_gems.rb exists in the ruby/ruby repository. If dead_end is included in Ruby 3.2 then I will update the Readme with instructions on how to update the default gem.

@schneems schneems merged commit 99ab893 into main Apr 28, 2022
@schneems schneems deleted the schneems/vendor-default-gem branch April 28, 2022 20:16
@AlexWayfer
Copy link

If dead_end is included in Ruby 3.2

Wow wow wow, my apologizes, the business is serious. Do what you know to do, thank you anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants