Package Details: ruby-rubocop 1.25.0-1

Git Clone URL: https://aur.archlinux.org/ruby-rubocop.git (read-only, click to copy)
Package Base: ruby-rubocop
Description: A Ruby static code analyzer and formatter
Upstream URL: https://rubocop.org
Licenses: MIT
Submitter: jtgoguen
Maintainer: supermario
Last Packager: supermario
Votes: 10
Popularity: 0.000523
First Submitted: 2016-10-03 16:22
Last Updated: 2022-01-18 16:04

Latest Comments

1 2 Next › Last »

supermario commented on 2021-12-31 15:32

@mnussbaum I'm also a fellow ansible-lover and use it for all of my machine setups and also my dotfiles, so I definitely understand what you're trying to achieve.

Are you using the ansible-aur[1] module to install packages from the AUR? If so, I think that you could do something like this (though I haven't tested it):

- name: install rubocop
  aur:
    name: ruby-rubocop
    use: makepkg # or your preferred helper
    extra_args: --nocheck

If that doesn't work, I was actually taking a look through the ansible-aur source and I might be able to add support for a first class nocheck option (just like they have the pgp skip option).

As for an alternative package, I'm not sure if publishing rubocop as-is just without the check function and dependencies is allowed, as I think it would be seen as a duplicate. I'm not sure if this is allowed either, but because this package builds rubocop from source, I wonder if you could create a ruby-rubocop-bin package that installs the upstream-released gem file directly (similar to other ruby-* packages on the AUR).

Cheers (and happy new year!) Mario

1: https://github.com/kewlfft/ansible-aur

mnussbaum commented on 2021-12-22 23:55

@supermario, thank you for the references, it's helpful to see the context here.

To further explain my issue, I automate my machine configuration using Ansible. I regularly build VMs and install all my packages from scratch. To facilitate this, I need my packages to install without manual intervention or with special commands. This was a very straight forward process when ruby-rubocop lacked circular dependencies and regularly passed its tests without needing a clean chroot setup, I was able to use the same tooling to install it as every other AUR package I use.

Now ruby-rubocop needs significantly more special handling then any other package I use. I have to choose between investing significant time in automating a rather complex installation process that results in a large number of packages being installed that I don't actually require, or not using this package anymore.

Perhaps I should create an alternative light-weight rubocop AUR package that avoid the check dependencies as a compromise? I'd really like to find some way to have a low-dependency, automatable rubocop installation. Very open to suggestions

supermario commented on 2021-12-21 02:21

@mnussbaum this topic has come up a couple of times and whenever TUs have chimed in they always seem to side with enabling/running the tests[1][2][3][4] and I tend to agree with them. I know that the rubocop test suite does take a while to run and that there are circular dependencies which are annoying, but I do think that they provide value. If the tests are failing on your system I would encourage you to build rubocop in a clean chroot which has always worked for me.

If you do want to skip running the tests you have a few options: 1. Edit the PKGBUILD to not include them 2. Run makepkg with --nocheck to skip running them 3. If you're willing to trust me I maintain my own third-party repository that includes rubocop which you are more than welcome to use[5]

I hope one or more of these options will work for your use-case. If it doesn't let me know, but I'm going to lean very heavily towards keeping the tests around as they are useful to those who want them, and for those that don't it's possible not to run them.

Cheers, Mario

1: https://lists.archlinux.org/pipermail/aur-general/2021-August/036530.html 2: https://lists.archlinux.org/pipermail/aur-general/2021-December/036713.html 3: https://lists.archlinux.org/pipermail/aur-general/2021-December/036714.html 4: https://lists.archlinux.org/pipermail/aur-general/2021-December/036715.html 5: https://wiki.archlinux.org/title/Unofficial_user_repositories#supermario

mnussbaum commented on 2021-12-17 19:33

This is a subjective comment, but I'd like to raise it to start a discussion. The check dependencies are significantly complicating the installation of rubocop, and I'm not sure if the cost is commensurate with the benefit they provide. Right now, just to install rubocop I need to install the entire Rails ecosystem of AUR packages. After all of those packages install, the specs that run as part of the check process regularly fail on my system, even though rubocop itself runs perfectly fine.

This rubocop package has become a bit too heavy weight for me to continue to use. @supermario, what do you think about removing the spec running check stage and check dependencies to avoid circular dependencies and significantly decrease the number of dependencies over all?

supermario commented on 2021-08-31 21:06

@SpicyCat it's the same situation from ruby-ruby-progressbar. You can build this with --nocheck and then use it to build the other packages with check() and then rebuild (or ignore) this package. Updates will be smooth once you get through the initial bootstrap. Cheers!

SpicyCat commented on 2021-08-31 03:53

Correct me if I am wrong, but I think there are some circular dependencies.

For example, ruby-rubocop-performance, ruby-rubocop-rails, ruby-rubocop-rake, and ruby-rubocop-rspec are check dependencies of this package, but those 4 packages also require this package.

Could you check it? @supermario

misaflo commented on 2021-01-17 15:14

Yes, thanks!

supermario commented on 2021-01-17 14:58

@Carif I pushed some updates to ruby-regexp_parser and ruby-parser that should fix the issue

misaflo commented on 2021-01-17 09:12

Since last update I have this error:

/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- regexp_parser/scanner (LoadError)

Thanks for maintening this package.

mnussbaum commented on 2020-05-25 07:38

If the author can update the package to the latest rubocop version it will handle the newer version of unicode-display_width packaged in the AUR