profile
viewpoint
Ian Dundas iandundas Freelance iOS developer Amsterdam iandundas.com Freelance Functional-Reactive Swift developer. Developing for iOS since 3.0. http://github.com/iandundas/Tacks

iandundas/motion-nstableview-example 13

RubyMotion OSX NSTableView example

iandundas/iOS7-custom-transitions-example 6

present a new custom modal UIViewController with a TransitioningDelegate managing the show

iandundas/reactivecocoa-presentation 4

Presentation on FRP in ReactiveCocoa, given to CocoaHeadsNL 21-Apr-15

iandundas/ConcentrateDemo 2

Reactive demo of the game Concentrate

iandundas/MMRecordCoreDataExample 2

MMRecord with CoreData

iandundas/CoreDataCloudKitDemo 1

[under construction]

iandundas/HotTakeCore 1

Hot-swappable reactive collection supporting Realm, Core Data and regular arrays.

iandundas/HotTakeDemo 1

Demoing swappable datasources using Hot Take for Realm

iandundas/HotTakeRealm 1

The Realm adapter for HotTake

iandundas/Loca 1

Reactive location library used in Tacks.cc

issue commentpointfreeco/swift-snapshot-testing

Snapshot taken on CI has slight color differences compared to local

I was just about to, when I realised above that some people are saying it is not fastlane which is causing this issue for them (but simply running the tests on a different machine). So a bit hesitant now to open that fastlane issue 🤔.

edulpn

comment created time in 14 days

issue closedthp/urlwatch

`command` output is missing, but works during --test-filter

Hi,

I have a urls.yaml that looks like this:

name: "XCode Releases"
command: curl -s https://xcodereleases.com/data.json | jq '.[0] | .version'
---
name: "Swift Releases"
command: curl -s https://xcodereleases.com/data.json | jq '.[0] | .compilers.swift'

When I run urlwatch --test-filter 1 the output is correct:

{
  "number": "11.5",
  "build": "11N605f",
  "release": {
    "beta": 2
  }
}

So far so good!

However, what I receive (in Telegram, and at the console) when I run urlwatch is only the name of the Job, not the output:

urlwatch
===========================================================================
01. NEW: Swift Releases
02. NEW: XCode Releases
===========================================================================

