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

Constants assigned twice emit warning during Litmus use on Windows.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
    • Template:
      PUP Bug Template
    • Agent OS:
      Windows 10 (x86, x64)
    • Acceptance Criteria:
      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.
    • Method Found:
      Needs Assessment
    • QA Risk 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

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support