puppetlabs/puppet · error · ArgumentError
# resolves to an incompatible version. Expected # , got #
Error message
#{self} resolves to an incompatible version. Expected #{@version_range}, got #{type_set.version} What it means
The referenced TypeSet loaded, but its declared version falls outside the version_range expected by the reference, so its contents may not match what the referencing set was built against.
Solutions
- Widen the reference's version_range to include the loaded version
- Pin the dependency to a version of the TypeSet matching the expected range
- Upgrade the referencing TypeSet to the new version of the dependency
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/puppet/pops/types/type_set_reference.rb:51 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/9bb92045ab1eef81.
Report an issue: GitHub.
Appendix: source
Thrown at lib/puppet/pops/types/type_set_reference.rb:51
def _pcore_init_hash
result = super
result[KEY_NAME_AUTHORITY] = @name_authority unless @name_authority == @owner.name_authority
result[KEY_NAME] = @name
result[KEY_VERSION_RANGE] = @version_range.to_s
result
end
def resolve(loader)
typed_name = Loader::TypedName.new(:type, @name, @name_authority)
loaded_entry = loader.load_typed(typed_name)
type_set = loaded_entry.nil? ? nil : loaded_entry.value
raise ArgumentError, "#{self} cannot be resolved" if type_set.nil?
raise ArgumentError, "#{self} resolves to a #{type_set.name}" unless type_set.is_a?(PTypeSetType)
@type_set = type_set.resolve(loader)
unless @version_range.include?(@type_set.version)
raise ArgumentError, "#{self} resolves to an incompatible version. Expected #{@version_range}, got #{type_set.version}"
end
nil
end
def to_s
"#{@owner.label} reference to TypeSet named '#{@name}'"
end
end
end
end
View on GitHub (pinned to e227c27540)