-
Notifications
You must be signed in to change notification settings - Fork 291
New Ignorelist Feature #1134
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
base: main
Are you sure you want to change the base?
New Ignorelist Feature #1134
Conversation
- use `mas ignore` and subcommands to manage adamid (or adamid + version number) ignore list - ignored adamid/adamid+version combinations in the list are ignored by `mas upgrade` and `mas outdated` commands only - includes new tests for the new functionality
|
@nmclaren Thanks for the PR submission. I haven't had time to read it through completely, but a few high-level notes:
What are your thoughts about the options listed above? |
|
@nmclaren Instead of comments on the code, some general feedback:
I'll review some more sometime over the next few days. |
|
Thanks for all of the feedback! Let me try and address some points...
|
|
Thanks for the detailed replies & the PR submission. Reply to your 6You might be able to use the new It should solve problems with non-oudated apps being reported outdated or being updated. Its drawbacks are:
If you have already tried Reply to your 1I, too, am using macOS 26.2, Xcode 26.2, and all the latest other software, You didn't get lint errors because you were on I get the following lint errors on $ git branch --show-current
feature_ignore
$ ./Scripts/lint
==> π¨ Linting mas 4.1.0-49-g8f00000ed-feature_ignore
--> πβ SwiftFormat
Sources/mas/Commands/Ignore.swift:70:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/Ignore.swift:71:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/Ignore.swift:71:1: error: (preferKeyPath) Convert trivial map { $0.foo } closures to keyPath-based syntax.
Sources/mas/Controllers/IgnoreList.swift:23:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Controllers/IgnoreList.swift:24:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:72:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:73:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:74:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:75:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:76:1: error: (indent) Indent code in accordance with the scope level.
Sources/mas/Commands/OutdatedAppCommand.swift:77:1: error: (indent) Indent code in accordance with the scope level.
Source input did not pass lint check.
3/84 files require formatting.
--> π¦
SwiftLint
Tests/MASTests/Models/MASTests+IgnoreEntry.swift:59:49: error: Force Unwrapping Violation: Force unwrapping should be avoided (force_unwrapping)
--> π¬ SwiftLint Analyze
--> π Periphery
--> π Periphery Tests
--> γ½οΈ Markdown
--> π YAML
--> π³ Git
--> π€ Zsh
--> π ActionLint
--> π ShellCheck
--> π· Non-ExecutablesOther questionsI will think about this all, read your code, and get back to you when I get the chance. Sorry for not having full answers for everything right now. |
- Disabled one linter check for force_unwrapping, which is encouraged in the style guide for tests
|
|
|
Thanks for updating the PR. I myself haven't yet run into rate limits with around 15-20 App Store apps installed. The just released 4.1.1 fixes up many problems, so Before fixes from 4.1.1 & other versions, some users with hundreds of apps ran into issues that might have been bad concurrency code (inherited from old mas code, but should now be fixed in 4.1.1), concurrent download overload technical issues (possibly fixed by the 16 max concurrent download cap), concurrent download rate limiting issues (possibly fixed by 16 max cap), or duration-based usage rate limiting issues. Hopefully, only the last would still possibly apply, though it might not even be a problem. I need to work with someone who has hundreds of apps, or make a testing user and download hundreds of apps to test myself. I'd prefer to do that on a virtual machine than in my main Mac file system, but I haven't setup virtual machines before, so that's another can of worms I'd prefer to open later. I'm trying to finish up some other mas work that I was already working on before you submitted your PR, and dealing with stuff outside mas, so it might be a bit before I can properly review everything, including thinking through Swift Configuration / a stopgap measure. I'd want any stopgap config storage to be able to be used directly by Swift Configuration once I start using it; I don't want to need to write code that converts from one config storage paradigm to another. Etc. Thanks again. |
|
Due to many issues with Xcode < 26, mas will probably require Xcode 26 very soon, which will allow mas to use Swift 6.2, which will allow mas to use Swift Configuration. The tentative mas road map is (with random small cleanup sprinkled throughout):
5.1.0, 5.2.0 & 5.3.0 might be reordered if anything gets too difficult (most likely to be shell completion, as I need to submit complex changes to SAP). I would like to finish 5.0.0, 5.1.0 & 5.2.0 before 5.3.0 because I am already in the middle of working on them
It will probably be simplest for me to integrate Swift Configuration & to implement ignoring / etc. myself. I will need to understand all the details of Swift Configuration, so no need for you to learn it all, too. The implementation of ignoring, etc. should be simple once Swift Configuration is setup. I'll happily discuss the feature set for ignoring / etc. once I'm done with the other work, so I can work on it without too much context switching. Do you mind if I write my solution from the ground up after discussions? I will share with you any PR I write so you can review it. |
|
No problem. Do whatever feels right to you. I'd be happy to review it when the time comes. Cheers! |
|
Thanks. |
Description
This PR adds a new
ignorecommand that allows users to exclude specific apps or app versions from updates. Users can ignore individual versions or all versions of an app, with the ignore list persisting between sessions.Motivation and Context
Users need the ability to prevent certain apps from being updated, either permanently or for specific versions. Common use cases:
How Has This Been Tested?
Test coverage includes:
Command line examples:
Types of changes
Additional Notes
Implementation Details
~/Library/Application Support/mas/ignore.jsonupdateandoutdatedcommandsFiles Changed
Added (6 files):
Sources/mas/Commands/Ignore.swift- Command implementationsSources/mas/Controllers/IgnoreList.swift- Ignore list managerSources/mas/Models/IgnoreEntry.swift- Data modelTests/MASTests/Commands/MASTests+Ignore.swift- Command testsTests/MASTests/Controllers/MASTests+IgnoreList.swift- Controller testsTests/MASTests/Models/MASTests+IgnoreEntry.swift- Model testsModified (2 files):
Sources/mas/Commands/OutdatedAppCommand.swift- Added filteringSources/mas/Commands/MAS.swift- Registered subcommandUsage Documentation
All subcommands include comprehensive help via
mas ignore <subcommand> --help