-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gem rbs collection manager #589
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
February 13, 2021 09:43
a2bca7f
to
00dbc86
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
2 times, most recently
from
February 21, 2021 07:59
34ed940
to
c2b433f
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
3 times, most recently
from
March 6, 2021 09:13
b7c6e1b
to
8ebfef2
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
March 13, 2021 15:14
8ebfef2
to
eefdaf0
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
June 9, 2021 16:44
089a958
to
57de1c3
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
June 24, 2021 14:58
57de1c3
to
508210c
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
3 times, most recently
from
June 30, 2021 13:25
bd5b71e
to
0fa655e
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
3 times, most recently
from
July 25, 2021 07:03
0c51b0e
to
1fe8a33
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
2 times, most recently
from
August 9, 2021 04:59
e39e188
to
9ab5c10
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
August 9, 2021 15:59
9cb83fc
to
74c16ed
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
2 times, most recently
from
August 17, 2021 07:33
8e49277
to
56c849f
Compare
It is necessary to right repo_path if the config file is not in the current directory
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
August 20, 2021 12:20
c5f2993
to
4b4129a
Compare
pocke
force-pushed
the
Add_gem_rbs_collection_manager
branch
from
August 23, 2021 13:20
8c44122
to
1190022
Compare
soutaro
reviewed
Aug 31, 2021
@@ -47,6 +47,16 @@ def add(path: nil, library: nil, version: nil) | |||
end | |||
end | |||
|
|||
def add_collection(collection_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This was referenced Sep 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces
rbs collection
subcommand to manage 3rd party RBSs.Usage
See the added document,
collection.md
.Example
I tried introducing
rbs collection
to my repository, rbs_rails. pocke/rbs_rails#187It works well 😄
Next Steps
This PR is the first step, so there are remaining works. I'll do them in other PRs.
Support this feature by TypeProf and Steep
All rbs sub-command supports this feature, for example,
rbs validate
automatically loads RBSs fromrbs_collection.yaml
if the file exists. But TypeProf and Steep don't support it.I'll do it soon 🚀 I guess it is an easy task.
Resolve stdlib dependencies
Currently
rbs collection
command resolves dependencies withGemfile.lock
. So it has a limitation that it can't resolve stdlib dependencies.For example,
pathname
is a default gem, so we don't writeadd_runtime_dependency 'pathname'
in order to use the library in a gem. Then a Gemfile.lock doesn't containpathname
even if the dependency actually depends on pathname library.We need another approach to resolve stdlib dependencies.
We, soutaro, mame, and I, discussed the topic in closed meetings. We are considering introducing a meta file to describe stdlib dependencies for RBS repository, like
manifest.yaml
.For example:
Update individual gems
Currenly
rbs collection update
command only supports updating all gems. But I can easily imagine it is too loose. We'll want to update specific gems like we usually dobundle update rails csv nokogiri
in Bundler.I'll allow
rbs collection update
to take gem names as arguments, likerbs collection update rails csv nokogiri
Without Gemfile.lock mode
Currently
rbs collection
command assumes Gemfile.lock existence. I guess it may need no Gemfile.lock mode for a project without Bundler or Gemfile.lock is not committed.Design document
I wrote a design document at the beginning of this PR. I think there are many differences since the doc. It looks obsolete.
https://pocke.kibe.la/shared/entries/3665a009-e229-4e56-a92b-c0743f7a49fe