-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Lock file implementation #27
Conversation
It looks like this is requiring Crystal HEAD. |
|
||
unless lock_file? | ||
File.open(lock_file_path, "w") { |file| manager.to_lock(file) } | ||
end |
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.
The install command must regenerate the lock file in case any new package was installed.
1c9de2b
to
a100a01
Compare
a100a01
to
00327ac
Compare
Sadly, custom groups are behaving badly with the lock file. Either we have to resolve everything, which means cloning every dependency (whatever group we want to install); or the lock file lists the shards for the selected groups only, which results in a bad lock file (somehow truncated). I think I'll remove the ability to have and select custom groups and keep the development group only, until we can figure out how to properly deal with it. |
Yeah, bundler can only do it since it can fetch the whole graph via rubygems.org's dependency API. |
The lock file now contains a `version:` key (set at 1.0 for now) and dependencies are listed under the `shard:` key, this in order to be more future-proof to changes.
d02a1db
to
738c6f9
Compare
Groups don't play well with the lock file. Trying to install custom groups broke the lock file that no longer contained some shards (eg: development) but would contain some others (eg: custom). Only the development group has been kept, along with the ability to not install this group, which can be useful when deploying an application to build in production. The lock file won't be generated or overwritten when the development group isn't installed, since it would have the same problem than described above. The `--without development` argument may be renamed `--production` in the future, and won't allow to add or remove dependencies. refs #27
Groups don't play well with the lock file. Trying to install custom groups broke the lock file that no longer contained some shards (eg: development) but would contain some others (eg: custom). Only the development group has been kept, along with the ability to not install this group using the `--production` flag, which can be useful when deploying an application to be built in production. The lock file won't be generated or overwritten in this case, and installation will fail if a dependency has been added but isn't in the lock file.
738c6f9
to
3196804
Compare
--production
parameter to skip development dependenciescloses #12 #31