-
Notifications
You must be signed in to change notification settings - Fork 191
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
Documentation about 'test_files' is confusing #90
Comments
I removed them since they're no longer useful or recommended to set. This will be updated with the next release of RubyGems. |
Perl still runs tests by default when installing cpan modules.. for some reason that never took off in the rubygems world. |
- Remove test_files attribute since it's deprecated and no longer used. rubygems/guides#90 (comment) - Use Dir[] instead of git ls-files to specify gem files, in order to improve readability and exclude unnecessary files. - Don't include development files and RSpec tests in the built gem.
`Gem::Specification#test_files=` is no longer recommended. rubygems/guides#90 And it increases gem package size because the option adds test files to the package. So I think we should avoid using `test_files=` option. --- It reduces 4.7MB package size on my local. before ```bash $ du graphiql-rails-1.7.0/ --summarize 6.7M graphiql-rails-1.7.0/ ``` after ```bash $ du graphiql-rails-1.7.0/ --summarize 2.0M graphiql-rails-1.7.0/ ```
test_files is deprecated. It was causing all tests to be shipped in the .gem file, which is useless bloat: rubygems/guides#90
test_files is deprecated. It was causing all tests to be shipped in the .gem file, which is useless bloat: rubygems/guides#90
test_files is deprecated. It was causing all tests to be shipped in the .gem file, which is useless bloat: rubygems/guides#90 kubeclient-4.9.1.gem was 78 848 bytes, now down to 33 792.
test_files is deprecated. It was causing all tests to be shipped in the .gem file, which is useless bloat: rubygems/guides#90 Compressed kubeclient-4.9.1.gem was 78KB, now down to 33KB. Unpacked size 757KB -> 184KB.
test_files is deprecated. It was causing all tests to be shipped in the .gem file, which is useless bloat: rubygems/guides#90 Compressed kubeclient-4.9.1.gem was 78KB, now down to 33KB. Unpacked size 757KB -> 184KB.
Closes #1055 Changes `suspenders.gemspec` to not depend on git. Additionally, we can safely remove `s.test_files` since its use is no longer recommended and was introduced in the Suspenders codebase many years ago. References: rubygems/guides#90
Closes #1055 Changes `suspenders.gemspec` to not depend on git. Additionally, we can safely remove `s.test_files` since its use is no longer recommended and was introduced in the Suspenders codebase many years ago. References: rubygems/guides#90
Can we get confirmation from someone on the rubygems team? The lack of confirmation is confusing whether |
Hi! It sounds like @drbrain planned to deprecate this, but that never took off in the end. So, no, As far as I understand, these days Many people prefer to remove it to make gems smaller and not ship unused files. But I recall also people advocating for using it (mostly OS packagers), because it provides a way to run gem's tests using the gem package exclusively. If you ask my opinion, it's too much trouble to deprecate this kind of thing that has been there for so many years. I think it would bring little benefit. I would rather re-add some documentation explaining what it does today, but 'm happy to discuss other options and opinions. |
Seems that `test_files` attribute has been deprecated. If we can remove it from gemspec file, it would reduce distribute gem package size. Related: * [Documentation about 'test_files' is confusing rubygems/guides#90](rubygems/guides#90) * https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdeprecatedattributeassignment
Seems that `test_files` attribute has been deprecated. If we can remove it from gemspec file, it would reduce distribute gem package size. Related: * [Documentation about 'test_files' is confusing rubygems/guides#90](rubygems/guides#90) * https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdeprecatedattributeassignment
Seems that `test_files` attribute has been deprecated. If we can remove it from gemspec file, it would reduce distribute gem package size. Related: * [Documentation about 'test_files' is confusing rubygems/guides#90](rubygems/guides#90) * https://docs.rubocop.org/rubocop/cops_gemspec.html#gemspecdeprecatedattributeassignment
slim down gem, given test_files is not used (rubygems/guides#90)
`Gem::Specification#test_files=` is no longer recommended. rubygems/guides#90 And it increases gem package size because the option adds test files to the package. So I think we should avoid using `test_files=` option. --- It reduces 4.7MB package size on my local. before ```bash $ du graphiql-rails-1.7.0/ --summarize 6.7M graphiql-rails-1.7.0/ ``` after ```bash $ du graphiql-rails-1.7.0/ --summarize 2.0M graphiql-rails-1.7.0/ ```
Closes thoughtbot/suspenders#1055 Changes `suspenders.gemspec` to not depend on git. Additionally, we can safely remove `s.test_files` since its use is no longer recommended and was introduced in the Suspenders codebase many years ago. References: rubygems/guides#90
per standard rubocop rules, the attribute is deprecated, and unused see: rubygems/guides#90
- No functional purpose since 2014 - See: rubygems/guides#90
@drbrain I'd like to challenge this in one aspect. I often read very old code. Having the test suite distributed by long term archives like RubyForge or RubyGems is useful because the original source often disappeared from the web. |
@schmijos older gems will still contain their |
@schmijos currently |
- No functional purpose since 2014 - See: rubygems/guides#90
According to the section in the guides that talks about
test_files
gemspec attribute,test_files
is a collection of unit test file which will be loaded as unit tests when the user requests a gem to be unit tested. How does the user request a gem to be unit tested ? Looks like--test
option was removed from thegem
command. So how is thistest_files
gemspec attribute useful currently ?The text was updated successfully, but these errors were encountered: