Skip to content
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

Plugin loading adjustment (RDMP-130) #1716

Merged
merged 8 commits into from
Jan 8, 2024
Merged

Conversation

jas88
Copy link
Member

@jas88 jas88 commented Jan 4, 2024

Use rdmpplugins.txt to control plugin loading instead of blindly loading any old nupkg file, workaround for autoupdater leaving old plugin files (and other debris which we should address better at some point!) lying around.
Falls back on previous behaviour (load *.nupkg) if no rdmpplugins.txt file exists.

@jas88 jas88 requested a review from JFriel January 4, 2024 16:30
@jas88 jas88 changed the title Plugin loading adjustment Plugin loading adjustment (RDMP-130) Jan 4, 2024
Rdmp.Core/Curation/Data/LoadModuleAssembly.cs Dismissed Show dismissed Hide dismissed
@@ -241,8 +242,7 @@
/// <param name="notifier"></param>
private static void LoadMEF(ICatalogueRepository catalogueRepository, ICheckNotifier notifier)
{
foreach (var (name, body) in Directory.EnumerateFiles(AppDomain.CurrentDomain.BaseDirectory, "*.nupkg")
.SelectMany(LoadModuleAssembly.GetContents))
foreach (var (name, body) in LoadModuleAssembly.PluginFiles().SelectMany(LoadModuleAssembly.GetContents))

Check notice

Code scanning / CodeQL

Missed 'using' opportunity Note

This variable is manually
disposed
in a
finally block
- consider a C# using statement as a preferable resource management technique.
Copy link
Collaborator

@JFriel JFriel left a comment

Choose a reason for hiding this comment

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

I think we will need to revisit this for a long-term view on how to handle plugins (perhaps with the future MSI work) but this will handle the immediate problem we say Early January

@JFriel JFriel merged commit b4c37ed into develop Jan 8, 2024
2 checks passed
@JFriel JFriel deleted the feature/pickypluginloader branch January 8, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants