Skip to content

Conversation

@Mrcubix
Copy link
Contributor

@Mrcubix Mrcubix commented Aug 28, 2025

This fixes an issue where even after updating the plugin, it wouldn't save the metadata to a file & the UX wouldn't load the updated metadata.

Closes #720

@gonX gonX requested a review from Kuuuube August 28, 2025 13:56
gonX
gonX previously approved these changes Aug 28, 2025
Copy link
Member

@gonX gonX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, will wait for @Kuuuube to test if this works as requested

@gonX gonX added bug Something isn't working plugins Plugin or Plugin API related labels Aug 30, 2025
@gonX gonX added this to the v0.6.5.2 milestone Aug 30, 2025
Copy link
Member

@Kuuuube Kuuuube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is fetching the wrong metadata (not checking the supported versions?). Tested installing chatter exterm and got a version with metadata set at 0.5.0.0.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Aug 31, 2025

Fixed the conflict & Added a missing check (also now re-using a linq query).

I do wonder if it wouldn't be just better to have a new property that stores the updated Metadata to avoid calling GetUpdatedMetadatas twice.

@Mrcubix Mrcubix requested a review from Kuuuube August 31, 2025 14:17
@Kuuuube
Copy link
Member

Kuuuube commented Sep 1, 2025

Gave it another test. Clicking the install button for a plugin in the plugin repo doesn't seem to do anything.

Updating a plugin gives Attempted to load the plugin x when it is already loaded. The old plugin is still held onto.

Uninstalling and installing a plugin does seem to work fine here without a restart.

Test case for a plugin that can be updated through the plugin repo: Hover Distance Limiter.zip

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

  1. Can't reproduce the issue,
  2. The message is normal as OTD Load the plugins multiple times, every single time you install or update one.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

If anything, the message tells me that it indeed worked as it probably loaded the new instance

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

Try this one out, doubt it will be much different.

@Kuuuube
Copy link
Member

Kuuuube commented Sep 1, 2025

It looks mostly good now but the UX filters list (probably tools and output modes too?) doesn't update. Plugins install just fine. Plugins update fine on the daemon's side, files get replaced without any issue.

Test case to easily see this:
Hover Distance Limiter.zip

Hover Distance Limiter with a radial follow dll inside it. When updated it should refresh the filters list to show hover distance limiter instead of still showing radial follow. If you only test this with a plugin update that doesn't add/remove/rename filters this pr should work fine in it's current state.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

https://i.imgur.com/nbQDgoo.png
image

2025-09-01.17-57-55.mp4

Doesn't happen on my side, list is updated.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

image

Ok nvm, this is an issue.

... To be fixed in another PR cause it's completely unrelated to what is done here

@Kuuuube
Copy link
Member

Kuuuube commented Sep 1, 2025

Alright, I'll give it another test later and approve if I don't see any regressions. The list not refreshing isnt a regression since it was already broken anyways.

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

AppInfo.PluginManager.GetChildTypes<TSource>() returns the type, meaning it's not removed from somewhere.

It's supposed to be removed, but it seems like a race condition is occuring, and the context sees its Assemblies seemingly magicly modified before the types are removed.

Also, it still loaded in the Daemon side

image

@Mrcubix
Copy link
Contributor Author

Mrcubix commented Sep 1, 2025

I'm having an actual massive headache understanding this mess.

Why is the Temp folder only removed if there is nothing inside.
There is something missing but no comments to help.

@Kuuuube Kuuuube merged commit 365a5ce into OpenTabletDriver:0.6.x Sep 1, 2025
9 checks passed
@Mrcubix Mrcubix deleted the plugin-manager-metadata-desync branch September 1, 2025 20:38
@gonX gonX mentioned this pull request Dec 6, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working plugins Plugin or Plugin API related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants