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

separate test run for rubocop >= 0.87 #181

Closed
wants to merge 1 commit into from
Closed

separate test run for rubocop >= 0.87 #181

wants to merge 1 commit into from

Conversation

exterm
Copy link

@exterm exterm commented Aug 4, 2020

This came up as a requirement in #179 (comment)

.travis.yml Outdated
@@ -1,12 +1,14 @@
language: ruby
before_install:
- rm ./Gemfile.lock
- rm ./gemfiles/Gemfile.*.lock
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI step that removes lockfiles is confusing to me. I'm not sure why we even check in a lockfile if we don't use it in CI. @Edouard-chin I believe you introduced this two years ago. Do you still think this is a good idea?

I'd rather have something like dependabot bump our dependencies and always use the same lockfile.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't recall a single other project I contribute to that checks in the lockfiles, which is why I opened #175

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I'll remove the lockfiles in this PR.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think when you're deploying an application, it can make sense to have a lockfile floating around. We're not deploying/publishing a binary here, so it's likely providing little to no value.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few years ago the ruby community shifted to include the Gemfile.lock under VCS. It makes development of a library as well as bisecting much easier. Bundler explained it in more details in a blog https://bundler.io/blog/2018/01/17/making-gem-development-a-little-better.html

The CI step that removes lockfiles is confusing to me.

When CI runs we want to make sure that the library works on the most recent version of the gem. Though now that dependabot is a thing, I'm fine to use the same lockfile

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I'll remove the lockfiles in this PR.

Please put it back. Almost all shopify projects have the Gemfile.lock commited, and the ones that didn't should be updated. When bootrapping a gem nowaday, the Gemfile.lock isn't gitignored

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it make sense to have a Gemfile.lock checked in that is not tested?

🤔

I also really don't want to get caught up in the arguments here... I'm trying to solve a different problem. I think we should leave the discussion about what to do with the lockfile in CI for @marcandre's issue #175.

For this PR, I'll keep the semantics that currently exist on master.

I'll keep Gemfile.lock in place so that it will be used by default on developer's computers, and add my two separate gemfiles for CI - I just wouldn't check in the lockfiles for these CI-specific gemfiles, and instead ignore them.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wouldn't check in the lockfiles for these CI-specific gemfiles, and instead ignore them.

Yes that's the right thing to do

Why does it make sense to have a Gemfile.lock checked in that is not tested?

The bundler blog I shared explains it pretty well, but the TL;DR is that it makes contributing to the project easier

.travis.yml Show resolved Hide resolved
Copy link

@thegedge thegedge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 after resolving the existential crisis of the lockfile

We want to test code paths specific to these new APIs while still also testing the old code paths for compatibility
@exterm
Copy link
Author

exterm commented Aug 4, 2020

Moved dropping support for ruby 2.4 into a separate PR #182

@exterm
Copy link
Author

exterm commented Aug 4, 2020

@marcandre I think you can now cherry-pick this onto your branch. The failing builds are the ones with the newer rubocop, as we would have expected.

@marcandre
Copy link

marcandre commented Aug 4, 2020

Done, but tests are failing. I'll fix this tomorrow... Duh, wrong PR, of course the tests are failing 🤦‍♂️

@exterm
Copy link
Author

exterm commented Aug 5, 2020

it was cherry-picked and will be merged with #179

@exterm exterm closed this Aug 5, 2020
@rafaelfranca rafaelfranca deleted the rubocop-next branch February 18, 2021 08:20
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.

None yet

4 participants