{"record":{"id":"8b1d605023e1b394","repo":"puppetlabs/puppet","slug":"the-pcore-version-for-typeset-name-is-not-un","errorCode":null,"errorMessage":"The pcore version for TypeSet '#{@name}' is not understood by this runtime. Expected range #{Pcore::PARSABLE_PCORE_VERSIONS}, got #{@pcore_version}","messagePattern":"The pcore version for TypeSet '#(.+?)' is not understood by this runtime\\. Expected range #(.+?), got #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/types/p_type_set_type.rb","lineNumber":118,"sourceCode":"    else\n      # Creation using \"type XXX = TypeSet[{}]\". This means that the name is given\n      @name = TypeAsserter.assert_instance_of('TypeSet name', Pcore::TYPE_QUALIFIED_REFERENCE, name_or_init_hash)\n      @name_authority = TypeAsserter.assert_instance_of('TypeSet name_authority', Pcore::TYPE_URI, name_authority, true)\n      @init_hash_expression = init_hash_expression\n    end\n  end\n\n  # @api private\n  def _pcore_init_from_hash(init_hash)\n    TypeAsserter.assert_instance_of('TypeSet initializer', TYPE_TYPESET_I12N, init_hash)\n\n    # Name given to the loader have higher precedence than a name declared in the type\n    @name ||= init_hash[KEY_NAME].freeze\n    @name_authority ||= init_hash[KEY_NAME_AUTHORITY].freeze\n\n    @pcore_version = PSemVerType.convert(init_hash[Pcore::KEY_PCORE_VERSION]).freeze\n    unless Pcore::PARSABLE_PCORE_VERSIONS.include?(@pcore_version)\n      raise ArgumentError,\n            \"The pcore version for TypeSet '#{@name}' is not understood by this runtime. Expected range #{Pcore::PARSABLE_PCORE_VERSIONS}, got #{@pcore_version}\"\n    end\n\n    @pcore_uri = init_hash[Pcore::KEY_PCORE_URI].freeze\n    @version = PSemVerType.convert(init_hash[KEY_VERSION])\n    @types = init_hash[KEY_TYPES] || EMPTY_HASH\n    @types.freeze\n\n    # Map downcase names to their camel-cased equivalent\n    @dc_to_cc_map = {}\n    @types.keys.each { |key| @dc_to_cc_map[key.downcase] = key }\n\n    refs = init_hash[KEY_REFERENCES]\n    if refs.nil?\n      @references = EMPTY_HASH\n    else\n      ref_map = {}\n      root_map = Hash.new { |h, k| h[k] = {} }","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/types/p_type_set_type.rb#L100-L136","documentation":"A TypeSet's serialized definition carries a pcore_version stating which Pcore schema dialect it was written for. On load, _pcore_init_from_hash parses it and checks membership in Pcore::PARSABLE_PCORE_VERSIONS (parsed from '1.x' in lib/puppet/pops/pcore.rb:21); anything outside the runtime's supported range raises ArgumentError naming the TypeSet, the expected range, and the version found.","triggerScenarios":"Loading a TypeSet whose pcore_version is e.g. '2.0.0' (written by a newer runtime) or '0.9.0' (pre-release dialect) on a Puppet runtime whose Pcore only understands 1.x. Happens when typesets are copied between installations, exported by puppet-strings bolt/pcore tooling of a different version, or hand-written with a wrong version string.","commonSituations":"Version skew: a module or typeset generated on a newer Puppet master is deployed to older agents; hand-authored .pp type files with an explicit pcore_version; upgrading Puppet and forgetting that exported typesets pin their schema version.","solutions":["Run the typeset on a runtime that supports its pcore_version: upgrade Puppet on the loading node","Or regenerate the typeset with the target runtime so it emits a supported pcore_version","For hand-written typesets, set pcore_version to a value inside the supported range (e.g. '1.0.0') and adjust any schema features that are not 1.x"],"exampleFix":"# before (typeset JSON/pcore data)\n{\n  \"name\": \"MyApp\",\n  \"pcore_version\": \"2.0.0\",\n  \"types\": { ... }\n}\n\n# after\n{\n  \"name\": \"MyApp\",\n  \"pcore_version\": \"1.0.0\",\n  \"types\": { ... }\n}","handlingStrategy":"validation","validationCode":"# before loading a typeset, check its pcore_version against the runtime's range\nsupported = Puppet::Pops::Pcore::PARSABLE_PCORE_VERSIONS\nversion = SemanticPuppet::Version.parse(typeset['pcore_version'] || '1.0.0')\nraise \"typeset #{typeset['name']} requires pcore #{version}, runtime supports #{supported}\" unless supported.include?(version)","typeGuard":"def parsable_pcore_version?(typeset)\n  Puppet::Pops::Pcore::PARSABLE_PCORE_VERSIONS.include?(\n    SemanticPuppet::Version.parse(typeset['pcore_version'] || '1.0.0')\n  )\nend","tryCatchPattern":"begin\n  type_set.resolve(loader)\nrescue ArgumentError => e\n  raise unless e.message =~ /pcore version for TypeSet/\n  raise \"version skew: regenerate the typeset or upgrade Puppet. #{e.message}\"\nend","preventionTips":["Pin the Puppet version across build and deploy so exported typesets match the runtime","Regenerate typesets with the target runtime rather than hand-editing version fields","On upgrade, re-export all shipped typesets and diff their pcore_version"],"tags":["puppet","pcore","typeset","version-mismatch","compatibility"],"backgroundTag":"unsupported-schema-version","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}