Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass arguments to disable sandboxing when enabled #993

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

award999
Copy link
Contributor

@award999 award999 commented Aug 6, 2024

These particular commands (or subcommands) take the same build arguments as we pass to "build", "run", and "test" commands. To get our tests to run in a sandbox, we need to disable sandboxing because you cannot create a new sandbox when you're already running under a sandbox

@award999
Copy link
Contributor Author

award999 commented Aug 6, 2024

Leaving in draft state until we have macOS builders to test this

Copy link
Contributor

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you verified that all of these commands will work with all the build arguments.
I'm just wondering if it is safer to have a disable sandbox option which is used in these cases

src/SwiftPackage.ts Outdated Show resolved Hide resolved
@award999
Copy link
Contributor Author

award999 commented Aug 8, 2024

Have you verified that all of these commands will work with all the build arguments. I'm just wondering if it is safer to have a disable sandbox option which is used in these cases

Ya should have explained in commit message but if you look at:

swift help build > build.txt
swift help package > package.txt
diff build.txt package.txt

Other than "package" having different subcommands, the options are the same other that build can specify target, product, and enable/disable swift-testing and XCTest. In my mind the user wouldn't put these in build arguments to use for everything but maybe you can think of a case I haven't.

Yes the other option is a boolean setting to disable sandboxing but wasn't keen on introducing a new setting for our niche use case, but yes may be safer bet

New disableSandbox setting (only intended for testing right now)

These particular commands (or subcommands) use sandboxing.

To get our tests to run in a sandbox, we need to disable sandboxing
because you cannot create a new sandbox when you're already running
under a sandbox
@award999 award999 changed the title Pass build arguments to some swiftExec calls Pass arguments to disable sandboxing when enabled Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants