{"record":{"id":"339dc6f04a7efe4b","repo":"bazelbuild/bazel","slug":"s-is-deprecated-and-will-be-removed-soon-it-may","errorCode":null,"errorMessage":"%s is deprecated and will be removed soon. It may be temporarily re-enabled by setting --%s=false","messagePattern":"(.+?) is deprecated and will be removed soon\\. It may be temporarily re-enabled by setting --(.+?)=false","errorType":"exception","errorClass":"Undefined","httpStatus":null,"severity":"error","filePath":"src/main/java/net/starlark/java/eval/Module.java","lineNumber":273,"sourceCode":"      }\n    }\n    return m.buildOrThrow();\n  }\n\n  /** Implements the resolver's module interface. */\n  @Override\n  public Resolver.Scope resolve(String name, boolean resolveTypeSyntax) throws Undefined {\n    // global?\n    if (globalIndex.containsKey(name)) {\n      return Resolver.Scope.GLOBAL;\n    }\n\n    // predeclared?\n    Object v = getPredeclared(name);\n    if (v != null) {\n      if (v instanceof GuardedValue) {\n        // Name is correctly spelled, but access is disabled by a flag or by client data.\n        throw new Undefined(((GuardedValue) v).getErrorFromAttemptingAccess(name));\n      }\n      return Resolver.Scope.PREDECLARED;\n    }\n\n    // universal?\n    if (Starlark.UNIVERSE.containsKey(name)) {\n      return Resolver.Scope.UNIVERSAL;\n    }\n    if (resolveTypeSyntax && Starlark.UNIVERSE_EXTRA_TYPE_CONSTRUCTORS.containsKey(name)) {\n      return Resolver.Scope.UNIVERSAL;\n    }\n\n    // undefined\n    Set<String> candidates = new HashSet<>();\n    candidates.addAll(globalIndex.keySet());\n    candidates.addAll(predeclared.keySet());\n    candidates.addAll(Starlark.UNIVERSE.keySet());\n    if (resolveTypeSyntax) {","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/bazelbuild/bazel/blob/e6e199d0601a244511b4cf18c8b2828aa73db1fd/src/main/java/net/starlark/java/eval/Module.java#L255-L291","documentation":"Raised during module resolution when a predeclared name is wrapped in a FlagGuardedValue.onlyWhenIncompatibleFlagIsFalse guard and the corresponding incompatible-change flag is set to true. The symbol is deprecated pending removal; the message names the flag and notes it can be temporarily re-enabled with --<flag>=false.","triggerScenarios":"Referencing a legacy builtin whose definition is guarded behind an --incompatible_* flag that your build already enables, e.g. an old rule symbol or removed global once --incompatible_<change> flips to true.","commonSituations":"Upgrading Bazel (or a rules dependency) where an --incompatible_* flag defaults to true and your .bzl files still reference the legacy API; .bazelrc carrying --incompatible_bzl_disallow_legacy... style flags; migration periods where a repo has half-migrated rules.","solutions":["Migrate the .bjl code off the deprecated symbol (see the Bazel migration guide for that flag).","As a stopgap, set the named flag to false: bazel build --incompatible_<flag>=false //... — but treat it as temporary, the flag will be removed.","Search the repo for all uses of the symbol to size the migration: grep for the name named in the error message.","Run Bazel's migration tooling / buildifier warnings before the next flag flip."],"exampleFix":"# before (fails when --incompatible_<flag>=true)\nctx.old_api()\n\n# after\nctx.new_api()","handlingStrategy":"validation","validationCode":"# temporary: add to invocation until migration completes\n# build --incompatible_<name_of_flag>=false","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat --incompatible_*=false as a stopgap only; the flag (and symbol) will be removed.","grep the repo for the symbol named in the message to size the migration.","Track Bazel release notes / migration tracker for upcoming flag flips."],"tags":["starlark","deprecation","incompatible-flags","migration","bazel"],"backgroundTag":null,"analyzedSha":"e6e199d0601a244511b4cf18c8b2828aa73db1fd","analyzedAt":"2026-08-14T10:24:27.848Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}