Remove `lucky` after providing replacements
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 12.4k
- Forks
- 299
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
Remove lucky after providing better replacements.
MASError.noCatalogAppsFound➡MASError.error.- Deduplicate
Get&Install
It is non-deterministic. It complicates the UX. It should not be used.
The best ways to replace it are to:
- provide tab-completion that searches the iTunes Search API for the typed text, but that replaces the typed text with an app ID.
- accept deterministic bundle IDs everywhere app IDs are accepted as arguments. Also, it is more obvious that the bundle ID
com.apple.iWork.Pagesreferences Apple's Pages app than that the app ID409201541references that same Pages app.
If both the above are implemented. tab completion would try to complete installed app IDs when a number is typed where an app ID for an installed app would be appropriate (like for mas upgrade, but not for mas purchase), and to complete bundle IDs & to search the App Store like mas search (for commands like mas purchase) or search installed app names (for commands like mas uninstall).
Another possible associated change: tab completion could complete to bundle IDs instead of to app IDs.
In fact, bundle IDs should probably be preferred over app IDs, and we should output bundle IDs everywhere we output app IDs to facilitate everyone using bundle IDs instead of app IDs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CLI entry points for mas search, mas upgrade, mas purchase, and mas uninstall, along with MASError.noCatalogAppsFound and the Get and Install paths. Done means the proposed tab-completion and bundle-ID replacements are available and lucky is no longer used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100