profile
viewpoint
Max Howell mxcl @candor Savannah, GA https://mxcl.dev Creator of Homebrew. Open source all day every day.

mxcl/Path.swift 757

Delightful, robust, cross-platform and chainable file-pathing functions.

mxcl/Cake 548

A delicious, quality‑of‑life supplement for your app‑development toolbox.

mxcl/OMGHTTPURLRQ 342

Vital extensions to NSURLRequest that Apple left out for some reason.

mxcl/AppUpdater 201

Automatically update open source macOS apps from GitHub releases.

mxcl/Chalk 173

Terminal colors using Swift 5’s string interpolation extensions.

iainsmith/swift-docker 145

Test your swift packages with one command `swift docker test`

mxcl/Audioscrobbler.app 137

Minimal, robust iTunes scrobbling

mxcl/LegibleError 137

Beating `Error.localizedDescription` at its own game.

mxcl/MBWebSocketServer 63

An objc draft 10 websocket implementation

mxcl/ChuzzleKit 49

A chuzzled object is nil if it is falsy, otherwise it has its falsy parts removed.

startedgonzalezreal/DefaultCodable

started time in 2 minutes

push eventmxcl/swift-sh

Sungbin Jo

commit sha 4402234664b77f152aae40cccb7b25ec5efd2fd0

Fix #108 - always output help message even when stdin isn't a TTY

view details

Max Howell

commit sha 123f93b0705033f6167a660dbd725e34e7c2a2dd

Merge pull request #109 from pcr910303/master Fix #108 - always output help message even when stdin isn't a TTY

view details

Max Howell

commit sha f621e4b2507fe3aaa137f9fabfce70a3eb98a120

Disable for now

view details

Max Howell

commit sha c9b5473c61a8237a669c067f8958a9cae08a9438

Use array format so Travis logs make sense

view details

Max Howell

commit sha 089bac8e10919aef0971ef8c06e7b63727d6828e

Swift 5.2; New deploy system

view details

Max Howell

commit sha d43c3a365fc41da077289e12bf1778f1c4fccde9

Test against Swift-5.2

view details

push time in 2 hours

push eventmxcl/swift-sh

Jim Boulter

commit sha 43e02f128e680190ce369b1fb1aa4b8b4e74424c

