If I have a number of `*.json` files that are meant to be loaded and
used as a part of my SwiftPM test suite:
1. how do I get SwiftPM to bundle them with the test bundle?
2. how do I reference the fixtures in the test bundle?
## What I've tried...
I tried creating a top-level directory called
> I often end up “printing” the addresses or using GDB to take an inside
> look.
That is a really simple interrogation technique I wish I had thought of
that! Thank you!
> One thing that tripped me up: if you use inout variables, the observers
> will be triggered once the function completes.
> Do you mean, "did I make two copies of the `Data`, one in a top-level
> variable named `d` and the other in a parameter named `buffer`"?
That is more precisely what I meant. Mutters to self: "Precision of
language, Ryan!"
That fairly completely answers my quandary. Thank you for your time and
struct Foo {
init(from buffer: Data) {
bar = integer(withBytes: Array(buffer[4..<6]))
baz = integer(withBytes: Array(buffer[6..<8]))
...
}
let d = Data(count: Int(3e+8))
let f = Foo(from: d)
Did I just make two copies of the `Data`? How would I investigate this
to understand
> Not being able to assign the function reference is a bug. As a
> workaround, you should be able to unsafeBitCast CC_SHA1_Update to the
> appropriate type.
>
> -Joe
Two questions:
1. Is this an already reported bug? If so, would you happen to know what
it is so I can track it for resolution
I'm puzzeled by the behavior of the automatic coercion. Specifically
when something will work and when it will not. It at least has something
to do with the platform. That much I have tracked down.
I've attached a file, bridge.swift, that on Linux will fail to compile
with the error: cannot
I'll also plug my repo: https://github.com/RLovelett/swift-aur
I use this to build from source on Arch.
On Sun, Jul 17, 2016, at 03:44 PM, Farhan Ahmed via swift-users wrote:
> Thank you Andrés. I will take a look at those packages from the AUR.
>
> Best,
> Farhan
>
>> On Jul 16, 2016, at 9:34
On Thu, Jun 23, 2016, at 11:18 PM, Erica Sadun wrote:
>
>> On Jun 23, 2016, at 9:04 PM, Ryan Lovelett via swift-users > us...@swift.org> wrote:
>>
>> extension Dictionary {
>> init(pairs: S) {
>> self.init()
>> for (key, value) in pairs {
>> self[
The following code does not compile in Swift 3.0 and it used to compile
in Swift 2.2. I'm pretty sure it is a bug in Swift 3.0, since it used to
work in Swift 2.2, but perhaps it was a bug that it worked in Swift 2.2.
Help?
extension Dictionary {
init(pairs: S) {
self.init()
You will need to build from source.
On Tue, Jun 21, 2016, at 08:14 PM, SonWa via swift-users wrote:
> Hi,I see swift.org only version of Ubuntu.
> Centos6 or Centos7 ask on how to runing?
> _
> swift-users mailing list
> swift-users@swift.org
>
On Tue, May 24, 2016, at 04:18 PM, Jens Alfke via swift-users wrote:
> For completeness I should add that there are other cases where you need
> to know the exact type:
>
> * When formatting a floating-point number, you should use 6 decimal
> places if it's a float, 16 if it's a double. (If you
On Tue, May 24, 2016, at 04:19 PM, Tony Parker wrote:
>
>> On May 24, 2016, at 1:11 PM, Ryan Lovelett > d...@ryan.lovelett.me> wrote:
>>
>> On Tue, May 24, 2016, at 04:07 PM, Tony Parker wrote:
>>> Let’s get a bug into JIRA, then we’ll figure out what we should
>>> do here.
>>
>> That's the
On Tue, May 24, 2016, at 04:07 PM, Tony Parker wrote:
> Let’s get a bug into JIRA, then we’ll figure out what we should
> do here.
That's the problem for me. What is the bug? Based on the code example I
provided in this thread. I'm somewhat convinced that the bug is that
Foundation on
lly. I
was _expecting_ the Darwin behavior since that has always been the
behavior. I was _not expecting_ the Glibc behavior as this is different
than Darwin. All that having been said: I prefer the Glibc behavior.
I'm not sure if this is expected behavior a bug. Or something else
entirely.
>
On Mon, May 23, 2016, at 04:33 PM, Jens Alfke wrote:
>
>> On May 23, 2016, at 12:25 PM, Ryan Lovelett via swift-users > us...@swift.org> wrote:
>>
>> However it seems that Foundation on Linux has neither
>> `CFBooleanGetTypeID` or `CFGetTypeID`.
>
> Those ar
I am trying to run some Swift code that relies on Foundation on Linux
(it is thoughtbot's Argo library if anyone wants to know the exact
code).
There is a fairly simple extension to NSNumber that looks like:
import Foundation
extension NSNumber {
var isBool: Bool {
return
On Wed, May 4, 2016, at 10:41 AM, Jan E. Schotsman via swift-users
wrote:
> Hello,
>
> This code causes a segmentation fault:
>
> struct MyHeapElement
> {
> var index:Int
> var key:T
> }
>
> struct MyHeap
> {
> var elements = [MyHeapElement]()
> }
>
On Thu, Apr 14, 2016, at 07:54 AM, Marco Betschart via swift-users wrote:
>
> Dear Swift Users,
> I’d like to use the Swift Package Manager for my dependency management
> - regardless of it’s early stage:
> Something like having the Swift Package Manager doing all the
> dependency management work
/man/1/strip
[2]
https://github.com/RLovelett/swift-aur/blob/3498527dc392e391d77507579f075a8ebc4c78c0/PKGBUILD#L31-L33
On Wed, Dec 23, 2015, at 08:32 PM, Ryan Lovelett via swift-users wrote:
> I have compiled from the latest Swift source and built a package for my
> system using the i
Can you provide a little bit more context? Operating system...command
you ran...etc...
On Fri, Jan 1, 2016, at 03:15 AM, Quan Yong Zhai via swift-users wrote:
> Hi,
> The build-script was completed , how do I install the binary file to
> /usr folder?
>
> Thanks in advance
>
>
>
>
I have compiled from the latest Swift source and built a package for my
system using the install to destination. However, after installing the
package and running `swift` to test the REPL it dies with the following
error: `error: failed to resolve REPL breakpoint for 'repl_main'`.
Not really sure
21 matches
Mail list logo