keepUnused flag not respected for entries under [versions]
See original GitHub issueThis use-case might be a misuse of the version catalog but our project stores versions that while aren’t referenced within the TOML file, they are referenced by the project (e.g. compileSdk
version used in android gradle plugin).
android {
compileSdk = libs.versions.compileSdk.get().toInt()
}
I assumed setting keepUnused = true
would solve this but “unused” version declarations were still removed when running versionCatalogUpdate
. I did verify that keepUnused = true
was indeed working for unused library declarations.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Arm Compiler Errors and Warnings Reference Guide Version ...
The Arm Compiler Errors and Warnings Reference Guide provides lists of the errors and warnings that each of the compilation tools can generate....
Read more >Accessing, Defining & Managing System Preferences ... - Altium
This page provides a landing point to the preferences in Altium Designer. You can set up various preferences across different functional ...
Read more >US7475093B2 - Memory cache management in XML/relational data ...
With respect to hash tables and hash entry keys, three types of cache stores ... At 302, caches are not allowed to keep...
Read more >Retain 4.9.2: Configuration and Administration
Retain is not a backup/restore system. About This Guide. This is the administrative documentation for Retain Unified Archiving version 4.9.2.
Read more >ifs.astroscu.unam.mx/sfsanchez/FIT3D/README_FIT3D.txt
FIT3D # # Version 1.1 # FIT3D comprises routines to fit stellar continuum and gas ... to define 5 entries: (1) The input...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, these versions do not fit the definition of “used in dependencies” - they’re simply referenced in
build.gradle
files.@keep
-ing them individually probably makes sense to me, since version catalog is not really designed for storing non-dependency versions, so@keep
is a small price to pay for convenience!Hmm there are tests for that I think so if you have a small reproducible case where used versions (used in dependencies!) are removed then I’d be interested in that.
Versions that are used like in the example, not used in any dependency, will always need a keep configuration. You don’t need to keep all versions in recent versions of the plugin, you can specify exactly which one to keep using config or
# @keep
as a comment above the version you want to keep, see the readme for details on that.