asdf
asdf copied to clipboard
feat: Cleanup invalid shims
Summary
Adds a new function cleanup_invalid_shim_metadata
.
This function looks for references to non-installed plugins for the given plugin, and removes this metadata.
Also, adds a check in check_if_plugin_exists
that filters out '..' as a plugin name.
Related: #1029 Closes: #1098
Thanks for the PR @Kaylebor, however, I do not believe anyone has figured out what is causing this bug. Somewhere in the asdf codebase there is an expression that is introducing ..
as a plugin name. We need to find that code and correct it. Your changes are nice, and I appreciate you taking the time to create this PR, but I'd like fix the root cause rather than just removing ..
whenever it appears. Thoughts?
Thanks for the PR @Kaylebor, however, I do not believe anyone has figured out what is causing this bug. Somewhere in the asdf codebase there is an expression that is introducing
..
as a plugin name. We need to find that code and correct it. Your changes are nice, and I appreciate you taking the time to create this PR, but I'd like fix the root cause rather than just removing..
whenever it appears. Thoughts?
@Stratus3D no problem, I'm a newcomer here so I don't really have the full picture of the code in mind when making this suggestion. And I also agree that fixing the root cause would be the preferred approach, as this shouldn't happen in the first place.
Still, I'd argue that having some way to clean shim metadata would be useful for fixing/troubleshooting issues like this in the future; that's why this function doesn't explicitly look for ..
, but instead checks if the plugin exists in the plugins folder.
In order to keep reshim
simple, maybe locking such functionality behind a new flag or command would be better.
Do you see value in any of these approaches?