<commit_before>---
layout: documentation
title: Backward Compatibility
---

# Backward Compatibility

Bazel is still in Beta and new releases may include backward incompatible
changes. As we make changes and polish the extension mechanism, old features
may be removed and new features that are not backward compatible may be added.

Backward incompatible changes are introduced gradually:

1.  The backward incompatible change is introduced behind a flag with its
    default value set to `false`.
2.  In a later release, the flag's default value will be set to `true`. You
    can still use the flag to disable the change.
3.  Then in a later release, the flag will be removed and you will no longer be
    able to disable the change.

To check if your code will be compatible with future releases you can:

*   Build your code with the flag `--all_incompatible_changes`. This flag
    enables all backward incompatible changes, and so you can ensure your code
    is compatible with upcoming changes.
*   Use boolean flags to enable/disable specific backward incompatible changes.

## Current backward incompatible changes

The following are the backward incompatible changes that are implemented and
guarded behind flags in the current release:

General Starlark

*   [Dictionary concatenation](#dictionary-concatenation)
*   [Load must appear at top of file](#load-must-appear-at-top-of-file)
*   [Depset is no longer iterable](#depset-is-no-longer-iterable)
*   [Depset union](#depset-union)
*   [String is no longer iterable](#string-is-no-longer-iterable)
*   [Integer division operator is //](#integer-division-operator-is)
*   [Package name is a function](#package-name-is-a-function)
*   [FileType is deprecated](#filetype-is-deprecated)
*   [Static Name Resolution](#static-name-resolution)
*   [Load label cannot cross package boundaries](#load-label-cannot-cross-package-boundaries)

Starlark Rules

*   [New actions API](#new-actions-api)
*   [New args API](#new-args-api)
*   [Disable output group field on Target](#disable-output-group-field-on-target)
*   [Disable default parameter of output attributes](#disable-default-parameter-of-output-attributes)
*   [Disallow tools in action inputs](#disallow-tools-in-action-inputs)
*   [Expand directories in Args](#expand-directories-in-args)
*   [Disable late bound option defaults](#disable-late-bound-option-defaults)
*   [Disallow `cfg = "data"`](#disallow-cfg--data)

Objc

*   [Disable objc provider resources](#disable-objc-provider-resources)

External repositories

*   [Remove native git repository](#remove-native-git-repository)
*   [Remove native http archive](#remove-native-http-archive)

Java

*   [New-style JavaInfo constructor](#new-style-java_info)<commit_msg>Fix (?) "Disallow cfg = "data"" link<commit_after>---
layout: documentation
title: Backward Compatibility
---

# Backward Compatibility

Bazel is still in Beta and new releases may include backward incompatible
changes. As we make changes and polish the extension mechanism, old features
may be removed and new features that are not backward compatible may be added.

Backward incompatible changes are introduced gradually:

1.  The backward incompatible change is introduced behind a flag with its
    default value set to `false`.
2.  In a later release, the flag's default value will be set to `true`. You
    can still use the flag to disable the change.
3.  Then in a later release, the flag will be removed and you will no longer be
    able to disable the change.

To check if your code will be compatible with future releases you can:

*   Build your code with the flag `--all_incompatible_changes`. This flag
    enables all backward incompatible changes, and so you can ensure your code
    is compatible with upcoming changes.
*   Use boolean flags to enable/disable specific backward incompatible changes.

## Current backward incompatible changes

The following are the backward incompatible changes that are implemented and
guarded behind flags in the current release:

General Starlark

*   [Dictionary concatenation](#dictionary-concatenation)
*   [Load must appear at top of file](#load-must-appear-at-top-of-file)
*   [Depset is no longer iterable](#depset-is-no-longer-iterable)
*   [Depset union](#depset-union)
*   [String is no longer iterable](#string-is-no-longer-iterable)
*   [Integer division operator is //](#integer-division-operator-is)
*   [Package name is a function](#package-name-is-a-function)
*   [FileType is deprecated](#filetype-is-deprecated)
*   [Static Name Resolution](#static-name-resolution)
*   [Load label cannot cross package boundaries](#load-label-cannot-cross-package-boundaries)

Starlark Rules

*   [New actions API](#new-actions-api)
*   [New args API](#new-args-api)
*   [Disable output group field on Target](#disable-output-group-field-on-target)
*   [Disable default parameter of output attributes](#disable-default-parameter-of-output-attributes)
*   [Disallow tools in action inputs](#disallow-tools-in-action-inputs)
*   [Expand directories in Args](#expand-directories-in-args)
*   [Disable late bound option defaults](#disable-late-bound-option-defaults)
*   [Disallow `cfg = "data"`](#disallow-cfg-data)

Objc

*   [Disable objc provider resources](#disable-objc-provider-resources)

External repositories

*   [Remove native git repository](#remove-native-git-repository)
*   [Remove native http archive](#remove-native-http-archive)

Java

*   [New-style JavaInfo constructor](#new-style-java_info)
{'fraction_non_alphanumeric': 0.0942608063930258, 'fraction_numerical': 0.0010897203051216855, 'mean_word_length': 4.507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3620585', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1472, 'n_words': 577}