Cleanup gem setup#20
Conversation
710fc89 to
ffdd793
Compare
|
Nice, still I don't get why |
Sure. The gist is, it then locked me into the exact same versions of all transient dependencies as whoever last updated the Also, by removing it, it's giving us arguably better coverage as we're running (in local dev) and testing (on CI) against whatever versions are on the machines, so long as they match the constraints in the Overall this is pretty typical in libraries as you don't really know exactly which versions of which dependencies someone using the library will need/have. But in an "app" (i.e., a Rails app, etc…), you'd 💯 want the Does that make sense? |
|
@stevenharman but Same with the ruby version, plus for development you should actually use the lowest supported ruby version, so in the case of this particular gem it would be So, I would say:
And I would say we are ready to roll :) |
|
@driv3r Fair enough. It turns out that including the I've pushed up those changes. |
cab9fd4 to
b173d98
Compare
unsign3d
left a comment
There was a problem hiding this comment.
If it's ok for you, I would ask you to create a different PR for the bin files, so that I can approve this PR, and discuss internally about the bin stuff :)
| - name: Run rubocop | ||
| run: | | ||
| bundle exec rubocop --display-cop-names | ||
| bin/rubocop --display-cop-names |
There was a problem hiding this comment.
I'm not really sure about this change, I think internally we always use bundle exec 🤔
Any reason why wasn't it working for you?
There was a problem hiding this comment.
The both end up running in the context of Bundler. Partially, binstubs are a habit/ergonomics that I've grown accustomed to. Specifically, there's a normalization of "the tools I need to run for development are in bin/*". The bin/setup and bin/console already live there, for example. And now so do the other tools you'll need day-to-day, like bin/rspec or bin/rake.
But in terms of DX, the existence of various binstubs allows some tooling (think, Vim plugins, VSCode extensions, etc…) to make decisions about how to invoke tooling. For example, a bin/rubocop existing let's Vim's ALE plugin know that it should use Rubocop (and the right version of it by way of the binstub) rather than Standard.rb as the linter/fixer.
You can still use bundle exec even with a binstub existing. But the existence of a binstub both signals "this is tooling expected to be here, and be used by, this code base," and it enables certain developer tooling to work without additional configuration.
All of that said, I can pull this out to a separate PR if you wish. Thoughts?
There was a problem hiding this comment.
@unsign3d I went ahead and rebased the binstubs changes out. I'd still like to at least get them added, even if we continue to use bundle exec in the GitHub Action - just so local tooling works out of the box. But we can talk about that in another PR, as you've suggested.
There was a problem hiding this comment.
@stevenharman yeah, thank you, I feel that it would be easier to discuss in a different PR, I don't have strong feelings about either, but I want to try to push things as fast as I can.
I will in the meantime try to educate myself more on the topic :)
There was a problem hiding this comment.
Sounds good. Once this PR is merged I'll start opening smaller ones for these other changes; they just all depend on this one, so they look larger than they really are. 😄
|
Btw, thank you for contributing :) |
We don't really want to lock folks working on this gem into exact versions of the various dependencies. Especially for certain dependencies with native extensions, which might not install on different platforms. This also organizes the .gitignore.
We can keep the size of the packaged Gem smaller by no including specs, binstubs, git/github config, and other development-time-only files.
b173d98 to
7da4011
Compare
7da4011 to
4b5ccc4
Compare
|
@stevenharman, it seems that the new version of rubocop is complaining, I think you can directly run a Also would you mind bumping up the version? (you can follow the guide in the Readme) I guess after that I can merge it :) |
|
@unsign3d I've appeased the cop 👮♂️ and pushed up those changes. 😄 As for bumping the version, we could, or… I was thinking we'd wait until there's actually a behavior change. This PR is really just dev and packaging changes. For example, after #21 I could see changing the version. And I actually have another, smaller, change for the socket telemetry when running on platforms that don't support the technique we're using. So, maybe we merge this as-is, and wait to bump the version until there's a behavior change? |
|
@stevenharman I just saw that this behaves slightly different than our internal stuff and we are more flexible with the versioning :) |
I'm curious - how so? |
|
So… I don't think the ubuntu 18.04 Actions are ever going to work. They've been removed. |
Even though Ruby 2.6 (and 2.7) are EoL'd, they are still supported by this Gem. So let's use that oldest one locally too. Also, it appears it is now recommended to include the Gemfile.lock in Git for Gems. The guidance from Bundler use to be _NOT_ to include the .lock file. But, time moves forward and things change. I'll adapt and learn too! 😅 https://bundler.io/guides/faq.html#using-gemfiles-inside-gems
0b16729 to
f94954d
Compare
👋 Hello! Thanks for this great Puma plugin. We're integrating it into our setup and I'm working on a new
LogTargetandL2metFormatter, which I am hoping to add upstream. But first I had to get the dev setup working on my machine, which is where the.gitignore-ing ofGemfile.lockcame from. I also cleaned up a couple of other small housekeeping items.I'm packing these into a first PR, and will base my actual changes atop this branch.
Thanks again!