Make relative paths relative to script location and not current working directory (#106) * Make relative local paths relative to the script's location, not the current working directory. * WIP pipe input path through to DependencyName.init * Fix edit, editor, and eject ImportSpecification.init calls. Remove Path.containingDirectory because Path.parent already exists and it's better. Fix tests. * Clean up before PR. Add comment to integration test with weird directories. Remove print statement. Remove extra newlines. * Remove unnecessary change of scope of Command.Input to public. * Sync linux tests Co-authored-by: jiboulte <58996962+jiboulte@users.noreply.github.com>

view details

push time in 2 hours

PR merged mxcl/swift-sh

Reviewers
Make relative paths relative to script location and not current working directory

Problem:

Scripts inside a git repository which share local packages can only be run from one directory. If I have a directory structure like this:

git repo root
| - Scripts/
    | - script.swift
    | - MyPackage/

And I import MyPackage in script.swift like this: import MyPackage // ./MyPackage

I can only run the script from the Scripts directory. I can't specify an absolute path because it's a git repository that might be checked out to any location.

Proposed Solution:

Paths should be specified as relative to the script's file location rather than being considered relative to the current working directory.

Combine location of script and location of package when resolving local paths with relative-to-script syntax to produce the path relative to the current working directory for the same execution as the existing relative paths.

./Scripts/script.swift + ./path/to/package == ./Scripts/path/to/package

Notes on implementation:

This required taking the input path of the script and passing it through to DependencyName.init to be used in parsing the path to the dependency and turning it into a path relative to the given script's directory.

I modified the logic inside the DependencyName.init method to combine the provided relative path with the script's absolute path. If the script is from a non-local source (.string case of Script.Input) then it defaults to looking relative to the cwd. I don't feel strongly about this default value, so please let me know if you think it's inappropriate. Perhaps we should throw instead?

Notes on tests:

I modified the relative path integration test to utilize directories outside the cwd to properly test that the relative path is resolved relative to the script.

I also added a test under ImportSpecificationUnitTests to test the relative path when the script is outside of the cwd. When using the mktemp method to get a temporary directory, I was unable to perform a mkdir on the provided temp directory, so I just went with making files as was done for specifying the directory of the local_dep package previously.

I needed to modify some of the test code to allow for writing the script to a non-temporary directory via XTCAssertRuns and added an optional path parameter to support this test.

Please let me know if you'd like additional tests added for cases I've missed.

+96 -55

2 comments

10 changed files

jboulter11

pr closed time in 2 hours

push eventmxcl/swift-sh

Max Howell

commit sha f621e4b2507fe3aaa137f9fabfce70a3eb98a120

Disable for now

view details

push time in 2 hours

pull request commentmxcl/swift-sh

Fix #108 - always output help message even when stdin isn't a TTY

Tagged, but will untag because the tests fail.

pcr910303

comment created time in 2 hours

created tagmxcl/swift-sh

tag1.16.1

Easily script with third-party Swift dependencies.

created time in 2 hours

release mxcl/swift-sh

1.16.1

released time in 2 hours

push eventmxcl/swift-sh

Sungbin Jo

commit sha 4402234664b77f152aae40cccb7b25ec5efd2fd0

Fix #108 - always output help message even when stdin isn't a TTY

view details

Max Howell

commit sha 123f93b0705033f6167a660dbd725e34e7c2a2dd

Merge pull request #109 from pcr910303/master Fix #108 - always output help message even when stdin isn't a TTY

view details

push time in 2 hours

PR merged mxcl/swift-sh

Fix #108 - always output help message even when stdin isn't a TTY

This PR fixes #108.

+1 -5

0 comment

1 changed file

pcr910303

pr closed time in 2 hours

issue closedmxcl/swift-sh

stdin is read and evaluated from script if stdin isn’t TTY even when invoking swift-sh -h

I’m not sure if this is intended or not, but swift-sh tries to read stdin even with the flags -h when stdin isn’t a TTY. I’m not sure if this is intended, but AFAIU -- -h does the same thing, right? I believe that just printing the help message would be more consistent and less surprising.

For context, I’m trying to add swift-sh on the Homebrew core tap, and it looks like the test (which is just checking the help message) is failing because the stdin isn’t a TTY in the testing environment so it tries to read from it, and (due to reasons I don’t know) errors due to the sandbox and returns 2.

I would like the formula included in the main tap, so I would like if you can consider to remove the conditional behavior. I also can open a (trivial) PR removing the conditional if it’s preferable.

Thanks.

closed time in 2 hours

pcr910303

issue commentmxcl/swift-sh

stdin is read and evaluated from script if stdin isn’t TTY even when invoking swift-sh -h

Yeah this probably incorrect behavior, will merge.

pcr910303

comment created time in 2 hours

push eventmxcl/PromiseKit

Cong Liu

commit sha f95e7b2614a19386b8b2618f362aa32e86951d55

Fixed a typo "excecutes" should be "executes".

view details

push time in 3 hours

PR merged mxcl/PromiseKit

Reviewers
Fixed a typo

"excecutes" should be "executes".

+1 -1

1 comment

1 changed file

congliu0704

pr closed time in 3 hours

startednodes-vapor/paginator

started time in 5 days

startedfinestructure/SPMPlayground

started time in 5 days

pull request commentPromiseKit/PMKAlamofire

Update to Alamofire 5 and Swift 5

Alright, so Travis seems to fail at the pod lint stage because the Podspec it uses comes from the main PromiseKit repo which still points to Alamofire 4. I have no idea how to fix the CI build.

Yeah this is problematic, and justifies that for PMK 7 I split the pod. I think we'll just have to remove the lint step for this repo’s major bump.

larsschwegmann

comment created time in 5 days

startedwlisac/swift-log-slack

started time in 6 days

issue commentmxcl/swift-sh

Swift 5.2 import issue

SwiftKittenFramework is the correct module name. So this is unexpected.

tcamin

comment created time in 7 days

issue commentmxcl/swift-sh

Swift 5.2 import issue

Can you include the generated Package.swift and deps.json?

/Users/me/Library/Developer/swift-sh.cache
tcamin

comment created time in 7 days

push eventmxcl/Path.swift

Max Howell

commit sha 6e99825d9fec1f4363f9e28cf91195eedcf6db95

Probably redundant tests, but why not

view details

push time in 15 days

push eventmxcl/Path.swift

Max Howell

commit sha 6e37bfde4dce81d61b894f9abaf6cc7063f3efe1

Update README.md

view details

push time in 15 days

issue commentiainsmith/swift-docker

dyld: Library not loaded: @rpath/libswiftCore.dylib

This tool is not maintained, unfortunately. I have a script I use instead so my motivation to fix it up is low. I wanted to use this instead of the script.

Main big problem right now is it targets images from a docker repo that is not up-to-date, so you can’t go above Swift 4.0.

leogdion

comment created time in 22 days

issue commentiainsmith/swift-docker

dyld: Library not loaded: @rpath/libswiftCore.dylib

This happens on 10.14.4 and above, the formula builds with -static-stdlib which will produce an invalid binary on these platforms (can't recall why).

The solution is to not use this flag there @iainsmith see my formula for swift-sh where I do a similar work around:

https://github.com/mxcl/homebrew-made/blob/master/swift-sh.rb

leogdion

comment created time in 22 days

release PromiseKit/CoreLocation

3.1.0

released time in 24 days

created tagPromiseKit/CoreLocation

tag3.1.1

Promises for Swift & ObjC

created time in 24 days

release PromiseKit/CoreLocation

3.1.1

released time in 24 days

push eventPromiseKit/CoreLocation

Andreas Grauel

commit sha 3c7eee1ff75ca8d5f80d75aa6e832bac50d4b312

update package.swift * adds platforms cause PMKCoreLocation is not compatible with watchOS v2

view details

Max Howell

commit sha d027bbcdfffc83fa7a790aa6f9189b18c94632e2

Merge pull request #32 from mrgrauel/patch-1 Fixes missing deployment targets for spm

view details

push time in 24 days

PR merged PromiseKit/CoreLocation

Fixes missing deployment targets for spm

Adds platforms cause PMKCoreLocation is not compatible with watchOS v2.

startUpdatingLocation is only available for watchOS v3+.

It's the same platforms as for the package.swift@swift5.0 of PromiseKit. I hope that's fine for you.

+3 -0

0 comment

1 changed file

mrgrauel

pr closed time in 24 days

Pull request review commentmxcl/PromiseKit

when(resolved:) tuple overloads

 import PromiseKit import XCTest  class JoinTests: XCTestCase {+         func testImmediates() {         let successPromise = Promise()          var joinFinished = false-        when(resolved: successPromise).done(on: nil) { _ in joinFinished = true }+        when(resolved: [successPromise]).done(on: nil) { joinFinished = true }

v7 is ready for submissions.

Skoti

comment created time in a month

pull request commentmxcl/PromiseKit

Added when(maxFulfilledCount:)

I feel a variant of race is more what you want to provide, perhaps race(fulfilled:) which implies it allows failures and waits for some promise to actually win.

RomanPodymov

comment created time in a month

issue commentHomebrew/homebrew-governance

Membership 2020

👍 cheers.

sjackman

comment created time in a month

pull request commentmxcl/PromiseKit

Enabled the BUILD_LIBRARY_FOR_DISTRIBUTION flag

I am unfamiliar with the BUILD_LIBRARY_FOR_DISTRIBUTION so don’t know. Certainly not being able to build against a platform we support will prevent us merging this.

yo2bh

comment created time in a month

push eventmxcl/LegibleError

Max Howell

commit sha 3a17814793e5811c364ad0b44e9a5c6607b83a82

no-warnings/Swift 5.2 prep

view details

push time in a month

push eventmxcl/LegibleError

Max Howell

commit sha 6d118d431142f9935652d393d53c6240ca446df7

Update Travis versions

view details

Max Howell

commit sha 0005d03c46727169b90b07d94a4db1bd9e5e36d1

Update swift test --generate-linuxmain

view details

Max Howell

commit sha 89ed99c21dce562ba761d0d639a5b39537aa95f0

Test file level scopes

view details

Max Howell

commit sha a9732ea382901be5ac51319c73977913e53cf9c2

Can’t test 5.2 yet, seems unstable

view details

push time in a month

push eventmxcl/LegibleError

Max Howell

commit sha 42a3718733664aadf76aa8d27b21ea6e0ff18bc4

Update swift test --generate-linuxmain

view details

push time in a month

push eventmxcl/LegibleError

Max Howell

commit sha aab6f5923df6628fbc44b2ac19509a0b8a73f14b

Update Travis versions

view details

push time in a month

issue commentmxcl/AmA

What was it like working at Last.FM?

It was some of the best years of my life. It was a very fun environment, full of people who loved music and where passionate about improving the experience of music in the burgeoning web-2.0 era.

I discovered so much great new music, and it was hard not to feel a little bit elite—a music snob—while working there. I attended some truly amazing shows, that otherwise I doubt I would have known about because the people there knew about all the best up and coming bands. Dare I say music was more interesting in the 2000s than it is now too (I guess I'm getting old).

The Last.fm “roof parties” were legendary in the area of London we were in, and often attracted a large and diverse crowd of music aficionados. Hosted on the roof of our office building in the summer or spring, they were loud, full of great music, grilled food and copious, delicious London real-ales.

I worked on the native apps, desktop and mobile. Our team was small relative to the web team, but it was really something to get to work on iPhone apps when the App Store wasn’t even released yet, and that definitely was good for my career. Our desktop app was C++/Qt, the years of C++ took their toll and I'd not go back willingly. It's what made me write Homebrew in Ruby.

It was an instrumental (no pun intended) period of my life, my first step into startups, my first job in central London, I was 25 and the world was my oyster and I took it with both hands held out full.

I think what I will always remember best is the people, who were super smart, passionate and genuinely wonderful men and women. Many of them are still good friends of mine today.

jrgp

comment created time in a month

push eventmxcl/Path.swift

Deployment Bot (from Travis CI)

commit sha 25e482e46f083adc2480927491803a2a77b5b689

Deploy mxcl/Path.swift to github.com/mxcl/Path.swift.git:gh-pages

view details

push time in a month

delete tag mxcl/Path.swift

delete tag : deploy-1.0.1

delete time in a month

release mxcl/Path.swift

1.0.1

released time in a month

created tagmxcl/Path.swift

tag1.0.1

Delightful, robust, cross-platform and chainable file-pathing functions.

created time in a month

created tagmxcl/Path.swift

tagdeploy-1.0.1

Delightful, robust, cross-platform and chainable file-pathing functions.

created time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 260196a27a68a06db6998aedd72b9c4234a3ea7f

CodeCoverage++

view details

Max Howell

commit sha 6e1eeb158ae0e71da3af23ef869aa0dc1adf7355

No fatal on linux Swift < 5

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 070ba2d70654d529899c9f8000c59e90a4b7ba9d

CodeCoverage++

view details

Max Howell

commit sha fba7a024a658d5fe858d743376e9634013b66775

No fatal on linux Swift < 5

view details

push time in a month

pull request commentmxcl/swift-sh

Swift 5.2

Quite a few unexpected failures for the integration tests here.

mxcl

comment created time in a month

push eventmxcl/Path.swift

Max Howell

commit sha b88bd3f6600ba493ecf194ef8c1b145ab28a66fa

CodeCoverage++

view details

Max Howell

commit sha 54e2725ae9387335123bf060bf149e429df56c08

No fatal on linux Swift < 5

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha c1ad1bb5a0f9d5492047a67d2709f0ca6f8d558d

CodeCoverage++

view details

Max Howell

commit sha b94aed1b7627adccfa8fb685e524cca3c4f9e8e7

No fatal on linux Swift < 5

view details

push time in a month

push eventmxcl/swift-sh

Max Howell

commit sha ba354f22dd2a2622f27c23499a89dda3e67c8927

Swift 5.2; New deploy system

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha fa390cac930d782128e6467d3fc09d871a29b614

No fatal on linux Swift < 5

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 556b9c451eb4d1153d4e650bf5ddb02eee6b768e

No fatal on linux Swift < 5

view details

push time in a month

push eventmxcl/swift-sh

Max Howell

commit sha 4c77a35934b9a01ca47ac080d8b80a03c1aa6357

Swift 5.2; New deploy system

view details

push time in a month

push eventmxcl/swift-sh

Max Howell

commit sha 07d6a23fb86984f1809f207b8263602ac10b3cfa

Swift 5.2; New deploy system

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 5f6f8febc5f61a9f13275e89fc4ce26fde71014f

CodeCoverage++

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 0de9715b4692102cc1fdc2c971d3e82262b880ec

[ci skip] Update README.md

view details

Max Howell

commit sha 30d2da5e1e33148568590321a3639dfdfa5e59be

CodeCoverage++

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha eb9c571118415807e69a18013c15ac3e47cb0589

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 38fee605f9997bf3a7222decd6a02ec00f9827a6

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 6e4c629bf12b8be4d2b8f2834a66944247d55622

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 48f4dc9068dbae9f3c7c1ec0fc1f74c37dc85563

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 78596486faf257be56c85ab2bf4c17b3430f5afb

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha a6ca746543c2ff6abccb0587dc2560a44c111ac2

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 38fd40fe03a5f70bd9dd618d52f3c2d73ed81c5d

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 89e8aff7dcaaecedd5ffb5ed0326730590c1eb93

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 1d18d7c74440eb277c80955625634c28539105ff

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha d4e0d2695c9a308c70698c1bc45e756a4774d206

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha eb9e935dff4deb4e1d27b859f28f7e105f70903a

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 2309c6babbb8c9aa8e3498726f92032dc918bece

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 240d6999868cbf91694c79e8e903551aa8934857

Delete pushed version tag on failed deploy

view details

Max Howell

commit sha 7c039abc1095f8bc0ad23aa5c63c19a55be13835

[ci skip] Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 783037797de6e5efe5dc10588ff3a943539d4540

[ci skip] Fix documentation errors

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 8e62fe8133e35de5281ba8517d55a30a627250d5

Update README.md

view details

push time in a month

push eventmxcl/Path.swift

Deployment Bot (from Travis CI)

commit sha 8151ac2a2fcf69eb911444c11cc824124d9fd425

Deploy mxcl/Path.swift to github.com/mxcl/Path.swift.git:gh-pages

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha f062ed9ce3729fb3ba3f43573136d2a0e0c6d209

Fix CI deploy

view details

Max Howell

commit sha b63b5746dccc3d712ccb3b2307a8fc9a782b729c

Delete pushed version tag on failed deploy

view details

push time in a month

delete tag mxcl/Path.swift

delete tag : deploy-1.0.0

delete time in a month

release mxcl/Path.swift

1.0.0

released time in a month

created tagmxcl/Path.swift

tag1.0.0

Delightful, robust, cross-platform and chainable file-pathing functions.

created time in a month

delete tag mxcl/Path.swift

delete tag : 1.0.0

delete time in a month

push eventmxcl/homebrew-made

Max Howell

commit sha 4c3602e4ae4c236155dd1c1b71c24293dc784ec1

Fix using bottle on 10.14.4

view details

push time in a month

created tagmxcl/Path.swift

tag1.0.0

Delightful, robust, cross-platform and chainable file-pathing functions.

created time in a month

release mxcl/Path.swift

1.0.0

released time in a month

push eventmxcl/Path.swift

Max Howell

commit sha f1f7ee33b1ab87399f501ca4d21bd4792ea59b8a

[ci skip] List all support Swift

view details

push time in a month

push eventmxcl/swift-sh

Max Howell

commit sha a8acd4a46a12abfd436cea042ac1c217519be5e1

Swift 5.2; New deploy system

view details

push time in a month

created tagmxcl/Path.swift

tagdeploy-1.0.0

Delightful, robust, cross-platform and chainable file-pathing functions.

created time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 694d04f18b5d76c73662d09483305beee56d6ba5

Prepare 1.0.0 release

view details

push time in a month

PR merged mxcl/Path.swift

Prepare 1.0.0 release
+30 -21

0 comment

5 changed files

mxcl

pr closed time in a month

push eventmxcl/swift-sh

Max Howell

commit sha a811573ec457ba727be4aa70134d67081848c9f0

Swift 5.2; New deploy system

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 1bd8b139640dee44caa3878d954babe9e5ad6cec

Prepare 1.0.0 release

view details

push time in a month

PR opened mxcl/swift-sh

Swift 5.2
+49 -25

0 comment

1 changed file

pr created time in a month

create barnchmxcl/swift-sh

branch : Swift-5.2

created branch time in a month

push eventmxcl/Path.swift

Max Howell

commit sha 4a62675919576af339626db06bbd70f457ad530f

Prepare 1.0.0 release

view details

push time in a month

push eventmxcl/Path.swift

Max Howell

commit sha a6e8efab92dd80e909d18bdb3ec074a315d46c7f

Prepare 1.0.0 release

view details

push time in a month

PR opened mxcl/Path.swift

Prepare 1.0.0 release
+25 -6

0 comment

5 changed files

pr created time in a month

create barnchmxcl/Path.swift

branch : prepare-1.0.0

created branch time in a month

issue commentmxcl/swift-sh

Import local packages relative to the location of the script

ImportSpecification should know the script directory and pass it up IMO.

jboulter11

comment created time in a month

issue commentmxcl/PromiseKit

Multiple types of promises on when(fulfilled:)

I believe this is what you want:

https://github.com/mxcl/PromiseKit/blob/master/Documentation/Appendix.md#voiding-promises

superandrew

comment created time in a month

issue commentmxcl/swift-sh

Import local packages relative to the location of the script

Seems like a bug, the path should be calculated relative to the script path, not the working directory.

This should be fixed, rather than introducing new syntax.

PR welcome for sure.

jboulter11

comment created time in a month

push eventmxcl/homebrew-made

Travis

commit sha f0430e1236853158c54a18e10a13761a33d6e370

swift-sh 1.16.0

view details

push time in a month

push eventmxcl/ops

Max Howell

commit sha ece7dff2ace084793817c7561101294386fbbc6f

Recover from release already published Seems Github returning jSON with 422 stopped

view details

push time in a month

push eventmxcl/homebrew-made

Travis

commit sha 98b3f5e33416809b2fb9742bbbe199c8b9acd358

swift-sh 1.16.0

view details

push time in a month

push eventmxcl/homebrew-made

Travis

commit sha aba43c0ca4054370d01a86a04938c7d971479d8f

swift-sh 1.16.0

view details

push time in a month

created tagmxcl/swift-sh

tag1.16.0

Easily script with third-party Swift dependencies.

created time in a month

more