-
Notifications
You must be signed in to change notification settings - Fork 13
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
[5.0.0] many warnings on usage #169
Comments
This is because the gem was renamed but still occupies the same namespace as the old gem. If that's also present, this happens. As I hinted at in #158 (comment) (but could have been more explicit about). |
hi @tuxmaster5000. Thanks for this! I think this is due to clashes with other dependencies in puppet-lint which use the |
@ekohl am I right in saying this^^. I see you're talking about the old gem occupying the same namespace - by this do you mean that currently other dependencies are pulling in the old puppet-lint gem and are competing with the new gem for the If not could you clarify what the issue is? We're currently troubleshooting |
I've seen this before. On Fedora Puppet is packaged without a With this gem it's the same: The only safe thing I can think of is changing the namespace as well as the filenames. It may help to use |
I rolled back to an old spec helper like 5.0.3. I mentioned this issue in the chat and was directed here. I was sarcastically told to not be opportunistic about my gem handling... While I get changes need to be made, I think this has been a never ending struggle with puppet. I don't think that folks realize how this stuff resonates. I have been using puppet for over a decade, and think the ruby, gem handling, and flip-flopping on this topic has definitely alienated a fairly large percentage of the original user base. I personally know several people who switched tooling after the facter debacle. People get fed up, and want real improvements without breakage and handling these exceptions out of the box, even if in the short term, extra code has to be written to handle dualities. So I rolled back as a breakfix, created an internal issue, and now have to track properly getting off this old version to be on a 'modern' code path. If I am busy maintaining code bases for my linter, I am failing at the goals of devops. |
This seems to happen regardless of the existence of old versions. In a clean Ubuntu 20.04 Docker container, installing only ruby/bundler and the gem version of puppetlabs-puppet-lint: Debian Packagesroot@puppet-lint:/# dpkg -l | grep puppet
root@puppet-lint:/# dpkg -l | grep lint
root@puppet-lint:/# dpkg -l | grep ruby
ii libruby2.7:amd64 2.7.0-5ubuntu1.12 amd64 Libraries necessary to run Ruby 2.7
ii rake 13.0.1-4 all ruby make-like utility
ii ruby 1:2.7+1 amd64 Interpreter of object-oriented scripting language Ruby (default version)
ii ruby-bundler 2.1.4-1 all Manage Ruby application dependencies (runtime)
ii ruby-minitest 5.13.0-1 all Ruby test tools supporting TDD, BDD, mocking, and benchmarking
ii ruby-molinillo 0.6.4-1 all generic dependency resolution algorithm
ii ruby-net-http-persistent 2.9.4-2 all Manages persistent connections using Net::HTTP
ii ruby-net-telnet 0.1.1-2 all telnet client library
ii ruby-power-assert 1.1.7-1 all library showing values of variables and method calls in an expression
ii ruby-test-unit 3.3.5-1 all unit testing framework for Ruby
ii ruby-thor 0.19.4-1 all Ruby scripting framework
ii ruby-xmlrpc 0.3.0-2 all XMLRPC library for Ruby
ii ruby2.7 2.7.0-5ubuntu1.12 amd64 Interpreter of object-oriented scripting language Ruby
ii rubygems-integration 1.16 all integration of Debian Ruby packages with Rubygems Gems
The error still occurs: root@puppet-lint:/# puppet-lint --version
/var/lib/gems/2.7.0/gems/puppetlabs-puppet-lint-5.0.0/lib/puppet-lint.rb:255: warning: already initialized constant PuppetLint::CheckSlashComments
/var/lib/gems/2.7.0/gems/puppetlabs-puppet-lint-5.0.0/lib/puppet-lint.rb:255: warning: previous definition of CheckSlashComments was here
/var/lib/gems/2.7.0/gems/puppetlabs-puppet-lint-5.0.0/lib/puppet-lint.rb:255: warning: already initialized constant PuppetLint::CheckStarComments
...
puppet-lint 5.0.0 In fact the errors appear in the Github Actions for this repository: https://github.com/puppetlabs/puppet-lint/actions/runs/6857416201/job/18646463943#step:7:8
|
We see this error too in our CI-Containers. We use onceover-codequality and apparently they released a new version (0.11.0 - see Issue 30: puppet-lint renamed to puppetlabs-puppet-lint ) with fixed dependencies. Our Gemfile looks the following:
When our container is build, I can see that only the puppetlabs-puppet-lint is installed:
Yet we receive the same errors and our CI-Pipelines fail. |
I'm the maintainer of the Arch Linux AUR package. I also get the warnings running v5.0.0. Anything I can do? I'm not a ruby pro. Currently holding back the update. |
Right now I'd ignore version 5. There is work ongoing to research ways to make it less painful for the whole ecosystem |
Hi everyone, |
On usage ton's of warnings are logged:
The text was updated successfully, but these errors were encountered: