Skip to content

Conversation

@ksss
Copy link
Collaborator

@ksss ksss commented Nov 20, 2024

ref: ruby/mutex_m#20

mutex_m v0.3.0 has been released. (link)
However, even if this gem is installed, there are limited situations where the signature can be used.

This fix allows gem signatures to be used in the above two situations as long as the gem is installed.

Before

  • Write mutex_m in rbs_collection.yaml
    • ❌ Always stdlib is selected.
  • Find mutex_m in manifest.yaml
    • ❌ Always stdlib is selected.
  • Find mutex_m in Gemfile.lock
    • ✅ Rubygems is selected.

After

  • Write mutex_m in rbs_collection.yaml
    • ✅ Rubygems is selected if gem was installed.
    • ✅ Stdlib is selected if gem was not installed.
  • Find mutex_m in manifest.yaml
    • ✅ Rubygems is selected if gem was installed.
    • ✅ Stdlib is selected if gem was not installed.
  • Find mutex_m in Gemfile.lock
    • ✅ Rubygems is selected.

⚠️ Assume that source is not specified in rbs_collection.yaml.

@ksss ksss force-pushed the collection-stdlib branch from 63cab0a to fd42ef7 Compare November 21, 2024 06:28
@soutaro
Copy link
Member

soutaro commented Nov 28, 2024

@ksss It looks like this change allows writing gem dependencies in manifest.yaml. (Is it?) I think we are not willing to allow it right now.

@ksss
Copy link
Collaborator Author

ksss commented Nov 29, 2024

Sorry, I did not intend to be able to specify third party gems.
Only stdlib or alumni gems can be specified.

@ksss
Copy link
Collaborator Author

ksss commented Dec 3, 2024

I found the following current behavior.
If a third party gem is listed in manifest.yaml of rubygems, it can be loaded.

source.dependencies_of(library, version)&.each do |dep|
add(library: dep['name'], version: nil)
end

@soutaro soutaro mentioned this pull request Dec 4, 2024
@soutaro
Copy link
Member

soutaro commented Dec 4, 2024

The feature is implemented in #2115.

@soutaro soutaro closed this Dec 4, 2024
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.

2 participants