Closed amseddi closed 4 months ago
Can you check that these packages are also listed as package dependencies in the project settings?
Can you check that these packages are also listed as package dependencies in the project settings?
It was not listed at first. And when I added it to the projects settings, the embedded package was included in the results of the scan
command:
➜ PeripherySPMIssue mint run periphery scan --setup
Welcome to Periphery!
This guided setup will help you select the appropriate configuration for your project.
* Inspecting project...
Select build targets to analyze:
? Delimit choices with a single space, e.g: 1 2 3, or 'all' to select all options
1 EmbeddedPackage.EmbeddedPackage
2 PeripherySPMIssue
Does this mean we mean we will need to add all local packages to the dependencies in the project settings?
It does, yes.
We can't add our local package to project dependencies because Xcode denies it. The Package.swift is in the same root folder as it's example app.
@Servus7 Is there any way you can restructure your project to workaround this? This sounds more like an Xcode issue. SPM support prior to 2.21.0 was very much a hack. It was implemented befofe Xcode's pbxproj explicitly declared SPM dependencies. 2.21.0 now only uses the explicit SPM dependecies declared in the pbxproj, which requires local packages to be added via the Xcode UI.
To demonstrate this issue, I created a new project with an embedded Swift package:
The embedded Swift package used to be recognised and could be analysed. Please find the output of the
scan --setup command
below:Using periphery@2.21.0
Using periphery@2.20.0