added a user-friendly message for migration to a list-based strategy
remote: added a user-friendly message for migration to a list-based strategy
to improve and simplify a migration after a flag flip added a link to the issue with migration advises
Closes
@@ -91,11 +91,21 @@ public final class ProxySpawnActionContext implements SpawnActionContext {
}
if (strategies.isEmpty()) {
+ // TODO(ishikhman): remove with --incompatible_list_based_execution_strategy_selection
+ if (listBasedExecutionStrategySelection) {
throw new UserExecException(
String.format(
- "No usable spawn strategy found for spawn with mnemonic %s. Are your --spawn_strategy"
- + " or --strategy flags too strict?",
+ "No usable spawn strategy found for spawn with mnemonic %s. Your --spawn_strategy"
+ + "or --strategy flags are probably too strict. "
+ + "Visit https://github.com/bazelbuild/bazel/issues/7480 for migration advises",
spawn.getMnemonic()));
+ } else {
+ throw new UserExecException(
+ String.format(
+ "No usable spawn strategy found for spawn with mnemonic %s."
+ + " Are your --spawn_strategy or --strategy flags too strict?",
+ spawn.getMnemonic()));
+ }
}
return strategies;
