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

Permit scheme build stage to be optional #1303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsthejb
Copy link

Hi,

Thanks for the excellent work on this project!

Here's a small tweak, I noticed: currently it's not possible to define schemes with an optional Build stage:

Parsing project spec failed: Decoding failed at "build": Nothing found

In fact, it's entirely legal to define a scheme without build. We're currently looking into this as the only way to allow running of tests in child modules, when those child modules are Swift Packages: it's not possible to create schemes to build the modules, but it is possible to create scheme to test, and the modules will be implicitly built.

Screenshot 2022-12-24 at 12 16 03

Regardless of this, the spec should permit everything that's permitted by Xcode, so I made this initial rough PR.

Thanks very much

@@ -8,7 +8,7 @@ public typealias BuildType = XCScheme.BuildAction.Entry.BuildFor
public struct Scheme: Equatable {

public var name: String
public var build: Build
public var build: Build!
Copy link
Author

Choose a reason for hiding this comment

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

This should of course should be Build?, but changing to a full optional led to many type-inference errors in SpecLoadingTests that I wasn't able to easily fix

Comment on lines +10 to +12
test:
targets:
- Target
Copy link
Author

Choose a reason for hiding this comment

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

Use case: scheme has only a test action, no build

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.

None yet

2 participants