You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We provide a strict preset that includes all flags that will be flipped in the upcoming major release.
72
+
To opt-in to these flags, you can set the `strict` attribute to `True` when calling `bazelrc_preset`.
72
73
73
-
Bazelisk provides [extra command-line options](https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#other-features) to migrate to stricter flags. A common migration pattern is:
74
+
```starlark
75
+
load("@bazelrc-preset.bzl", "bazelrc_preset")
76
+
77
+
bazelrc_preset(
78
+
name="preset",
79
+
strict=True, # Enable this to opt-in to flags that are flipped in the upcoming major release
80
+
)
81
+
```
82
+
83
+
Bazelisk provides [extra command-line options](https://github.com/bazelbuild/bazelisk?tab=readme-ov-file#other-features) to migrate to stricter flags.
84
+
A common migration pattern is:
74
85
75
86
1. Run `bazelisk --migrate build --nobuild //...` to try upgrading new strict flags.
76
87
2. For flags that don't work, either
@@ -85,23 +96,23 @@ If your project defines specific flags that users should set, you can define the
85
96
1. Define your own flags using the same data structure as [`flags.bzl`](flags.bzl) or [`tests/extra_test_presets.bzl`](tests/extra_test_presets.bzl).
86
97
2. Add a `bazelrc_preset_test` to make sure your presets format is correct.
87
98
88
-
```starlark
89
-
bazelrc_preset_test(
90
-
name="test_project_preset",
91
-
extra_presets=CUSTOM_PROJECT_PRESETS,
92
-
)
93
-
```
99
+
```starlark
100
+
bazelrc_preset_test(
101
+
name="test_project_preset",
102
+
extra_presets=CUSTOM_PROJECT_PRESETS,
103
+
)
104
+
```
94
105
95
106
3. Any user of your project can now consume your presets and add them to their presets
0 commit comments