[swift-users] About Swift Package Manager and LLDB
Jim Ingham
jingham at apple.com
Mon Nov 6 14:15:25 CST 2017
The log for “print self” was unfortunately captured too late. Reading in the PerfectTemplate module had already failed, and so any subsequent attempt will just report it as failed. To get the complete error log for this, you need to put:
log enable -f /tmp/lldb-type-log.txt lldb types
in your ~/.lldbinit file and then start a fresh debugging session and capture the whole session.
The failure from the REPL is because you have to tell the REPL where to look for other frameworks from which it might load modules. You can pass appropriate -I, -L and -F flags to the “swift” invocation too tell the compiler lldb’s using to implement the REPL where to look for this module.
The example you gave seems to be a MacOS X example. The binary type was MachO etc. If this is just a small example that you are using to demonstrate the problem, can you file a PR with the swift bug reporter with this example and how you built/ran it and we can take a look here. That’s probably easier than trying to pass logs back and forth.
Jim
> On Nov 6, 2017, at 11:27 AM, Fadi Botros via swift-users <swift-users at swift.org> wrote:
>
> This happens when try to print(self)
> Processing command: po print(self) HandleCommand, cmd_obj : 'expression' Handl - Pastebin.com <https://pastebin.com/15b52C1x>
>
>
> Processing command: po print(self) HandleCommand, cmd_obj : 'expressio...
> <https://pastebin.com/15b52C1x>
>
>
> This happens when REPL then try to "import PerfectTemplate"
> == [UserExpression::Evaluate] Parsing expression import PerfectTemplate == Swif - Pastebin.com <https://pastebin.com/FsGgXa54>
>
>
> == [UserExpression::Evaluate] Parsing expression import PerfectTemplate == ...
> <https://pastebin.com/FsGgXa54>
>
>
> Also the same problem happens in Kitura (even if only use packages that depend on Swift 4)
>
> من: Michael Gottesman <mgottesman at apple.com>
> إلى: Michael Gottesman <mgottesman at apple.com>
> نسخة كربونية: "swift-users at swift.org" <swift-users at swift.org>; Fadi Botros <botros_fadi at yahoo.com>
> تاريخ الإرسال: الإثنين 6 نوفمبر، 2017 7:01 م
> الموضوع: Re: [swift-users] About Swift Package Manager and LLDB
>
> Or actually:
>
> https://github.com/apple/swift/blob/master/docs/DebuggingTheCompiler.rst#debugging-failures-in-lldb <https://github.com/apple/swift/blob/master/docs/DebuggingTheCompiler.rst#debugging-failures-in-lldb>
>
> I would just enable all of the logging and post it here or if the log is very big put the log into a pastebin.
>
>> On Nov 6, 2017, at 8:59 AM, Michael Gottesman via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
>>
>
> I am not going to answer this fully (I forwarded it to the appropriate people though). But to help them out, can you go to ./docs/DebuggingTheCompiler and enable lldb logging and post the output here?
>
> Michael
>
>> On Nov 6, 2017, at 8:43 AM, Fadi Botros via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
>>
>> I'm interested in doing Web Application using Swift and promoting this to be a trend someday.
>> But I couldn't find a way to debug web apps without using Xcode
>> This is irrelevant because web applications are mainly on Linux, so what if we want to do remote debugging ?
>>
>> I tried using the SPM, and when I try to compile a Kitura or Perfect app then try to debug it, it gives me this
>>
>> (lldb) po print(self)
>> warning: Swift error in module <moduleName>.
>> Debug info from this module will be unavailable in the debugger.
>>
>> error: in auto-import:
>> failed to get module '<SomeModuleName>' from AST context
>>
>> I'm using macOS Sierra (sorry didn't have time to upgrade), with Swift 4 that comes with Xcode 9
>> Also tried the same experiment on Xubuntu using Swift 4 debian package provided on swift.org <http://swift.org/> itself
>>
>> The only succeeded way is to generate an xcodeproj and compile it, this is irrelevant because it is only macOS, while servers are Linux.
>> _______________________________________________
>> swift-users mailing list
>> swift-users at swift.org <mailto:swift-users at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-users <https://lists.swift.org/mailman/listinfo/swift-users>
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org <mailto:swift-users at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171106/5bf6af36/attachment.html>
More information about the swift-users
mailing list