---------------------------------------------------------------------------
NEW: Swift Releases ( curl -s https://xcodereleases.com/data.json | jq '.[0] | .compilers.swift' )
---------------------------------------------------------------------------


---------------------------------------------------------------------------
NEW: XCode Releases ( curl -s https://xcodereleases.com/data.json | jq '.[0] | .version' )
---------------------------------------------------------------------------


--
urlwatch 2.18, Copyright 2008-2020 Thomas Perl
Website: https://thp.io/2008/urlwatch/
watched 2 URLs in 0 seconds

Can anyone point me to what's going wrong here? thanks!

closed time in 21 days

iandundas

issue commentthp/urlwatch

`command` output is missing, but works during --test-filter

thanks both, you're right: if I swap my command for just $ date then it works correctly.

Urlwatch identify shell jobs by their command. When you change the command, urlwatch considers it a new job, with no connection to your earlier command. So there's no history to compare against.

Oh got you, I assumed it used the name as the key.

Also, you are using curl with a URL and then pipe that into jq, wonder if we should add a "shell" filter type so that you can use a normal URL job, but use a shell script as a filter?

Yeah I was looking for something like that, that would be cool. I was thinking of making PR adding that myself but no python experience so just I dropped down to shell instead

thanks :)

iandundas

comment created time in 21 days

issue commentfacebook/chisel

error: (lldb) command script import /usr/local/opt/chisel/libexec/fblldb.py

this is fixed for me since updating to the latest chisel (2.0.0)

wulinfeng198810

comment created time in 22 days

issue commentthp/urlwatch

`command` output is missing, but works during --test-filter

p.p.s. yet running urlwatch --test-filter 1 afterwards does show the script output:

urlwatch --test-filter 1
{
  "number": "11.4",
  "build": "11N132i",
  "release": {
    "beta": 3
  }
}
iandundas

comment created time in 22 days

issue commentthp/urlwatch

`command` output is missing, but works during --test-filter

p.s. that is on the first execution of the job with [4] added, so it should definitely show a new diff

iandundas

comment created time in 22 days

issue commentthp/urlwatch

`command` output is missing, but works during --test-filter

Thanks for blazing-fast reply 🚀

I'm still not sure it's working. Check this: image

If I pick a new JSON array index at random (e.g. [4], as shown above), you can see that the JSON is different compared to when it was [0].

But if I change my urlwatch job correspondingly, to use [4] temporarily:

urls.yaml:

name: "XCode Releases"
command: curl -s https://xcodereleases.com/data.json | jq '.[4] | .version'

The output from $ urlwatch at the Terminal and in Telegram is:

urlwatch
===========================================================================
01. NEW: XCode Releases
===========================================================================

---------------------------------------------------------------------------
NEW: XCode Releases ( curl -s https://xcodereleases.com/data.json | jq '.[4] | .version' )
---------------------------------------------------------------------------

--

but no diff is shown of the actual JSON change. I'm sure I'm missing something here 🤔

iandundas

comment created time in 22 days

issue commentthp/urlwatch

`command` output is missing, but works during --test-filter

(Edited the above)

iandundas

comment created time in 22 days

issue openedthp/urlwatch

`command` string itself is logged, rather than the output of the command

Hi,

I have a urls.yaml that looks like this:

name: "XCode Releases"
command: curl -s https://xcodereleases.com/data.json | jq '.[0] | .version'
---
name: "Swift Releases"
command: curl -s https://xcodereleases.com/data.json | jq '.[0] | .compilers.swift'

When I run urlwatch --test-filter 1 the output is correct:

{
  "number": "11.5",
  "build": "11N605f",
  "release": {
    "beta": 2
  }
}

So far so good!

However, what I receive (in Telegram, and at the console) when I run just urlwatch it logs the string value of the command itself as what's changed, like:

urlwatch
===========================================================================
01. NEW: Swift Releases
02. NEW: XCode Releases
===========================================================================

---------------------------------------------------------------------------
NEW: Swift Releases ( curl -s https://xcodereleases.com/data.json | jq '.[0] | .compilers.swift' )
---------------------------------------------------------------------------


---------------------------------------------------------------------------
NEW: XCode Releases ( curl -s https://xcodereleases.com/data.json | jq '.[0] | .version' )
---------------------------------------------------------------------------


--
urlwatch 2.18, Copyright 2008-2020 Thomas Perl
Website: https://thp.io/2008/urlwatch/
watched 2 URLs in 0 seconds

Can anyone point me to what's going wrong here? thanks!

created time in 22 days

issue commentpointfreeco/swift-snapshot-testing

Snapshot taken on CI has slight color differences compared to local

Good idea, will do 👍🏻

edulpn

comment created time in 23 days

issue commentpointfreeco/swift-snapshot-testing

Snapshot taken on CI has slight color differences compared to local

Could be something there, but we were seeing it on the exact same simulator (model, OS etc) on the same machine, with the difference being only between running the tests from Xcode vs running them (locally) from fastlane

edulpn

comment created time in 23 days

issue closedseanhenry/SwiftMockGeneratorForXcode

Mystery (to me!) Void parameter

When generating a spy with a function which has a closure, there's always an extra Void parameter

protocol SimpleExampleProtocol {
    func someFunction(callback: (Bool) -> (String))
}

class SimpleExampleMock: SimpleExampleProtocol {
    var invokedSomeFunction = false
    var invokedSomeFunctionCount = 0
    var stubbedSomeFunctionCallbackResult: (Bool, Void)? // <--- here 
    func someFunction(callback: (Bool) -> (String)) {
        invokedSomeFunction = true
        invokedSomeFunctionCount += 1
        if let result = stubbedSomeFunctionCallbackResult {
            _ = callback(result.0)
        }
    }
}

so when setting up spies, we have to use a tuple always with an extra () at the end:

spy.stubbedSomeFunctionCallbackResult = (Bool, ())

Is this intentional behaviour? Instinctively it felt like spy.stubbedSomeFunctionCallbackResult = true would be better, but possibly this is a misunderstanding.

Thanks!

closed time in a month

iandundas

issue commentseanhenry/SwiftMockGeneratorForXcode

Mystery (to me!) Void parameter

I think I understand now :) thanks for the response!

iandundas

comment created time in a month

issue openedseanhenry/SwiftMockGeneratorForXcode

Mystery (to me!) Void parameter

When generating a spy with a function which has a closure, there's always an extra Void parameter

protocol SimpleExampleProtocol {
    func someFunction(callback: (Bool) -> (String))
}

class SimpleExampleMock: SimpleExampleProtocol {
    var invokedSomeFunction = false
    var invokedSomeFunctionCount = 0
    var stubbedSomeFunctionCallbackResult: (Bool, Void)? // <--- here 
    func someFunction(callback: (Bool) -> (String)) {
        invokedSomeFunction = true
        invokedSomeFunctionCount += 1
        if let result = stubbedSomeFunctionCallbackResult {
            _ = callback(result.0)
        }
    }
}

so when setting up spies, we have to use a tuple always with an extra () at the end:

spy.stubbedSomeFunctionCallbackResult = (Bool, ())

Is this intentional behaviour? Instinctively it felt like spy.stubbedSomeFunctionCallbackResult = true would be better, but possibly this is a misunderstanding.

Thanks!

created time in 2 months

issue commentpointfreeco/swift-snapshot-testing

Snapshot taken on CI has slight color differences compared to local

Just to chime in that we're seeing the same issue. When run our snapshot tests from fastlane, assets (pngs etc) seem to be slightly differently rendered compared when we launch the same tests on the same machine, same simulator, from Xcode. Very strange.

CleanShot 2020-04-05 at 10 16 09

edulpn

comment created time in 2 months

more