Skip to content

Feature/#610 Configure plugin locations - #611

Open
kaklakariada wants to merge 20 commits into
mainfrom
feature/#610_configure_plugin_locations
Open

kaklakariada wants to merge 20 commits into
mainfrom
feature/#610_configure_plugin_locations

Conversation

@kaklakariada

Copy link
Copy Markdown
Contributor

Closes #610

@redcatbear

Copy link
Copy Markdown
Collaborator

61 files. Dude, you are killing me! 🤣

I will do my very best to stay focused on the review.

Comment thread api/.settings/org.eclipse.jdt.ui.prefs
@kaklakariada
kaklakariada marked this pull request as ready for review October 5, 2026 11:21
Comment thread doc/spec/design.md
Comment on lines +201 to +202
loads each configured plugin through a single separate ClassLoader, matching the semantics of
a plugin directory under `$HOME/.oft/plugins/<plugin-name>/`. A plugin's JAR files may contain

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"matching the semantics of" is hard to understand. Please rephrase.

{
final Path jar = createJar("plugin.jar");
final Oft oft = Oft.builder().addPlugin("my-plugin", jar).build();
assertThat(oft, instanceOf(OftRunner.class));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Completeness: This lacks a check whether adding the plugin did anything.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Correctness. I know you did not change the file name. But when I look at this, it looks more like an integration test than a unit test.


private static Path defaultPluginsDirectory()
{
return Path.of(System.getProperty("user.home")).resolve(".oft").resolve("plugins");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Praise: very good. I was struggling with whether the directory should be .openfasttrace or .oft. But since the binary is oft, the name you chose is probably better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The name was already defined before, this just appeared during refactoring.

/**
* Builder for creating {@link Oft} instances with custom configuration.
* <p>
* Use this builder to configure additional plugins that OFT should load at runtime in addition to the plugins

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maintainability: while this sentence is technically true, it might not survive changes. A more generic mention of custom configuration would be more robust.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Uniformity: Have you considered inlining the Builder as Oft.Builder? I think that is how we did it in other builders and we should keep that structure.

assertThat(plugin.getJars(), contains(jar1, jar2));
}

@Test

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maintainability: Could you combine the similar bad-weather cases as parameterized test, please?

@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🔨 In Progress

Development

Successfully merging this pull request may close these issues.

Allow adding plugins via configuration

2 participants