Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
This happens when try to print(self)Processing command: po print(self) HandleCommand, cmd_obj : 'expression' Handl - Pastebin.com | | | | || | | | | | Processing command: po print(self) HandleCommand, cmd_obj : 'expressio... | | | | This happens when

Re: [swift-users] Optimal String conversion to/from UTF-8 w/o null-termination?

2017-11-06 Thread Kelvin Ma via swift-users
doesn’t the compiler like to optimize the loop out of the benchmarking code? i’ve always had a hard time writing benchmarks in Swift On Fri, Nov 3, 2017 at 7:10 PM, Ryan Walklin via swift-users < swift-users@swift.org> wrote: > Why not just profile it? Set up a loop of 100,000 or so with each

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Johannes Weiß via swift-users
Hi Fadi, Just two questions: - did you compile & run this program on the same machine or not? (the .swiftmodule files and others are needed for LLDB) - did you use your Linux distro's lldb or the one that comes with the Swift toolchain? (you'll need the very LLDB that comes with the Swift

Re: [swift-users] Optimal String conversion to/from UTF-8 w/o null-termination?

2017-11-06 Thread Quinn "The Eskimo!" via swift-users
On 6 Nov 2017, at 17:21, Kelvin Ma via swift-users wrote: > doesn’t the compiler like to optimize the loop out of the benchmarking code? Yep. I would resolve this by reading the input from a file. For example, in the data-to-String case, you could: 1. Read lots of

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Michael Gottesman via swift-users
Perfect! This is exactly what I was looking for. = ). Thanks! > On Nov 6, 2017, at 11:27 AM, ⁨‫Fadi Botros‬ ‫⁩ <⁨botros_f...@yahoo.com⁩> > wrote: > > This happens when try to print(self) > Processing command: po print(self) HandleCommand, cmd_obj : 'expression' > Handl - Pastebin.com

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Jim Ingham via swift-users
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

[swift-users] بخصوص: About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
Also there is some very weird thing happens When I use ^C to stop debuggingthen REPLimport PerfectTemplate There is no error But when use breakpointThe error happens Is there something weird about breakpoints ? Also please note that on macOS when I use SPM to convert project to Xcode project and

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Jim Ingham via swift-users
Swift doesn’t seem to be reporting whatever the error is, I just see: ((SwiftASTContext*)0x7f8c555c84a0)->GetModule('PerfectTemplate') -- failed with no error That’s not very helpful. Again, I’ll probably need to make this happen locally to see what went wrong. If you have a project that

[swift-users] بخصوص: About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
OK You want it locally It is just the PerfectTemplate without ANY CHANGE (Perfect framework by PerfectlySoft) (Also Kitura makes the same problem, but I didn't try to get a full log to see whether the same problem or not) PerfectlySoft/PerfectTemplate | | | | || | | |

Re: [swift-users] Handle deprecated enum cases from a library

2017-11-06 Thread Dennis Weissmann via swift-users
Hey Charles, Thanks for going through this with me :) I'm not sure whether or not this is a compiler bug (that's partially why I posted it here), although I have the feeling that *something* is definitely wrong. Funnily enough, the following code shows 3 compiler warnings which are

[swift-users] بخصوص: بخصوص: About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
WEIRD WEIRD WEIRDIt seems it is threading issueBecause when I tried to breakpoint on line 71 file main.swift (like you did)It worked perfectlyI even could "frame variable" fully It seems that perfect framework when handle an HTTP request, it makes something in threads, I don't know how to debug

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
I think really like I said in the last message, it is a threading issueBecause debugging on Line 71 (which you debugged): It gives that you are on the main thread Thread #1When on line 31 (which I debugged): It gives that you are on Thread #2 (then you can't import any modules, nor print any

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
I don't think Perfect has problems because it debugs perfectly on XcodeKitura may have some flaws because on Xcode also causes some issues BUT YOU STILL CAN GET FRAME, ETC.. WHILE NOT HAVING THOSE IN SPM The problem is in SPMJust make the SPM build Swift Packages like Xcode (or equivalent)

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Jim Ingham via swift-users
It does look like this is a known bug (not yet fixed) in SPM: https://bugs.swift.org/browse/SR-3280 The bug isn’t fixed yet (apparently it’s blocked on a swift compiler issue.) There’s a workaround in that report, though I don’t know how viable it is.

[swift-users] xcode 9 new build system too aggressive?

2017-11-06 Thread David Baraff via swift-users
I will be editing a single file, and usually xcode will do a quick build as i change the code. then, abruptly, i make one more edit to the file and all of a sudden xcode decides to compile tons more. (little changes in the file, not defining new methods or classes or anything). anybody else

[swift-users] بخصوص: About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
Also please notedI think it is a SPM issue not an LLDB oneBecause when compiled on the same mac with Xcode (Swift package manager generate Xcode project), then use xcode-buildLLDB works perfectly in this circumstances I think you should refine the compilation script generated by SPM to generate

Re: [swift-users] بخصوص: About Swift Package Manager and LLDB

2017-11-06 Thread Jim Ingham via swift-users
> On Nov 6, 2017, at 2:21 PM, Jim Ingham via swift-users > wrote: > > This works for me (with Xcode 9.0): > > > git clone https://github.com/PerfectlySoft/PerfectTemplate.git > PT > Cloning into 'PT'... > remote:

Re: [swift-users] Handle deprecated enum cases from a library

2017-11-06 Thread Charles Srstka via swift-users
> On Nov 6, 2017, at 5:47 AM, Dennis Weissmann > wrote: > > Hey Charles, > > Thanks for going through this with me :) > > I'm not sure whether or not this is a compiler bug (that's partially why I > posted it here), although I have the feeling that *something* is

Re: [swift-users] Optimal String conversion to/from UTF-8 w/o null-termination?

2017-11-06 Thread Quinn "The Eskimo!" via swift-users
On 3 Nov 2017, at 19:42, Jens Alfke via swift-users wrote: > Any way to pass the bytes directly to String without an intermediate copy? You can do this with `UnsafeBufferPointer`. For example: extension String { init?(bytes: UnsafePointer, count: Int) {

[swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread ‫Fadi Botros‬ ‫ via swift-users
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 XcodeThis is irrelevant because web applications are mainly on Linux, so what if we want to do remote debugging ? I tried using the SPM, and

Re: [swift-users] About Swift Package Manager and LLDB

2017-11-06 Thread Michael Gottesman via swift-users
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⁩ >