SamplePackage icon indicating copy to clipboard operation
SamplePackage copied to clipboard

Day 81: No such module 'SamplePackage'

Open chasenlehara opened this issue 1 year ago • 1 comments

When I first added the package to my project, I ran into this error:

No such module 'SamplePackage'

Then I cleaned the build folder and tried to build, but got these errors:

Xcode error panel shows five issues in the HotProspects project. A red error states, “No such module SamplePackage” in Day81.swift. Four gray errors indicate missing files like HotProspects.abi.json, swiftmodule, and related outputs in the derived data folder.

Then I got lucky and added the package to the “Link Binary With Libraries” list:

The Xcode Build Phases screen is open for the HotProspects project. It lists project phases like Target Dependencies, Compile Sources with five items, and Link Binary With Libraries, which includes a single required package named SamplePackage.

Filing this issue here in case something can be fixed in the package to avoid the issue in the future, or it helps others with the same problem.

This was all with Xcode 16.2 (16C5032a) on macOS 15.2 (24C101).

chasenlehara avatar Dec 16 '24 15:12 chasenlehara

Continuing on Day 83, I realize that maybe this step to Add to Target is new? Might be helpful to add to the instructions.

A dialog box in Xcode titled “Choose Package Products for CodeScanner” allows selecting a package product. The dropdown menu is expanded, showing targets: None, HotProspects, HotProspectsTests, and HotProspectsUITests. Buttons at the bottom include Cancel and Add Package.

chasenlehara avatar Dec 18 '24 02:12 chasenlehara