Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9789

Constants assigned twice emit warning during Litmus use on Windows.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Incomplete
    • None
    • None
    • Windows
    • Hide

      The assignment of those constants should be guarded to avoid warnings when loading the module twice.

      Show
      The assignment of those constants should be guarded to avoid warnings when loading the module twice.
    • Needs Assessment
    • Needs Assessment

    Description

      When running acceptance tests via Litmus, the Puppet::Util::Windows::APITypes::FFI module from lib/puppet/util/windows/api_types.rb is loaded via the puppet gem.

      Unfortunately this module always gets loaded twice and a warning is returned to the commandline:

      C:/src/puppetlabs-java_ks/.bundle/gems/ruby/2.5.0/gems/puppet-6.4.2-x64-mingw32/lib/puppet/util/windows/api_types.rb:6: warning: already initialized constant FFI::WIN32_FALSE
      C:/src/puppetlabs-java_ks/.bundle/gems/ruby/2.5.0/gems/pdk-1.10.0/lib/pdk/util/windows/api_types.rb:6: warning: previous definition of WIN32_FALSE was here
      C:/src/puppetlabs-java_ks/.bundle/gems/ruby/2.5.0/gems/puppet-6.4.2-x64-mingw32/lib/puppet/util/windows/api_types.rb:9: warning: already initialized constant FFI::ERROR_SUCCESS
      C:/src/puppetlabs-java_ks/.bundle/gems/ruby/2.5.0/gems/pdk-1.10.0/lib/pdk/util/windows/api_types.rb:9: warning: previous definition of ERROR_SUCCESS was here
      

      Attachments

        Activity

          People

            william.hurt William Hurt
            william.hurt William Hurt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support