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

Fix problem with "Attempt to redefine entity" when using type aliases as class parameter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-04-05
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      An error with "Attempt to redefine entity" could occur in some cases when a type alias was resolved. This occurred if a module's init.pp would also reference and resolve the same type and if that init.pp needed to be loaded to resolve the type in the first place. This problem is now fixed.
      Show
      An error with "Attempt to redefine entity" could occur in some cases when a type alias was resolved. This occurred if a module's init.pp would also reference and resolve the same type and if that init.pp needed to be loaded to resolve the type in the first place. This problem is now fixed.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      If a function parameter declaration or return type, references a type that has not yet been loaded, and that type is prefixed with the name of a module that has not yet been loaded, then the loaders will first make an attempt to load the files in the modules manifests directory. If such a file, in turn, also references the same type, then that triggers a recursive load. When the recursive call returns, the loader will still try to add the type, which results in an "Attempt to redefine entity" error.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            thomas.hallgren Thomas Hallgren
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support