Closed deivid-rodriguez closed 3 years ago
Unrelated note: does 15b61ed859296fea73cd5c019e7ed25ee6d93ba2 help rubygem load speed?
The gemspecs rubygems evaluates come either from inside released packages or from the marshalled index (https://rubygems.org/quick/Marshal.4.8/connection_pool-2.2.5.gemspec.rz), and the files
attribute is always pre-filled in those gemspecs. The only case where the "raw" gemspec is evaluated is when using :path
or :git
sources in your Gemfile
.
In that case, not shelling out to git
would be faster although I'm not sure it'd be noticiable. In any case, I believe it's a good move anyways and makes things more portable because it doesn't introduce a dependency on git
. In particular, OS gem packagers usually complain about this and they even created a rubocop plugin to enforce that practice: https://docs.rubocop.org/rubocop-packaging/cops_packaging.html#packaginggemspecgit.
@deivid-rodriguez I see, so the evaluation takes place at packaging time and gem build
optimizes the contents. Thanks, I appreciate the rubygems wisdom!
I see, so the evaluation takes place at packaging time and gem build optimizes the contents.
Exactly!
Thanks, I appreciate the rubygems wisdom!
My pleasure.
As per https://github.com/mperham/connection_pool/pull/153#issuecomment-876534647.