[Feature] Load plugins when Genie starts, as in Genie 4
Maintainers usually reply within 5 days
Assessment
This issue has not been assessed yet.
Description
The use case
In Genie 4 a plugin was loaded as soon as the program started. In Genie 5 a plugin is not loaded until I connect or type something.
Started and left alone, Genie 5 has no plugins. Plugins ▸ Reload Plugins answers:
[plugin] connect first to (re)load plugins.
After any typed line, even #echo hello, the plugins load, without a connection, and they stay loaded through disconnects. The same menu entry then answers [plugin] 1 plugin(s) loaded.
So a plugin that is meant to be there from the start is not. One that opens its own window, keeps a timer, or talks to another program on the same computer does nothing until a line is typed into that Genie. I run one Genie per character, so that is one line per window every time I start them.
Proposed solution
Load the plugins when the program starts.
As far as I can read the code, plugins are loaded as part of building the session core (EnsureCoreBuilt → WireCore), and the core is built on first use: the first connect, the first typed command, opening the Script Manager, or Import from Genie 4. The reason it waits seems to be the data folder: it is fixed when the core is built, and a profile can name its own.
What I have working locally on top of v5.0.1-beta.5:
- When Genie is started without
--profileor--host, it builds the core once the window is up, if the Plugins folder holds a plugin and no saved profile has its own data folder. In that case every later connect uses the default folder anyway, so building early cannot change which folder is used. - If a saved profile does have its own data folder, it waits as today and says in one line why the plugins are not loaded yet.
- With no plugin in the folder, nothing changes.
- The early build reads the shared rules, so a plugin finds the variables and aliases in place, as in Genie 4. It writes no file. The macro defaults that a first rule load adds and saves are left for the first typed command, where they are written today.
It has tests, and a pull request follows. One test compares every rule engine, and the files written, after "started, then connected from the Connect dialog" with "connected first".
How others handle it
Genie 4 loads plugins in FormMain_Load, right after the config files (settings, highlights, triggers and so on) and before any connection (LoadPlugins()). It can do that because its data folder is decided once, at program start.
Policy check
Loading happens when the user starts the program, and loading sends nothing to the game. It does not add anything a plugin can do: whatever a plugin can do after this change, it can do today after the first typed line.
Alternatives considered
- Always build the core at start, and restart Genie into the profile when the user later picks one with a different data folder. That covers everyone, but needs a self-restart.
- A start option that names the profile without connecting. Today
--profilealways connects. With such an option the core could be built in that profile's folder at start. - Leave it and correct the documentation. The wiki's Plugins page says
#pluginneeds a live session, but a typed#plugin listworks without one, because the typed line itself builds the core. Only the Plugins menu says "connect first".
- Dominant language
- C#
- Stars
- 2
- Forks
- 5
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GenieClient/Genie5
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
GenieClient/Genie5#496 ·
Maintainers usually reply within 5 days
-
enhancement g4-regression
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GenieClient/Genie5#494 ·
Maintainers usually reply within 5 days
-
area:ui-dock enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
GenieClient/Genie5#462 ·
Maintainers usually reply within 5 days
-
area:mapper bug est:<1d P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
GenieClient/Genie5#449 · 1 comment ·
Maintainers usually reply within 5 days
-
[Bug] Maps ▸ Update from Official Repo / Repair Maps give no notification of success or failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:mapper area:updater bug est:<1d P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
GenieClient/Genie5#423 · 1 assignee ·
Maintainers usually reply within 5 days
All issues in GenieClient/Genie5
Similar issues
-
documentation good first issue kind:task level:starter size:s
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Arggon/ArggonStores#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Tool] MockAPIOpenhas-image has-license has-readme new-tool ready-to-approve repo-verified
Difficulty 1/5 Under an hour Newbie friendliness 72/100
shanselman/TinyToolTown#956 ·
Maintainers usually reply within 2 days
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Native build script prints a traceback when Git is missing from PATHPossibly taken @Jaisuryan-web claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KnifeLemon/Filee#1953 ·
Maintainers usually reply within 1 day