Failed to get module 'MyModule' from AST context

Why does this happen and how can it be resolved? (See output dump below showing my interactions with lldb) MyModule is a standard macOS project. It imports SpriteKit and a framework that I wrote, which is another project in the same workspace. Both projects in the workspace are written in 100% Swift 3.0. Both projects have their "Use Legacy Swift Language Version" (SWIFT_VERSION) setting set to NO. Changing this value doesn't affect this issue. I am using Xcode Version 8.2 beta (8C30a).


It's worth noting that my framework project was previously written in Swift 2.x but has since been refactored for Swift 3.0. Not sure if there is some other project setting that might be causing this.



2016-11-21 10:43:17.428200 MyModule[90945:3495758] [DYMTLInitPlatform] platform initialization successful

2016-11-21 10:43:17.571197 MyModule[90945:3495732] Metal GPU Frame Capture Enabled

2016-11-21 10:43:17.571563 MyModule[90945:3495732] Metal API Validation Enabled

(lldb) po path

error: in auto-import:

failed to get module 'MyModule' from AST context:

(lldb) po path

Shared Swift state for MyModule has developed fatal errors and is being discarded.

REPL definitions and persistent names/types will be lost.

error: in auto-import:

failed to get module 'MyModule' from AST context:

(lldb)

Replies

Can any Apple techs respond to this issue? I still have not resolved it.


ab@pr

Can any Apple techs respond to this issue?

Alas, I don’t have any suggestions; you should open a DTS tech support incident so that one our tools experts can look into this.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Did you happen to figure this out? I am hitting the same.

No, I haven't. It was suggested that I open a tech support incident but I am weary of spending one of my incident tickets on an issue that isn't related to my coding and that doesn't stop me from continuing my project. Maybe I should open a bug report...

Did you get a resolution for this?


A lot of people have been talking about a custom 'modulemap' file to set correct project description but I don't think that helps!

I would also like to know any resolution on this? I'm building a swift server tool that I would like to debug. So far I've just had to put print() statments everywhere and constantly recompile. Not effecient.

Hi, I got some similar error messages during debugging, but they are not total the same, and I found the reason, so I write here to be an alternative solution for you:

REASON:
My project name is the same with one of SPM lib name
SOLUTION:
Rename the lib name or rename project name, then all goes well.