Importing Swift Module from Xcode Project


(Jessie Serrino) #1

Hello,
I'm using LLDB within Xcode (version lldb-360.1.70), and trying to import all
existing files from my project into the REPL.
When I typeimport ProjectName, the REPL doesn't have any issues. That said, when
I reference any classes within the project that I am trying to import, I get
error: use of unresolved identifier.
Is there a command to link the Swift module within LLDB that I may be missing?
Within my Xcode build settings of the project, I have Defines Module set to Yes
, so I am certain that a module is being created for my project.

Thanks,JS


(Jessie Serrino) #2

Hi there,
Just to follow up, I connected my application to the debugger outside of Xcode,
and when I attempt to import my project there (by using import ProjectName), I
instead get this error: "expression failed to parse, unknown error".
When I instead use @testable to import, I get this error: "Shared Swift state
for Remind101 has developed fatal errors and is being discarded.REPL definitions
and persistent names/types will be lost.".
Any insight as to why it's having trouble loading my module?
JS

···

On Tue, Mar 21, 2017 8:43 AM, Jessie Serrino jessie@remind101.com wrote:
Hello,
I'm using LLDB within Xcode (version lldb-360.1.70), and trying to import all
existing files from my project into the REPL.
When I typeimport ProjectName, the REPL doesn't have any issues. That said, when
I reference any classes within the project that I am trying to import, I get
error: use of unresolved identifier.
Is there a command to link the Swift module within LLDB that I may be missing?
Within my Xcode build settings of the project, I have Defines Module set to Yes
, so I am certain that a module is being created for my project.

Thanks,JS


(Rex) #3

Hey lldb team!

We're trying to build some tooling around lldb and the repl but we can't
start until we have some way of importing our application as a module. Some
insights into why running into these roadblocks would be greatly
appreciated :slight_smile:

Thanks,
Rex

···

On Tue, Mar 21, 2017 at 2:33 PM, Jessie Serrino <jessie@remind101.com> wrote:

Hi there,

Just to follow up, I connected my application to the debugger outside of
Xcode, and when I attempt to import my project there (by using import
ProjectName), I instead get this error: "expression failed to parse,
unknown error".

When I instead use @testable to import, I get this error: "Shared Swift
state for Remind101 has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.".

Any insight as to why it's having trouble loading my module?

JS

On Tue, Mar 21, 2017 8:43 AM, Jessie Serrino jessie@remind101.com wrote:

Hello,

I'm using LLDB within Xcode (version lldb-360.1.70), and trying to import
all existing files from my project into the REPL.

When I type *import ProjectName*, the REPL doesn't have any issues. That
said, when I reference any classes within the project that I am trying to
import, I get *error: use of unresolved identifier*.

Is there a command to link the Swift module within LLDB that I may be
missing? Within my Xcode build settings of the project, I have *Defines
Module* set to *Yes*, so I am certain that a module is being created for
my project.

Thanks,
JS

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/> | BLOG <http://blog.remind.com/>
> FOLLOW
US <https://twitter.com/remindhq> | LIKE US
<https://www.facebook.com/remindhq>