Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fixes to better support packages with multiple origins and multiple executables #170

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

acecilia
Copy link
Contributor

@acecilia acecilia commented Apr 6, 2020

Added fixes to cover the following two scenarios:
1- When a package with the same name is installed from different origins. For example: yonaskolb/xcodegen and acecilia/xcodegen.
2- When a package produces multiple executables.

The main additions of this PR are:

  1. A rewrite of the list option.
  2. A fix for the run option, so it asks for which package to run when multiple origins are detected, instead of just running the first match.
  3. A rewrite of the uninstall option, which includes the following fix: previously, the name for the symlink to remove was calculated using the passed package name, which could be partial (for example sample instead of samplepackage), resulting on the symlink not being removed. Also added tests

@acecilia acecilia force-pushed the package_list_fix branch 2 times, most recently from bfb781d to 11d701e Compare April 6, 2020 20:47
@acecilia acecilia marked this pull request as ready for review April 6, 2020 22:54
@acecilia acecilia changed the title Added fixes to support packages with multiple origins and multiple executables Added fixes to better support packages with multiple origins and multiple executables Apr 6, 2020
@acecilia acecilia force-pushed the package_list_fix branch 3 times, most recently from 406b5a7 to 11d6aa4 Compare April 7, 2020 12:39
Copy link
Owner

@yonaskolb yonaskolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic PR @acecilia! 👏

CHANGELOG.md Outdated Show resolved Hide resolved
acecilia added a commit to acecilia/Mint that referenced this pull request Apr 13, 2020
…rt when a package with the same name is installed from different origins (for example: yonaskolb/xcodegen and acecilia/xcodegen). [yonaskolb#170](yonaskolb#170) @acecilia

- Rewrite the `list` option, to better support when a package produces multiple executables. [yonaskolb#170](yonaskolb#170) @acecilia
- Rewrite and fix the `uninstall` option: previously, the name for the symlink to remove was calculated using the package name passed from command line, which could be partial (for example `simple` instead of `simplepackage`), resulting on the symlink not being removed. [yonaskolb#170](yonaskolb#170) @acecilia
acecilia added a commit to acecilia/Mint that referenced this pull request Apr 13, 2020
…rt when a package with the same name is installed from different origins (for example: yonaskolb/xcodegen and acecilia/xcodegen). [yonaskolb#170](yonaskolb#170) @acecilia

- Rewrite the `list` option, to better support when a package produces multiple executables. [yonaskolb#170](yonaskolb#170) @acecilia
- Rewrite and fix the `uninstall` option: previously, the name for the symlink to remove was calculated using the package name passed from command line, which could be partial (for example `simple` instead of `simplepackage`), resulting on the symlink not being removed. [yonaskolb#170](yonaskolb#170) @acecilia
@acecilia
Copy link
Contributor Author

This PR I think solves #124 and makes #125 redundant

…rt when a package with the same name is installed from different origins (for example: yonaskolb/xcodegen and acecilia/xcodegen). [yonaskolb#170](yonaskolb#170) @acecilia

- Rewrite the `list` option, to better support when a package produces multiple executables. [yonaskolb#170](yonaskolb#170) @acecilia
- Rewrite and fix the `uninstall` option: previously, the name for the symlink to remove was calculated using the package name passed from command line, which could be partial (for example `simple` instead of `simplepackage`), resulting on the symlink not being removed. [yonaskolb#170](yonaskolb#170) @acecilia
XCTAssertEqual(cache.list, """
SimplePackage (https://github.com/yonaskolb/SimplePackage.git)
- 4.0.0
SimplePackage (https://github.com/acecilia/SimplePackage.git)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have other account you prefer to rely on, instead of mine, I can change this

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally fine, if it sticks around 👍

@yonaskolb yonaskolb merged commit 7ef6a71 into yonaskolb:master Apr 13, 2020
discoverilla added a commit to discoverilla/Mint that referenced this pull request Jun 10, 2022
…rt when a package with the same name is installed from different origins (for example: yonaskolb/xcodegen and acecilia/xcodegen). [#170](yonaskolb/Mint#170) @acecilia (#170)

- Rewrite the `list` option, to better support when a package produces multiple executables. [#170](yonaskolb/Mint#170) @acecilia
- Rewrite and fix the `uninstall` option: previously, the name for the symlink to remove was calculated using the package name passed from command line, which could be partial (for example `simple` instead of `simplepackage`), resulting on the symlink not being removed. [#170](yonaskolb/Mint#170) @acecilia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants