Change in bazel[master]: Failing back to --expunge when using --expunge_async on non-...

9 views
Skip to first unread message

Damien Martin-guillerez (Gerrit)

unread,
Oct 17, 2016, 6:46:21 AM10/17/16
to bazel-de...@googlegroups.com
Damien Martin-guillerez has uploaded a new change for review. (
https://bazel-review.googlesource.com/6694


Change subject: Failing back to --expunge when using --expunge_async on
non-Linux machine
......................................................................

Failing back to --expunge when using --expunge_async on non-Linux machine

--expunge_async rely on setsid to create a new process group, this is
non-existent on Darwin nor on Windows. This lead to moving the output base
to a location and forget about it silently. Instead, we fall-back to
expunge_async until we completely fixes #1906.

Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
---
M
src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
1 file changed, 11 insertions(+), 0 deletions(-)



diff --git
a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
index 923f894..748c4c8 100644
---
a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
+++
b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
@@ -26,6 +26,7 @@
import com.google.devtools.build.lib.shell.CommandException;
import com.google.devtools.build.lib.util.CommandBuilder;
import com.google.devtools.build.lib.util.ExitCode;
+import com.google.devtools.build.lib.util.OS;
import com.google.devtools.build.lib.util.ProcessUtils;
import com.google.devtools.build.lib.util.ShellEscaper;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
@@ -98,6 +99,16 @@
return ExitCode.COMMAND_LINE_ERROR;
}

+ // TODO(dmarting): Deactivate expunge_async on non-Linux platform
until we completely fix it
+ // for non-Linux platforms
(https://github.com/bazelbuild/bazel/issues/1906).
+ if (cleanOptions.expunge_async && OS.getCurrent() != OS.LINUX) {
+ env.getReporter().handle(Event.info(null/*location*/,
+ "--expunge_async cannot be used on non-Linux platforms, falling
back to --expunge"));
+ cleanOptions.expunge_async = false;
+ cleanOptions.expunge = true;
+ cleanOptions.cleanStyle = "expunge";
+ }
+
String cleanBanner = cleanOptions.expunge_async ?
"Starting clean." :
"Starting clean (this may take a while). " +

--
To view, visit https://bazel-review.googlesource.com/6694
To unsubscribe, visit https://bazel-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Gerrit-PatchSet: 1
Gerrit-Project: bazel
Gerrit-Branch: master
Gerrit-Owner: Damien Martin-guillerez <dmar...@google.com>

Ulf Adams (Gerrit)

unread,
Oct 17, 2016, 7:51:00 AM10/17/16
to Damien Martin-guillerez
Ulf Adams has posted comments on this change. (
https://bazel-review.googlesource.com/6694 )

Change subject: Failing back to --expunge when using --expunge_async on
non-Linux machine
......................................................................


Patch Set 1: Code-Review+2
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Gerrit-PatchSet: 1
Gerrit-Project: bazel
Gerrit-Branch: master
Gerrit-Owner: Damien Martin-guillerez <dmar...@google.com>
Gerrit-Reviewer: Damien Martin-guillerez <dmar...@google.com>
Gerrit-Reviewer: Ulf Adams <ulf...@google.com>
Gerrit-HasComments: No

Philipp Wollermann (Gerrit)

unread,
Oct 17, 2016, 10:48:19 AM10/17/16
to Damien Martin-guillerez, Ulf Adams
Hello Damien Martin-guillerez, Ulf Adams,

I'd like you to reexamine a change. Please visit

https://bazel-review.googlesource.com/6694

to look at the new patch set (#2).

Change subject: Failing back to --expunge when using --expunge_async on
non-Linux machine
......................................................................

Failing back to --expunge when using --expunge_async on non-Linux machine

--expunge_async rely on setsid to create a new process group, this is
non-existent on Darwin nor on Windows. This lead to moving the output base
to a location and forget about it silently. Instead, we fall-back to
expunge_async until we completely fixes #1906.

--
Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Reviewed-on: https://bazel-review.googlesource.com/6694
MOS_MIGRATED_REVID=136340995
---
M
src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
1 file changed, 11 insertions(+), 1 deletion(-)
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Gerrit-PatchSet: 2
Gerrit-Project: bazel
Gerrit-Branch: master
Gerrit-Owner: Damien Martin-guillerez <dmar...@google.com>
Gerrit-Reviewer: Damien Martin-guillerez <dmar...@google.com>
Gerrit-Reviewer: Philipp Wollermann <phi...@google.com>
Gerrit-Reviewer: Ulf Adams <ulf...@google.com>

Philipp Wollermann (Gerrit)

unread,
Oct 17, 2016, 10:48:20 AM10/17/16
to Damien Martin-guillerez, Ulf Adams
Philipp Wollermann has submitted this change and it was merged. (
https://bazel-review.googlesource.com/6694 )

Change subject: Failing back to --expunge when using --expunge_async on
non-Linux machine
......................................................................

Failing back to --expunge when using --expunge_async on non-Linux machine

--expunge_async rely on setsid to create a new process group, this is
non-existent on Darwin nor on Windows. This lead to moving the output base
to a location and forget about it silently. Instead, we fall-back to
expunge_async until we completely fixes #1906.

--
Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Reviewed-on: https://bazel-review.googlesource.com/6694
MOS_MIGRATED_REVID=136340995
---
M
src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
1 file changed, 11 insertions(+), 1 deletion(-)



diff --git
a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
index 923f894..3b1c68f 100644
---
a/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
+++
b/src/main/java/com/google/devtools/build/lib/runtime/commands/CleanCommand.java
@@ -26,6 +26,7 @@
import com.google.devtools.build.lib.shell.CommandException;
import com.google.devtools.build.lib.util.CommandBuilder;
import com.google.devtools.build.lib.util.ExitCode;
+import com.google.devtools.build.lib.util.OS;
import com.google.devtools.build.lib.util.ProcessUtils;
import com.google.devtools.build.lib.util.ShellEscaper;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
@@ -34,7 +35,6 @@
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsProvider;
-
import java.io.IOException;
import java.util.logging.Logger;

@@ -98,6 +98,16 @@
return ExitCode.COMMAND_LINE_ERROR;
}

+ // TODO(dmarting): Deactivate expunge_async on non-Linux platform
until we completely fix it
+ // for non-Linux platforms
(https://github.com/bazelbuild/bazel/issues/1906).
+ if (cleanOptions.expunge_async && OS.getCurrent() != OS.LINUX) {
+ env.getReporter().handle(Event.info(null /*location*/,
+ "--expunge_async cannot be used on non-Linux platforms, falling
back to --expunge"));
+ cleanOptions.expunge_async = false;
+ cleanOptions.expunge = true;
+ cleanOptions.cleanStyle = "expunge";
+ }
+
String cleanBanner = cleanOptions.expunge_async ?
"Starting clean." :
"Starting clean (this may take a while). " +

--
To view, visit https://bazel-review.googlesource.com/6694
To unsubscribe, visit https://bazel-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia932613f687149a85f766de9faa7ce49aaa20b38
Gerrit-PatchSet: 2
Gerrit-Project: bazel
Gerrit-Branch: master
Gerrit-Owner: Damien Martin-guillerez <dmar...@google.com>
Reply all
Reply to author
Forward
0 new messages