How to disable sandbox, or prevent sandbox files from being deleted?

6,901 views
Skip to first unread message

seee...@gmail.com

unread,
Jan 29, 2020, 3:53:53 AM1/29/20
to bazel-discuss
I am new to Bazel and trying to wrap my head around how certain things work (like `include_prefix`).

I'm not sure whether disabling sandbox will help me. But I'd still like to know if there is a way to disable sandbox.

What I actually want is to debug my configuration. I would like to inspect the contents of sandbox directory. It would greatly help me if I can prevent sandbox files from being deleted.

Please let me know if you know how to do either one of the two things in the title.

László Csomor

unread,
Jan 29, 2020, 4:01:03 AM1/29/20
to seee...@gmail.com, bazel-discuss
To prevent file deletion: --sandbox_debug
(https://docs.bazel.build/versions/master/command-line-reference.html#flag--sandbox_debug).

To disable sandboxing: --spawn_strategy=standalone
(https://docs.bazel.build/versions/master/command-line-reference.html#flag--spawn_strategy).

--
László Csomor | Software Engineer | laszlo...@google.com

Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/bb142da2-e8ef-44da-9388-dd62047031bd%40googlegroups.com.

seee...@gmail.com

unread,
Jan 29, 2020, 4:28:07 AM1/29/20
to bazel-discuss
Thanks a lot!

--sandbox_debug worked for me. I thought it was only to get extra debugging output.

On Wednesday, January 29, 2020 at 5:01:03 PM UTC+8, László Csomor wrote:
To prevent file deletion: --sandbox_debug
(https://docs.bazel.build/versions/master/command-line-reference.html#flag--sandbox_debug).

To disable sandboxing: --spawn_strategy=standalone
(https://docs.bazel.build/versions/master/command-line-reference.html#flag--spawn_strategy).

--
László Csomor | Software Engineer | laszlo...@google.com

Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado


On Wed, Jan 29, 2020 at 9:53 AM <seee...@gmail.com> wrote:
>
> I am new to Bazel and trying to wrap my head around how certain things work (like `include_prefix`).
>
> I'm not sure whether disabling sandbox will help me. But I'd still like to know if there is a way to disable sandbox.
>
> What I actually want is to debug my configuration. I would like to inspect the contents of sandbox directory. It would greatly help me if I can prevent sandbox files from being deleted.
>
> Please let me know if you know how to do either one of the two things in the title.
>
> --
> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages