puppetlabs/puppet · error · ArgumentError

No 'name_authority' is declared in TypeSet '#

Error message

No 'name_authority' is declared in TypeSet '#{name}' and it cannot be inferred

What it means

resolve_name_authority found no name_authority on the TypeSet itself, in its init hash, or from a TypeSetLoader, so the TypeSet's types cannot be placed in a namespaced registry.

Solutions

  1. Add a 'name_authority' key to the TypeSet declaration hash
  2. Load the TypeSet through a TypeSetLoader that carries a name_authority
  3. Set name_authority explicitly when constructing the PTypeSetType
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/puppet/pops/types/p_type_set_type.rb:387 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/e19564e23f8e1c37. Report an issue: GitHub.

Appendix: source

Thrown at lib/puppet/pops/types/p_type_set_type.rb:387

        })

  protected

  # @api_private
  def _assignable?(o, guard)
    instance_of?(o.class) && (self == DEFAULT || eql?(o))
  end

  private

  def resolve_name_authority(init_hash, loader)
    name_auth = @name_authority
    if name_auth.nil?
      name_auth = init_hash[KEY_NAME_AUTHORITY]
      name_auth = loader.name_authority if name_auth.nil? && loader.is_a?(TypeSetLoader)
      if name_auth.nil?
        name = @name || init_hash[KEY_NAME]
        raise ArgumentError, "No 'name_authority' is declared in TypeSet '#{name}' and it cannot be inferred"
      end
    end
    name_auth
  end
end
end
end

View on GitHub (pinned to e227c27540)