Skip to content

Fix CLITest when run in xcode - #1775

Merged
jglogan merged 1 commit into
apple:mainfrom
mareksapota:mareksapota-fix-xcode-single-test-run-package-deps
Jun 20, 2026
Merged

Fix CLITest when run in xcode#1775
jglogan merged 1 commit into
apple:mainfrom
mareksapota:mareksapota-fix-xcode-single-test-run-package-deps

Conversation

@mareksapota

Copy link
Copy Markdown
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Running a single test from TestCLIMachine in xcode errors out because:

Warning:

'CLITests' is missing a dependency on 'MachineAPIClient' because dependency scan of Swift module 'CLITests' discovered a dependency on 'MachineAPIClient'

Error:

/Volumes/src/apple/container/Package.swift:1:1 Undefined symbol: MachineAPIClient.MachineConfiguration.containerUUIDLength.unsafeMutableAddressor : Swift.Int

This change fixes the errors.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

Test plan:

I clicked the run button left of func testCreate in TestCLIMachine, xcode built the project and run the test successfully.

@mareksapota

Copy link
Copy Markdown
Contributor Author

Related issue: #1776

Comment thread Package.swift
"ContainerLog",
"ContainerPersistence",
"ContainerResource",
"MachineAPIClient",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch:

% grep -r MachineAPIClient Tests
Tests/CLITests/Subcommands/Machine/TestCLIMachine.swift:import MachineAPIClient

@mareksapota

Copy link
Copy Markdown
Contributor Author

I pushed a new empty commit that is signed, sorry, I messed that up before.

@jglogan

jglogan commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

@mareksapota Yep, it looks like you got signing set up - reset your branch, re-commit your Package.swift change and force push the branch and you should be fine.

Summary: Running a single test from `TestCLIMachine` in xcode errors out
because:

Warning:
```
'CLITests' is missing a dependency on 'MachineAPIClient' because dependency scan of Swift module 'CLITests' discovered a dependency on 'MachineAPIClient'
```

Error:
```
/Volumes/src/apple/container/Package.swift:1:1 Undefined symbol: MachineAPIClient.MachineConfiguration.containerUUIDLength.unsafeMutableAddressor : Swift.Int
```

This change fixes the errors.

Test plan: I clicked the run button left of `func testCreate` in
`TestCLIMachine`, xcode built the project and run the test successfully.
@mareksapota
mareksapota force-pushed the mareksapota-fix-xcode-single-test-run-package-deps branch from 933e192 to 9c8ab87 Compare June 20, 2026 17:59
@mareksapota

Copy link
Copy Markdown
Contributor Author

Force pushed, unverified commit is gone/replaced.

@github-actions

Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 33.4%
Integration 21.09%
Combined 53.64%

@jglogan
jglogan merged commit 37d463e into apple:main Jun 20, 2026
3 checks passed
@jglogan

jglogan commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

@mareksapota Merged, thanks for finding the issue and fixing it!

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.

2 participants