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

Refactor scripts engine #11242

Merged
merged 2 commits into from
Oct 7, 2023
Merged

Conversation

RussKie
Copy link
Member

@RussKie RussKie commented Oct 4, 2023

This is a foundation for #10866 as well as #11239.

Proposed changes

  • Make the scripts manager and the runner DI friendly.
  • Refactor and clean up the API surface

⚠️ Please note, there are some hacks related to hotkeys management because HotkeySettingsManager is not DI-friendly. It must be refactored to become one, and I have some private drafts that'd enable that; so that is coming in the future.

⚠️ Please also note, this is a "stepping stone" kind of change to enable further improvements such as making HotkeySettingsManager DI-friendly and allow load/persistence of per-repo scripts.

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@mstv
Copy link
Member

mstv commented Oct 6, 2023

Some more tests need an IScriptsManager instance.

@RussKie
Copy link
Member Author

RussKie commented Oct 6, 2023 via email

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

Should work

GitUI/GitModuleForm.cs Outdated Show resolved Hide resolved
GitUI/GitModuleControl.cs Outdated Show resolved Hide resolved
GitUI/GitModuleControl.cs Show resolved Hide resolved
GitUI/CommandsDialogs/FormBrowse.cs Show resolved Hide resolved
GitUI/ScriptEngine/ScriptsManager.cs Outdated Show resolved Hide resolved
GitUI/ScriptEngine/ScriptsManager.cs Outdated Show resolved Hide resolved
GitUI/ScriptEngine/ScriptsManager.ScriptRunner.cs Outdated Show resolved Hide resolved
@RussKie RussKie force-pushed the refactor_scripts branch 4 times, most recently from 94e7a83 to 74b0fac Compare October 7, 2023 05:29
@RussKie
Copy link
Member Author

RussKie commented Oct 7, 2023

I consider this iteration of the refactor complete and don't expect changes here. I believe this is sufficient to enable #10866, #11239 and HotkeySettingsManager rework (which also requires #11235).

* Make the scripts manager and the runner DI friendly.
* Refactor and clean up the API surface
@RussKie RussKie merged commit a0d8a30 into gitextensions:master Oct 7, 2023
4 checks passed
@RussKie RussKie deleted the refactor_scripts branch October 7, 2023 13:39
@ghost ghost added this to the vNext milestone Oct 7, 2023
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