What’s the right way to create a command line tool using ArgumentParser? `swift package` or Xcode create Mac command line tool project?

Thank you for your test! I should have tried using Spinner package on a brand new project. As you've verified, adding Spinner dependency works fine on newly a created project.

However, my problem occur when I add Spinner dependency to my existing project. But knowing Spinner does indeed works fine, so I look at the error closely and it's dependency conflict:

Failed to resolve dependencies Dependencies could not be resolved because root depends on 'rainbow' 4.0.1..<5.0.0 and root depends on 'spinner' 1.0.0..<2.0.0.
'spinner' 1.0.0..<2.0.0 practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.4.0 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.4.1 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.3.1 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.3.2 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.3.1, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.2.1 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.3.0 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.2.1, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.1.6 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.2.0 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.1.6, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.1.4 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.1.5 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.1.4, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.1.2 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.1.3 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.1.2, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.1.0 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.1.1 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.0.5 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.0.6 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.0.5, 1.0.7..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.0.3 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.0.4 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.0.3, 1.0.7..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.0.1 depends on 'rainbow' 3.0.0..<4.0.0 and 'spinner' 1.0.2 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0..<1.0.1, 1.0.7..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because 'spinner' 1.0.0 depends on 'rainbow' 3.0.0..<4.0.0.
'spinner' {1.0.0, 1.0.7..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} practically depends on 'rainbow' 3.0.0..<4.0.0 because no versions of 'spinner' match the requirement {1.0.7..<1.1.0, 1.1.7..<1.2.0, 1.2.2..<1.3.0, 1.3.3..<1.4.0, 1.4.2..<2.0.0} and 'spinner' 1.0.0 depends on 'rainbow' 3.0.0..<4.0.0.

So I'm using a newer version of Rainbow but Spinner depends on an older version. So I just remove my Rainbow dependency and problem solve.

What if I want to use the latest version of Rainbow? Can I make the Spinner use my newer Rainbow?