{"record":{"id":"36cadf6cc70eb7df","repo":"pulumi/pulumi","slug":"illegal-semver-returned-by-language-host-s-s-36cadf","errorCode":null,"errorMessage":"illegal semver returned by language host: %s@%s: %w","messagePattern":"illegal semver returned by language host: (.+?)@(.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/go/common/resource/plugin/langruntime_plugin.go","lineNumber":267,"sourceCode":"\t\t\tfor i, plugin := range plugins {\n\t\t\t\tpackages[i] = workspace.PackageDescriptor{\n\t\t\t\t\tPluginDescriptor: plugin,\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn packages, nil, nil\n\t\t}\n\n\t\treturn nil, nil, rpcError\n\t}\n\n\tpackageDescriptors := slice.Prealloc[workspace.PackageDescriptor](len(resp.Packages))\n\tpackageSpecs := slice.Prealloc[workspace.PackageSpec](len(resp.Specs))\n\tfor _, info := range resp.Packages {\n\t\tvar version *semver.Version\n\t\tif v := info.GetVersion(); v != \"\" {\n\t\t\tsv, err := semver.ParseTolerant(v)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"illegal semver returned by language host: %s@%s: %w\", info.GetName(), v, err)\n\t\t\t}\n\t\t\tversion = &sv\n\t\t}\n\t\tif !apitype.IsPluginKind(info.Kind) {\n\t\t\treturn nil, nil, fmt.Errorf(\"unrecognized plugin kind: %s\", info.Kind)\n\t\t}\n\t\tunmarshal := func(p *pulumirpc.PackageParameterization) (*workspace.Parameterization, error) {\n\t\t\tif p == nil {\n\t\t\t\treturn nil, nil\n\t\t\t}\n\t\t\tsv, err := semver.ParseTolerant(p.Version)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\n\t\t\t\t\t\"illegal semver returned by language host: %s@%s: %w\",\n\t\t\t\t\tinfo.GetName(), p.Version, err)\n\t\t\t}\n\t\t\treturn &workspace.Parameterization{\n\t\t\t\tName:    p.Name,","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/go/common/resource/plugin/langruntime_plugin.go#L249-L285","documentation":"After a language host lists the packages/plugins it needs, each package version string is parsed with tolerant semver. If `semver.ParseTolerant` fails, langruntime_plugin.go:267 wraps the error with the plugin name and raw version for diagnosis.","triggerScenarios":"A language plugin's dynamic-provider/package response contains a version like `latest`, `5.x`, an empty-but-set odd string, or a git SHA in the `version` field of `resp.Packages`.","commonSituations":"Custom or third-party language plugins returning non-semver versions; plugin version resolution bugs after lockfile or plugin cache changes; using a development build of a language SDK that emits `0.0.0-dev`-style strings not parseable.","solutions":["Fix the language plugin/SDK to report a valid semver (e.g. 1.2.3) in its package listing.","Upgrade or reinstall the language plugin to a released version with sane versions.","Clear the plugin cache (`pulumi plugin rm --all`) and re-run so plugins re-report correct versions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if _, err := semver.ParseTolerant(pkg.Version); err != nil {\n\tlog.Printf(\"language host reported non-semver version %q for %s\", pkg.Version, pkg.Name)\n}","typeGuard":null,"tryCatchPattern":"pkgs, params, err := getLanguagePackages(ctx, host)\nif err != nil {\n\tif strings.Contains(err.Error(), \"illegal semver\") {\n\t\treturn fmt.Errorf(\"language plugin returned a bad version; reinstall the plugin: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Use released plugin versions, not dev builds, for package listing.","Keep pulumi CLI and language plugins updated together.","Run `pulumi plugin rm --all && pulumi install` to rebuild plugin state."],"tags":["go","semver","language-host","plugins"],"backgroundTag":"invalid-semver","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}