Skip to content
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

Locking down shards #806

Closed
jwoertink opened this issue Jun 14, 2019 · 2 comments
Closed

Locking down shards #806

jwoertink opened this issue Jun 14, 2019 · 2 comments

Comments

@jwoertink
Copy link
Member

jwoertink commented Jun 14, 2019

When working on a Lucky project, you may have your own custom shards and need to run shards update somewhat often. Since shards doesn't give us the ability to update a very specific shard, we run the risk of updating any other shards not locked in place.

For the most part, this isn't much of an issue; however, we did run in to this when Crystal 0.29.0 was released. Lucky has a dev dependency ameba. When running shards build (which may happen from running a task), the dev dependency is called. more info. In this case, the latest ameba was installed which only supported Crystal 0.29.0, but people running Lucky 0.14 on Crystal 0.28.0 now had a borked app.

One thing I do even in other languages is to lock working 3rd party libraries to a very specific version. ~> 0.10.0 says it's ok to use 0.10.X where X could be any version number. This does not guarantee us that the shard maintainer won't introduce breaking changes from 0.10.1 to 0.10.2.

I propose that any shard (dev dependency or not) that is not within the Lucky org be locked to very specific working versions. This can be a little more restrictive, but ensures that when running shards update in your project, you won't accidentally update something you're not ready for. So if we know that everything works with Ameba 0.10.0, then we define it as

development_dependencies:
  ameba:
    github: veelenga/ameba
    version: 0.10.0

If there was any new features we needed, or security updates in those shards, we can create a new PR to test that nothing breaks for us by updating to that new version.

These are the shards I found that could use a locked version.

@paulcsmith
Copy link
Member

paulcsmith commented Jun 14, 2019 via email

@jwoertink
Copy link
Member Author

closed by all those PRs

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

No branches or pull requests

2 participants