Add utility function to check hash database for missing tags#91
Draft
bs2609 wants to merge 1 commit intoauthorblues:mainfrom
Draft
Add utility function to check hash database for missing tags#91bs2609 wants to merge 1 commit intoauthorblues:mainfrom
bs2609 wants to merge 1 commit intoauthorblues:mainfrom
Conversation
Contributor
Author
|
As a minor note from while I was looking at this, there's another Newer Lua cleanup opportunity to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As much of a suggestion with code attached as anything else, so it's open to changes around the concept and implementation.
For the benefit of the damage shuffler plugins that use the "hash database" format, this adds a function that takes [a table which maps tags to 'truthy' values] and [a hash -> tag db file] and returns two lists, which are the relative differences of the sets of tags in each (i.e. tags in the file but not the table, and tags in the table but not the file). If both sets are the same, the lists will be empty.
This is specifically and probably exclusively useful for validating the consistency of these files, especially around bulk additions where it's easy for a missing tag to go unnoticed until later when things break.
However, a) it's hard to do this other ways, b) code locality here is good for consistency, c) these mistakes do keep happening.