profile
viewpoint
Mike Lewis MPLew-is Santa Clara, CA, USA

MPLew-is/apache-config 3

Apache configuration management script, inspired by a2enmod and co.

MPLew-is/homebrew-blend 1

Metaformulae for homebrew

MPLew-is/bash-git-prompt 0

An informative and fancy bash prompt for Git users

MPLew-is/homebrew-experimental 0

Homebrew tap for experimental formula

MPLew-is/resume-printer 0

Prints an HTML resume to PDF using Puppeteer, designed for use as a submodule

MPLew-is/xc3sprog 0

Suite of utilities for programming Xilinx FPGAs, CPLDs, and EEPROMs with the Xilinx Parallel Cable and other JTAG adapters under Linux (and now macOS)

PublicEvent

push eventapple/swift-argument-parser

Nate Cook

commit sha 3cc904427fdbca3319b390c5e87e43872c701e15

Update reference to `master` branch (#242)

view details

Johannes G

commit sha d424bca0ec66ec0e3888ebdc118379d348a67da3

Make it clear that Foundation has to be imported (#246) It's not from the get-go clear for beginners that Foundation has to be imported as well. Otherwise, you would end up with a bunch of compilation errors.

view details

Saleem Abdulrasool

commit sha 8492882b030ad1c8e0bb4ca9d9ce06b07a8150b2

Windows: migrate to `CRT` from `MSVCRT` (#249) The Windows environment calls the library `CRT`. This also enables the removal of the `visualc` module from the Swift SDK overlay.

view details

CypherPoet

commit sha bb370a320b229aa8f9eb0352d4fbc6e9874325f8

Fix small typo in `CommandConfiguration` documentation (#252)

view details

Daniel Müllenborn

commit sha d633b4370ee0cfc03e584084bf4ab6d4e83c037d

[Windows] Don't try to detect shell. (#253)

view details

Sergey Petrachkov

commit sha 53555a04503c175eaffcf587e4b8c380a7c41a5c

Support Exit codes from thrown CustomNSError conformers (#244) Introduce customnserror support, so exit code is calculated correctly, resolves #243.

view details

Max Desiatov

commit sha 4273ad222e6c51969e8585541f9da5187ad94e47

Add support for Apple Silicon in SwiftSupport.cmake (#257) This matches the behavior of [a similar `elseif` branch in the Swift toolchain itself](https://github.com/apple/swift/blob/b80e4bf8f866be26a4108bd92f97b2a182662642/CMakeLists.txt#L594).

view details

Drew McCormack

commit sha 41f5fe52a34b2c7b9938996387fabfaca21918bd

Gave a more descriptive error message for when a non-argument variable causes a parsing failure. (#256)

view details

Nate Cook

commit sha 9564d61b08a5335ae0a36f789a7d71493eacadfc

Update changelog for 0.3.2 release (#261)

view details

Md Abir Hasan Zoha

commit sha d80c0172d8f5a1f707e8471bc0551f9833adbbfe

Add custom helpNames support for Subcommand (#251) If helpNames is not modified, Subcommand will inherit helpNames from its immediate parent. The helpNames is generated from `commandStack: [ParsableCommand.Type]`. `getHelpNames()` extension method of `Array` is order sensitive and assumes that the element of `commandStack` at indexed `i` is the parent of the element at indexed `i+1`

view details

Nate Cook

commit sha 2a4664a40b8156f113512f17c4e272cfa84b20e0

Add support for joined short options (#240) This supports joined arguments, like '-Ddebug' or '-v4'. Joined arguments need to be explicitly declared as `.customShort("D", allowingJoined: true)`.

view details

Nate Cook

commit sha 9fe9374a1fbf1f2364b7e4cbc8dfd4e970723f32

Remove deprecated property wrapper initializers (#262)

view details

Nate Cook

commit sha 75c4dcd2e7cd0878aa1d29e6b493a8abcd65d753

Use the correct help flag in error messages (#263)

view details

Nate Cook

commit sha 52eb453ef2e8cf396cb223efad6b7f75e1401406

Set up jazzy configuration

view details

push time in 6 days

push eventapple/swift-argument-parser

Nate Cook

commit sha 75c4dcd2e7cd0878aa1d29e6b493a8abcd65d753

Use the correct help flag in error messages (#263)

view details

push time in 11 days

delete branch apple/swift-argument-parser

delete branch : nate/errors_custom_help_flag

delete time in 11 days

PR merged apple/swift-argument-parser

Use the correct help flag in error messages

Error messages include a message that shows how to display the help screen, but the message didn't use the custom help flag names for a command if they had been specified.

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+34 -18

1 comment

6 changed files

natecook1000

pr closed time in 11 days

pull request commentapple/swift-argument-parser

Use the correct help flag in error messages

@swift-ci Please test

natecook1000

comment created time in 12 days

PR opened apple/swift-argument-parser

Use the correct help flag in error messages

Error messages include a message that shows how to display the help screen, but the message didn't use the custom help flag names for a command if they had been specified.

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+34 -18

0 comment

6 changed files

pr created time in 12 days

create barnchapple/swift-argument-parser

branch : nate/errors_custom_help_flag

created branch time in 12 days

push eventapple/swift-argument-parser

Nate Cook

commit sha 9fe9374a1fbf1f2364b7e4cbc8dfd4e970723f32

Remove deprecated property wrapper initializers (#262)

view details

push time in 12 days

delete branch apple/swift-argument-parser

delete branch : nate/deprecation_eradication

delete time in 12 days

PR merged apple/swift-argument-parser

Remove deprecated property wrapper initializers

These were deprecated in version 0.2.0. Time to go!

+2 -370

2 comments

6 changed files

natecook1000

pr closed time in 12 days

pull request commentapple/swift-argument-parser

Remove deprecated property wrapper initializers

@swift-ci Please test

natecook1000

comment created time in 12 days

push eventapple/swift-argument-parser

Nate Cook

commit sha 2a4664a40b8156f113512f17c4e272cfa84b20e0

Add support for joined short options (#240) This supports joined arguments, like '-Ddebug' or '-v4'. Joined arguments need to be explicitly declared as `.customShort("D", allowingJoined: true)`.

view details

push time in 12 days

delete branch apple/swift-argument-parser

delete branch : nate/join_us

delete time in 12 days

PR merged apple/swift-argument-parser

Add support for joined short options

Description

This supports joined arguments, like '-Ddebug' or '-v4'. Joined arguments need to be explicitly declared as .customShort("D", allowingJoined: true).

Detailed Design

You can now specify a Boolean allowingJoined value when declaring a custom short name specification, like this:

@main
struct Example: ParsableCommand {
    @Option(name: .customShort("D", allowingJoined: true))
    var debugValue: String

    func run() {
        print(debugValue)
    }
}

Existing calls still work as expected:

$ example -D debug
debug
$ example -D=debug
debug

And now you can use joined syntax:

$ example -Ddebug
debug

Documentation Plan

Expanded the documentation for .customShort(_:allowingJoined:) on both NameSpecification and NameSpecification.Element.

Test Plan

Unit tests covering the breadth of usage.

Source Impact

This is an additive change only, users must opt into the new functionality.

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+329 -13

1 comment

9 changed files

natecook1000

pr closed time in 12 days

pull request commentapple/swift-argument-parser

Remove deprecated property wrapper initializers

@swift-ci Please test

natecook1000

comment created time in 12 days

PR opened apple/swift-argument-parser

Remove deprecated property wrapper initializers

These were deprecated in version 0.2.0. Time to go!

+2 -370

0 comment

6 changed files

pr created time in 12 days

create barnchapple/swift-argument-parser

branch : nate/deprecation_eradication

created branch time in 12 days

pull request commentapple/swift-argument-parser

Add support for joined short options

@swift-ci Please test

natecook1000

comment created time in 12 days

PR closed apple/swift-argument-parser

Reviewers
Render version in help output

I believe this is generally useful information to have, if it's been specified.

This was requested by a SwiftLint user who's been generous enough to try out a version of the tool that's integrated this library: https://github.com/realm/SwiftLint/issues/1088#issuecomment-745738042

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+22 -3

8 comments

5 changed files

jpsim

pr closed time in 12 days

pull request commentapple/swift-argument-parser

Render version in help output

Alright — given that, I think we already have enough support for adding the version in the abstract and overview. Thanks again for opening this!

jpsim

comment created time in 12 days

push eventapple/swift-argument-parser

Nate Cook

commit sha d4d2fc29fdf2ce8646c28f0d85972fe531a867a7

Finish filling out joined tests

view details

push time in 12 days

push eventapple/swift-argument-parser

Md Abir Hasan Zoha

commit sha d80c0172d8f5a1f707e8471bc0551f9833adbbfe

Add custom helpNames support for Subcommand (#251) If helpNames is not modified, Subcommand will inherit helpNames from its immediate parent. The helpNames is generated from `commandStack: [ParsableCommand.Type]`. `getHelpNames()` extension method of `Array` is order sensitive and assumes that the element of `commandStack` at indexed `i` is the parent of the element at indexed `i+1`

view details

push time in 12 days

PR merged apple/swift-argument-parser

Add custom helpNames support for Subcommand

Modifying help flag names now works for subcommand. If not specified helpNames is inherited from parent. This PR is compatible with the current system.

Fix #215

Checklist

  • [x] I've added at least one test that validates that my change is working, if appropriate
  • [x] I've followed the code style of the rest of the project
  • [x] I've read the Contribution Guidelines
  • [x] I've updated the documentation if necessary
+97 -15

2 comments

5 changed files

Zoha131

pr closed time in 12 days

issue closedapple/swift-argument-parser

Modifying help flag names does not work for subcommands

modifying-the-help-flag-names does not work for subcommands.

Possibly related to #36.

Checklist

  • [x] If possible, I've reproduced the issue using the master branch of this package
  • [x] I've searched for existing GitHub issues

Steps to Reproduce

struct FeatherFeed : ParsableCommand {
    static var configuration = CommandConfiguration(
        abstract: "FeatherFeed backend application.",
        subcommands: [Run.self],
        defaultSubcommand: Run.self
    )

    ...
}


extension FeatherFeed {
    struct Run : ParsableCommand {
        static var configuration = CommandConfiguration(
            abstract: "Runs the FeatherFeed application.",
            helpNames: [.long, .customShort("?")]
        )
        
        @Option(name: .shortAndLong, help: "The host the server will run on.")
        var host: String = "::1"
        
        @Option(name: .shortAndLong, help: "The port the server will run on.")
        var port: Int = 8080
    
        ...
    }
}

Expected behavior

> swift run feather-feed run --help
OVERVIEW: Runs the FeatherFeed application.

USAGE: feather-feed run [--host <host>] [--port <port>]

OPTIONS:
  -h, --host <host>       The host the server will run on. (default: ::1)
  -p, --port <port>       The port the server will run on. (default: 8080)
  -?, --help              Show help information.

Actual behavior

> swift run feather-feed run --help
OVERVIEW: Runs the FeatherFeed application.

USAGE: feather-feed run [--host <host>] [--port <port>]

OPTIONS:
  -h, --host <host>       The host the server will run on. (default: ::1)
  -p, --port <port>       The port the server will run on. (default: 8080)
  -h, --help              Show help information.

Discussion

Apparently subcommands are inheriting the helpNames configuration from the parent command. If I change helpNames for the FeatherFeed command, the Run subcommand inherits the -? flag.

closed time in 12 days

paulofaria

pull request commentapple/swift-argument-parser

Add custom helpNames support for Subcommand

@swift-ci Please test

Zoha131

comment created time in 12 days

pull request commentapple/swift-argument-parser

Add custom helpNames support for Subcommand

Thanks so much for fixing this, @Zoha131! :clap:

Zoha131

comment created time in 12 days

created tagapple/swift-argument-parser

tag0.3.2

Straightforward, type-safe argument parsing for Swift

created time in 12 days

release apple/swift-argument-parser

0.3.2

released time in 12 days

delete branch apple/swift-argument-parser

delete branch : nate/changelog_release_0.3.2

delete time in 12 days

more