apple / swift-numerics

Advanced mathematical types and functions for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing required module

treaves opened this issue · comments

I've followed the instructions for use in the main project README:

  • added the library via Swift package manager in Xcode
  • added the dependency to the build phase (not sure why that's needed)
  • in my Swift file imported Numerics.

I get a compilation error Missing required module '_NumericShims'.

I'll need a bit more information here; what Xcode version are you using, and what platform are you compiling for? If you can provide your project illustrating the problem you're having, that would be ideal.

FWIW I was able to use Numerics in brand new iOS and macOS projects just now with both the 12.4 toolchain and a Swift nightly toolchain. What dependency do you have for the build phase?

Xcode 12.4, Mac OS 11.2.2

What's really odd is that I've created a test project, and it doesn't happen there. The first project is also just the initial project creates from Xcode, dusted named differently. But it's repeatable on the first project. I can remove the dependency and re-add it, and it does the same thing.

I'll poke around a bit more.

What kind of project are you creating in Xcode?

If possible, can you note precisely each step you make in creating the project so I can try to reproduce?

It's a SwuftUI. I just deleted my project and re-created it from scratch; it works. I did a diff of the the two projects to see what is different, and there is just too much noise to sift through. So I don't know what the difference is that causes the problem, but, it'd appear to be Xcode related as I can get it to work in two other new projects.

So I'll close this. But thank you for reading.

If you're able to share your project without violating an NDA or similar, it would be great for you to report a bug using the feedback assistant and attach the project. If not, can you share the build settings for the component that failed and the exact build command and error from the build log?

Either way, thanks for your perseverance, and I'm glad that it's working now =)