-
Notifications
You must be signed in to change notification settings - Fork 216
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
Refactor collection #1149
Refactor collection #1149
Conversation
I think we don't need to bump the major version. Because edit: I forgot Steep and TypeProf. They refer |
{ | ||
"name" => source.name, | ||
"remote" => source.remote, | ||
"revision" => source.resolved_revision, | ||
"repo_dir" => source.repo_dir | ||
} |
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.
Is this replaceable with Source#to_lockfile
?
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.
Maybe? But, the Source#to_lockfile
includes "type"
while existing lockfiles don't.
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.
Hmm, I think it's not a problem because it's not a breaking change. Including type
is more descriptive, and we can keep it more DRY.
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.
We will have type
attribute. We are planning to add another type
of sources soon. So having git
type here is nice.
# Conflicts: # lib/rbs/collection/config/lockfile_generator.rb # lib/rbs/collection/sources/base.rb # lib/rbs/collection/sources/stdlib.rb # lib/rbs/environment_loader.rb # sig/collection/sources.rbs # test/rbs/collection/sources/stdlib_test.rb
* Use `Lockfile` instead of re-using `Config` class * `Config` is the user edited configuration file — `rbs_collection.yaml` * `Lockfile` is the generated lockfile — `rbs_collection.lock.yaml`
* Reduces `git checkout` operation as much as possible * Stop issuing `git fetch` from `#initialize`
6e29d76
to
7cd6aac
Compare
This is a step toward #1148, it refactor the Ruby code and RBS type definition.
Sources::*
method types, to declare ifversion
is required or not.Collection::Config::Lockfile
is introduced to makerbs_collection.lock.yaml
data structure clear.Sources::Git
is refactored that reducesgit checkout
operation as much as possibleThe
Collection::*
API changes a lot. Not very sure if we need to bump the major version of the gem...