diff options
author | 2018-03-06 07:54:50 -0800 | |
---|---|---|
committer | 2018-03-06 07:57:07 -0800 | |
commit | 27b8cc3f4a06e781a92cf2087476af5d51c06b1b (patch) | |
tree | ee48e5a9665ba21a241040af05c33c3e42a1cb9a | |
parent | 5c4e124163334aa91e3af7bf408238c4c774b692 (diff) |
Replace instances of XCode with Xcode which is the proper casing for the name.
Closes #4640.
PiperOrigin-RevId: 188022228
11 files changed, 118 insertions, 101 deletions
diff --git a/site/docs/install-os-x.md b/site/docs/install-os-x.md index ee4cfab864..b1750a7615 100644 --- a/site/docs/install-os-x.md +++ b/site/docs/install-os-x.md @@ -60,7 +60,7 @@ The binary installers are on Bazel's [GitHub releases page](https://github.com/b The installer contains the Bazel binary and the required JDK. Some additional libraries must also be installed for Bazel to work. -### 1. Install XCode command line tools +### 1. Install Xcode command line tools Xcode can be downloaded from the [Apple Developer Site](https://developer.apple.com/xcode/downloads/) (this link redirects to @@ -69,7 +69,7 @@ their App Store). For `objc_*` and `ios_*` rule support, you must have Xcode 6.1 or later with iOS SDK 8.1 installed on your system. -Once XCode is installed, you can agree to the license agreement for all users with +Once Xcode is installed, you can agree to the license agreement for all users with the following command: ``` diff --git a/src/main/java/com/google/devtools/build/lib/exec/apple/XCodeLocalEnvProvider.java b/src/main/java/com/google/devtools/build/lib/exec/apple/XcodeLocalEnvProvider.java index 553fef0039..55a2ba5ddc 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/apple/XCodeLocalEnvProvider.java +++ b/src/main/java/com/google/devtools/build/lib/exec/apple/XcodeLocalEnvProvider.java @@ -36,14 +36,14 @@ import java.util.Map; * Adds to the given environment all variables that are dependent on system state of the host * machine. * - * <p>Admittedly, hermeticity is "best effort" in such cases; these environment values should be - * as tied to configuration parameters as possible. + * <p>Admittedly, hermeticity is "best effort" in such cases; these environment values should be as + * tied to configuration parameters as possible. * * <p>For example, underlying iOS toolchains require that SDKROOT resolve to an absolute system * path, but, when selecting which SDK to resolve, the version number comes from build * configuration. */ -public final class XCodeLocalEnvProvider implements LocalEnvProvider { +public final class XcodeLocalEnvProvider implements LocalEnvProvider { private static final String XCRUN_CACHE_FILENAME = "__xcruncache"; private static final String XCODE_LOCATOR_CACHE_FILENAME = "__xcodelocatorcache"; @@ -51,19 +51,18 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { private final Map<String, String> clientEnv; /** - * Creates a new {@link XCodeLocalEnvProvider}. + * Creates a new {@link XcodeLocalEnvProvider}. * * @param clientEnv a map of the current Bazel command's environment */ - public XCodeLocalEnvProvider(String productName, Map<String, String> clientEnv) { + public XcodeLocalEnvProvider(String productName, Map<String, String> clientEnv) { this.productName = productName; this.clientEnv = clientEnv; } @Override public Map<String, String> rewriteLocalEnv( - Map<String, String> env, Path execRoot, String fallbackTmpDir) - throws IOException { + Map<String, String> env, Path execRoot, String fallbackTmpDir) throws IOException { boolean containsXcodeVersion = env.containsKey(AppleConfiguration.XCODE_VERSION_ENV_NAME); boolean containsAppleSdkVersion = env.containsKey(AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME); @@ -109,30 +108,34 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { } /** - * Returns the absolute root path of the target Apple SDK on the host system for a given - * version of xcode (as defined by the given {@code developerDir}). This may spawn a - * process and use the {@code /usr/bin/xcrun} binary to locate the target SDK. This uses a local - * cache file under {@code bazel-out}, and will only spawn a new {@code xcrun} process in the case - * of a cache miss. + * Returns the absolute root path of the target Apple SDK on the host system for a given version + * of xcode (as defined by the given {@code developerDir}). This may spawn a process and use the + * {@code /usr/bin/xcrun} binary to locate the target SDK. This uses a local cache file under + * {@code bazel-out}, and will only spawn a new {@code xcrun} process in the case of a cache miss. * * @param execRoot the execution root path, used to locate the cache file * @param developerDir the value of {@code DEVELOPER_DIR} for the target version of xcode * @param sdkVersion the sdk version, for example, "9.1" * @param appleSdkPlatform the sdk platform, for example, "iPhoneOS" * @param productName the product name - * @throws IOException if there is an issue with obtaining the root from the spawned - * process, either because the SDK platform/version pair doesn't exist, or there was an - * unexpected issue finding or running the tool + * @throws IOException if there is an issue with obtaining the root from the spawned process, + * either because the SDK platform/version pair doesn't exist, or there was an unexpected + * issue finding or running the tool */ - private static String getSdkRoot(Path execRoot, String developerDir, - String sdkVersion, String appleSdkPlatform, String productName) throws IOException { + private static String getSdkRoot( + Path execRoot, + String developerDir, + String sdkVersion, + String appleSdkPlatform, + String productName) + throws IOException { if (OS.getCurrent() != OS.DARWIN) { throw new IOException("Cannot locate iOS SDK on non-darwin operating system"); } try { CacheManager cacheManager = - new CacheManager(execRoot.getRelative( - BlazeDirectories.getRelativeOutputPath(productName)), + new CacheManager( + execRoot.getRelative(BlazeDirectories.getRelativeOutputPath(productName)), XCRUN_CACHE_FILENAME); String sdkString = appleSdkPlatform.toLowerCase() + sdkVersion; @@ -140,12 +143,16 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { if (cacheResult != null) { return cacheResult; } else { - Map<String, String> env = Strings.isNullOrEmpty(developerDir) - ? ImmutableMap.<String, String>of() : ImmutableMap.of("DEVELOPER_DIR", developerDir); + Map<String, String> env = + Strings.isNullOrEmpty(developerDir) + ? ImmutableMap.<String, String>of() + : ImmutableMap.of("DEVELOPER_DIR", developerDir); CommandResult xcrunResult = new Command( - new String[] {"/usr/bin/xcrun", "--sdk", sdkString, "--show-sdk-path"}, env, null) - .execute(); + new String[] {"/usr/bin/xcrun", "--sdk", sdkString, "--show-sdk-path"}, + env, + null) + .execute(); // calling xcrun via Command returns a value with a newline on the end. String sdkRoot = new String(xcrunResult.getStdout(), StandardCharsets.UTF_8).trim(); @@ -158,19 +165,23 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { if (terminationStatus.exited()) { throw new IOException( - String.format("xcrun failed with code %s.\n" - + "This most likely indicates that SDK version [%s] for platform [%s] is " - + "unsupported for the target version of xcode.\n" - + "%s\n" - + "Stderr: %s", + String.format( + "xcrun failed with code %s.\n" + + "This most likely indicates that SDK version [%s] for platform [%s] is " + + "unsupported for the target version of xcode.\n" + + "%s\n" + + "Stderr: %s", terminationStatus.getExitCode(), - sdkVersion, appleSdkPlatform, + sdkVersion, + appleSdkPlatform, terminationStatus.toString(), new String(e.getResult().getStderr(), StandardCharsets.UTF_8))); } - String message = String.format("xcrun failed.\n%s\n%s", - e.getResult().getTerminationStatus(), - new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); + String message = + String.format( + "xcrun failed.\n%s\n%s", + e.getResult().getTerminationStatus(), + new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); throw new IOException(message, e); } catch (CommandException e) { throw new IOException(e); @@ -178,17 +189,17 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { } /** - * Returns the absolute root path of the xcode developer directory on the host system for - * the given xcode version. This may spawn a process and use the {@code xcode-locator} binary. - * This uses a local cache file under {@code bazel-out}, and will only spawn a new process in the - * case of a cache miss. + * Returns the absolute root path of the xcode developer directory on the host system for the + * given xcode version. This may spawn a process and use the {@code xcode-locator} binary. This + * uses a local cache file under {@code bazel-out}, and will only spawn a new process in the case + * of a cache miss. * * @param execRoot the execution root path, used to locate the cache file * @param version the xcode version number to look up * @param productName the product name - * @throws IOException if there is an issue with obtaining the path from the spawned - * process, either because there is no installed xcode with the given version, or - * there was an unexpected issue finding or running the tool + * @throws IOException if there is an issue with obtaining the path from the spawned process, + * either because there is no installed xcode with the given version, or there was an + * unexpected issue finding or running the tool */ private static String getDeveloperDir(Path execRoot, DottedVersion version, String productName) throws IOException { @@ -206,10 +217,12 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { if (cacheResult != null) { return cacheResult; } else { - CommandResult xcodeLocatorResult = new Command( - new String[] { - execRoot.getRelative("_bin/xcode-locator").getPathString(), version.toString()}) - .execute(); + CommandResult xcodeLocatorResult = + new Command( + new String[] { + execRoot.getRelative("_bin/xcode-locator").getPathString(), version.toString() + }) + .execute(); String developerDir = new String(xcodeLocatorResult.getStdout(), StandardCharsets.UTF_8).trim(); @@ -222,19 +235,23 @@ public final class XCodeLocalEnvProvider implements LocalEnvProvider { String message; if (e.getResult().getTerminationStatus().exited()) { - message = String.format("xcode-locator failed with code %s.\n" - + "This most likely indicates that xcode version %s is not available on the host " - + "machine.\n" - + "%s\n" - + "stderr: %s", - terminationStatus.getExitCode(), - version, - terminationStatus.toString(), - new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); + message = + String.format( + "xcode-locator failed with code %s.\n" + + "This most likely indicates that xcode version %s is not available on the " + + "host machine.\n" + + "%s\n" + + "stderr: %s", + terminationStatus.getExitCode(), + version, + terminationStatus.toString(), + new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); } else { - message = String.format("xcode-locator failed. %s\nstderr: %s", - e.getResult().getTerminationStatus(), - new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); + message = + String.format( + "xcode-locator failed. %s\nstderr: %s", + e.getResult().getTerminationStatus(), + new String(e.getResult().getStderr(), StandardCharsets.UTF_8)); } throw new IOException(message, e); } catch (CommandException e) { diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java index 67acd0f93e..f3a2baec31 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionContextProvider.java @@ -21,7 +21,7 @@ import com.google.devtools.build.lib.actions.ResourceManager; import com.google.devtools.build.lib.exec.ActionContextProvider; import com.google.devtools.build.lib.exec.ExecutionOptions; import com.google.devtools.build.lib.exec.SpawnRunner; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalExecutionOptions; import com.google.devtools.build.lib.exec.local.LocalSpawnRunner; @@ -94,7 +94,7 @@ final class RemoteActionContextProvider extends ActionContextProvider { env.getOptions().getOptions(LocalExecutionOptions.class); LocalEnvProvider localEnvProvider = OS.getCurrent() == OS.DARWIN - ? new XCodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) + ? new XcodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) : (OS.getCurrent() == OS.WINDOWS ? new WindowsLocalEnvProvider(env.getClientEnv()) : new PosixLocalEnvProvider(env.getClientEnv())); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index 2e5eee397a..4cb6fe3953 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -350,7 +350,7 @@ public class ObjcRuleClasses { * Files that are already compiled. */ static final FileTypeSet PRECOMPILED_SRCS_TYPE = FileTypeSet.of(OBJECT_FILE_SOURCES); - + static final FileTypeSet NON_ARC_SRCS_TYPE = FileTypeSet.of(FileType.of(".m", ".mm")); static final FileTypeSet PLIST_TYPE = FileTypeSet.of(FileType.of(".plist")); @@ -391,9 +391,10 @@ public class ObjcRuleClasses { Base.lproj), it will be placed under a directory of that name in the final bundle. This allows for localizable strings. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("strings", LABEL_LIST) - .allowedFileTypes(STRINGS_TYPE) - .direct_compile_time_input()) + .add( + attr("strings", LABEL_LIST) + .allowedFileTypes(STRINGS_TYPE) + .direct_compile_time_input()) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(xibs) --> Files which are .xib resources, possibly localizable. @@ -403,9 +404,7 @@ public class ObjcRuleClasses { directory of that name in the final bundle. This allows for localizable UI. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("xibs", LABEL_LIST) - .direct_compile_time_input() - .allowedFileTypes(XIB_TYPE)) + .add(attr("xibs", LABEL_LIST).direct_compile_time_input().allowedFileTypes(XIB_TYPE)) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(storyboards) --> Files which are .storyboard resources, possibly localizable. @@ -415,8 +414,7 @@ public class ObjcRuleClasses { Base.lproj), it will be placed under a directory of that name in the final bundle. This allows for localizable UI. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("storyboards", LABEL_LIST) - .allowedFileTypes(STORYBOARD_TYPE)) + .add(attr("storyboards", LABEL_LIST).allowedFileTypes(STORYBOARD_TYPE)) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(resources) --> Files to include in the final application bundle. @@ -437,14 +435,15 @@ public class ObjcRuleClasses { the same structure passed to this argument, so <code>["res/foo.png"]</code> will end up in <code>Payload/foo.app/res/foo.png</code>. - <p>Note that in the generated XCode project file, all files in the top directory of + <p>Note that in the generated Xcode project file, all files in the top directory of the specified files will be included in the Xcode-generated app bundle. So specifying <code>["res/foo.png"]</code> will lead to the inclusion of all files in directory <code>res</code>. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("structured_resources", LABEL_LIST) - .legacyAllowAnyFileType() - .direct_compile_time_input()) + .add( + attr("structured_resources", LABEL_LIST) + .legacyAllowAnyFileType() + .direct_compile_time_input()) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(datamodels) --> Files that comprise the data models of the final linked binary. @@ -452,8 +451,7 @@ public class ObjcRuleClasses { is usually contained by another *.xcdatamodeld (note the added d) directory. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("datamodels", LABEL_LIST).legacyAllowAnyFileType() - .direct_compile_time_input()) + .add(attr("datamodels", LABEL_LIST).legacyAllowAnyFileType().direct_compile_time_input()) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(asset_catalogs) --> Files that comprise the asset catalogs of the final linked binary. @@ -462,16 +460,19 @@ public class ObjcRuleClasses { linked with any binary that depends directly or indirectly on this target. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("asset_catalogs", LABEL_LIST).legacyAllowAnyFileType() - .direct_compile_time_input()) + .add( + attr("asset_catalogs", LABEL_LIST) + .legacyAllowAnyFileType() + .direct_compile_time_input()) /* <!-- #BLAZE_RULE($objc_resources_rule).ATTRIBUTE(bundles) --> The list of bundle targets that this target requires to be included in the final bundle. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ - .add(attr("bundles", LABEL_LIST) - .direct_compile_time_input() - .allowedRuleClasses("objc_bundle", "objc_bundle_library") - .allowedFileTypes()) + .add( + attr("bundles", LABEL_LIST) + .direct_compile_time_input() + .allowedRuleClasses("objc_bundle", "objc_bundle_library") + .allowedFileTypes()) .build(); } @Override diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/AbstractSandboxSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/sandbox/AbstractSandboxSpawnRunner.java index b7263b863f..29c46b2e8d 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/AbstractSandboxSpawnRunner.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/AbstractSandboxSpawnRunner.java @@ -248,7 +248,7 @@ abstract class AbstractSandboxSpawnRunner implements SpawnRunner { writablePaths, // As of 2018-01-09: // - every caller of `getWritableDirs` passes a LocalEnvProvider-processed environment as - // `env`, and in every case that's either PosixLocalEnvProvider or XCodeLocalEnvProvider, + // `env`, and in every case that's either PosixLocalEnvProvider or XcodeLocalEnvProvider, // therefore `env` surely has an entry for TMPDIR // - Bazel-on-Windows does not yet support sandboxing, so we don't need to add env[TMP] and // env[TEMP] as writable paths. diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java index 1c23623c57..6bf48fe22b 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/DarwinSandboxedSpawnRunner.java @@ -26,7 +26,7 @@ import com.google.devtools.build.lib.actions.Spawn; import com.google.devtools.build.lib.actions.SpawnActionContext; import com.google.devtools.build.lib.actions.SpawnResult; import com.google.devtools.build.lib.actions.Spawns; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.runtime.CommandEnvironment; import com.google.devtools.build.lib.runtime.ProcessWrapperUtil; @@ -151,7 +151,7 @@ final class DarwinSandboxedSpawnRunner extends AbstractSandboxSpawnRunner { this.alwaysWritableDirs = getAlwaysWritableDirs(cmdEnv.getRuntime().getFileSystem()); this.processWrapper = ProcessWrapperUtil.getProcessWrapper(cmdEnv); this.localEnvProvider = - new XCodeLocalEnvProvider(cmdEnv.getRuntime().getProductName(), cmdEnv.getClientEnv()); + new XcodeLocalEnvProvider(cmdEnv.getRuntime().getProductName(), cmdEnv.getClientEnv()); this.timeoutKillDelay = timeoutKillDelay; } diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/ProcessWrapperSandboxedSpawnRunner.java b/src/main/java/com/google/devtools/build/lib/sandbox/ProcessWrapperSandboxedSpawnRunner.java index 979878e8fd..dca292efca 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/ProcessWrapperSandboxedSpawnRunner.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/ProcessWrapperSandboxedSpawnRunner.java @@ -17,7 +17,7 @@ package com.google.devtools.build.lib.sandbox; import com.google.devtools.build.lib.actions.ExecException; import com.google.devtools.build.lib.actions.Spawn; import com.google.devtools.build.lib.actions.SpawnResult; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.exec.local.PosixLocalEnvProvider; import com.google.devtools.build.lib.runtime.CommandEnvironment; @@ -88,7 +88,7 @@ final class ProcessWrapperSandboxedSpawnRunner extends AbstractSandboxSpawnRunne this.processWrapper = ProcessWrapperUtil.getProcessWrapper(cmdEnv); this.localEnvProvider = OS.getCurrent() == OS.DARWIN - ? new XCodeLocalEnvProvider(productName, cmdEnv.getClientEnv()) + ? new XcodeLocalEnvProvider(productName, cmdEnv.getClientEnv()) : new PosixLocalEnvProvider(cmdEnv.getClientEnv()); } diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java index d125d7a4cd..cd36827512 100644 --- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxActionContextProvider.java @@ -23,7 +23,7 @@ import com.google.devtools.build.lib.actions.SpawnResult; import com.google.devtools.build.lib.actions.Spawns; import com.google.devtools.build.lib.exec.ActionContextProvider; import com.google.devtools.build.lib.exec.SpawnRunner; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalExecutionOptions; import com.google.devtools.build.lib.exec.local.LocalSpawnRunner; @@ -100,7 +100,7 @@ final class SandboxActionContextProvider extends ActionContextProvider { env.getOptions().getOptions(LocalExecutionOptions.class); LocalEnvProvider localEnvProvider = OS.getCurrent() == OS.DARWIN - ? new XCodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) + ? new XcodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) : new PosixLocalEnvProvider(env.getClientEnv()); return new LocalSpawnRunner( diff --git a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java index c3ee1883be..74cab934d1 100644 --- a/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/standalone/StandaloneActionContextProvider.java @@ -23,7 +23,7 @@ import com.google.devtools.build.lib.exec.FileWriteStrategy; import com.google.devtools.build.lib.exec.SpawnRunner; import com.google.devtools.build.lib.exec.StandaloneTestStrategy; import com.google.devtools.build.lib.exec.TestStrategy; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalExecutionOptions; import com.google.devtools.build.lib.exec.local.LocalSpawnRunner; @@ -72,7 +72,7 @@ public class StandaloneActionContextProvider extends ActionContextProvider { env.getOptions().getOptions(LocalExecutionOptions.class); LocalEnvProvider localEnvProvider = OS.getCurrent() == OS.DARWIN - ? new XCodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) + ? new XcodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) : (OS.getCurrent() == OS.WINDOWS ? new WindowsLocalEnvProvider(env.getClientEnv()) : new PosixLocalEnvProvider(env.getClientEnv())); diff --git a/src/main/java/com/google/devtools/build/lib/worker/WorkerActionContextProvider.java b/src/main/java/com/google/devtools/build/lib/worker/WorkerActionContextProvider.java index f0b2070382..84b516a973 100644 --- a/src/main/java/com/google/devtools/build/lib/worker/WorkerActionContextProvider.java +++ b/src/main/java/com/google/devtools/build/lib/worker/WorkerActionContextProvider.java @@ -20,7 +20,7 @@ import com.google.devtools.build.lib.actions.ResourceManager; import com.google.devtools.build.lib.analysis.test.TestActionContext; import com.google.devtools.build.lib.exec.ActionContextProvider; import com.google.devtools.build.lib.exec.SpawnRunner; -import com.google.devtools.build.lib.exec.apple.XCodeLocalEnvProvider; +import com.google.devtools.build.lib.exec.apple.XcodeLocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalEnvProvider; import com.google.devtools.build.lib.exec.local.LocalExecutionOptions; import com.google.devtools.build.lib.exec.local.LocalSpawnRunner; @@ -59,7 +59,7 @@ final class WorkerActionContextProvider extends ActionContextProvider { env.getOptions().getOptions(LocalExecutionOptions.class); LocalEnvProvider localEnvProvider = OS.getCurrent() == OS.DARWIN - ? new XCodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) + ? new XcodeLocalEnvProvider(env.getRuntime().getProductName(), env.getClientEnv()) : (OS.getCurrent() == OS.WINDOWS ? new WindowsLocalEnvProvider(env.getClientEnv()) : new PosixLocalEnvProvider(env.getClientEnv())); diff --git a/src/test/java/com/google/devtools/build/lib/exec/apple/XCodeLocalEnvProviderTest.java b/src/test/java/com/google/devtools/build/lib/exec/apple/XcodeLocalEnvProviderTest.java index 1b8e3bb243..0bf1bb4beb 100644 --- a/src/test/java/com/google/devtools/build/lib/exec/apple/XCodeLocalEnvProviderTest.java +++ b/src/test/java/com/google/devtools/build/lib/exec/apple/XcodeLocalEnvProviderTest.java @@ -24,10 +24,8 @@ import com.google.devtools.build.lib.vfs.JavaIoFileSystem; import java.io.IOException; import org.junit.Test; -/** - * Tests for {@link XCodeLocalEnvProvider}. - */ -public class XCodeLocalEnvProviderTest { +/** Tests for {@link XcodeLocalEnvProvider}. */ +public class XcodeLocalEnvProviderTest { private final FileSystem fs = new JavaIoFileSystem(); @Test @@ -36,12 +34,13 @@ public class XCodeLocalEnvProviderTest { return; } try { - new XCodeLocalEnvProvider().rewriteLocalEnv( - ImmutableMap.<String, String>of( - AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME, "8.4", - AppleConfiguration.APPLE_SDK_PLATFORM_ENV_NAME, "iPhoneSimulator"), - fs.getPath("/tmp"), - "bazel"); + new XcodeLocalEnvProvider() + .rewriteLocalEnv( + ImmutableMap.<String, String>of( + AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME, "8.4", + AppleConfiguration.APPLE_SDK_PLATFORM_ENV_NAME, "iPhoneSimulator"), + fs.getPath("/tmp"), + "bazel"); fail("action should fail due to being unable to resolve SDKROOT"); } catch (IOException e) { assertThat(e) |