Commit graph

718 commits

Author SHA1 Message Date
goaaats
70e0eef5ce normalize command names for profile management 2024-03-28 14:09:24 +01:00
goaaats
0dbc76f96f pi: some more manifest validation 2024-03-28 00:14:51 +01:00
goaaats
68e0ef0b5d pi: add validations for manifest tags, description 2024-03-27 23:50:05 +01:00
goaaats
b2df6e2a2b pi: allow "dismissing" validation problems 2024-03-27 21:10:21 +01:00
goaaats
4a6faed2e2 pi: slightly improve validation messages 2024-03-27 20:58:43 +01:00
goaaats
614ea211a0 pi: add validator for DevPlugins, with basic warnings about callbacks and commands 2024-03-27 19:35:29 +01:00
goaaats
b3db0e78b3 pm: reign in overeager profile cleanup on install
...and remove Profile::RemoveByInternalNameAsync() because it's a footgun
2024-03-23 15:48:54 +01:00
goaaats
714e9e0319 pm: don't throw if there are no valid versions for a plugin 2024-03-20 23:33:35 +01:00
goaaats
ec122c85d5 fix warnings 2024-03-19 23:24:23 +01:00
github-actions[bot]
fe80490d5e Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 15:04:46 +00:00
srkizer
be63276a85
Rename to Framework.Run (#1728) 2024-03-19 08:04:21 -07:00
github-actions[bot]
990f04715f Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-19 03:11:08 +00:00
srkizer
5d473919a1
Hide scheduler from RunOnFrameworkThread (#1725)
* Hide scheduler from RunOnFrameworkThread

Creating new tasks via Task.Run and alike would fetch the current
scheduler, which we do not want in case of running stuff from the
framework thread. Change is to prevent the standard library from seeing
the "current scheduler". If one wants to use `await` with an async
function to be run in the framework thread, one can use
`RunOnFrameworkThreadAwaitable` instead now.

* TaskSchedulerWidget: test better stuff

* TaskSchedulerWidget: add freeze tests

* More comments

* Make TaskFactory a getter method instead of property to avoid bad suggestions

* Why are there stuff still not pushed
2024-03-18 20:10:47 -07:00
github-actions[bot]
4abb3535fa Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-16 16:02:57 +00:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
srkizer
710fff118d
Remove unnecessary stuff from ObjectTable (#1713)
* Remove unnecessary stuff from ObjectTable

* Remove unused

* fix
2024-03-14 14:37:52 -07:00
github-actions[bot]
458e48c088 Merge remote-tracking branch 'origin/master' into net8-rollup 2024-03-14 04:35:37 +00:00
Soreepeong
033a57d19d Merge remote-tracking branch 'upstream/master' into feature/inotificationmanager 2024-03-14 13:06:04 +09:00
srkizer
a26bb58fdb
Use custom TaskScheduler for Framework.RunOnTick (#1597)
* Use custom TaskScheduler for Framework.RunOnTick

* TaskSchedulerWidget: add example
2024-03-14 00:36:38 +01:00
github-actions[bot]
b68da56e74 Merge remote-tracking branch 'origin/master' into net8-rollup 2024-02-29 23:15:23 +00:00
Asriel Camora
5f62c703bf
Add IContextMenu service (#1682) 2024-02-29 15:15:02 -08:00
Soreepeong
a7d5380796 Cleanup 2024-02-28 17:11:30 +09:00
Soreepeong
42b6f8fd4b fix disposes and add TextureWrapIconSource 2024-02-28 17:11:30 +09:00
Soreepeong
7aba15ef5b Normalize namespaces 2024-02-28 17:11:29 +09:00
Soreepeong
3ba395bd70 Implement INotificationManager 2024-02-28 17:11:29 +09:00
Soreepeong
a3217bb86d Remove InitialiationTask from interface 2024-02-21 16:34:53 +09:00
Soreepeong
c27422384f IGameConfig: fix load-time race condition
As some public properties of `IGameConfig` are being set on the first
`Framework` tick, there was a short window that those properties were
null, which goes against the interface declaration.

This commit fixes that, by making those properties block for the full
initialization of the class.

A possible side effect is that a plugin that is set to block the game
from loading until it loads will now hang the game if it tries to access
the game configuration from its constructor, instead of throwing a
`NullReferenceException`. As it would mean that the plugin was buggy at
the first place and it would have sometimes failed to load anyway, it
might as well be a non-breaking change.
2024-02-20 15:37:54 +09:00
github-actions[bot]
5fbba87e59 Merge remote-tracking branch 'origin/master' into net8-rollup 2024-02-11 18:20:47 +00:00
MidoriKami
31c3c1ecc0 Fix reset and reload not working 2024-01-28 20:37:30 -08:00
goaaats
57b8a5d932
prevent double-lookup for dev plugins in non-default profiles 2024-01-19 23:42:44 +01:00
goaaats
4e95d4fe37
allow load of devPlugins in non-default profile 2024-01-19 23:32:39 +01:00
goaaats
9024c9b00c
track internal name nonetheless 2024-01-18 22:47:56 +01:00
goaaats
256f4989f7
add some validation code to catch issues 2024-01-18 22:39:18 +01:00
goaaats
b3740d0539
add Profile.RemoveByInternalNameAsync() 2024-01-18 22:03:14 +01:00
goaaats
b446fcc191
merge 2024-01-18 21:51:18 +01:00
marzent
b5c689c0ba fix bad a0f4baf merge 2024-01-18 10:48:15 -08:00
Kaz Wolfe
009151820d
Merge branch 'master' into net8 2024-01-16 13:41:16 -08:00
KazWolfe
86b7c29e94
fix: Make auto-update work again, the lazy way (#1592)
* fix: Make auto-update work again, the lazy way.

- Move auto-update to run on the first `Notice` message for parity with the welcome message.
- Add some logging in a few critical places to make things nicer.

* fix overzealous IDE complaints

* code-review comments

- Remove stray imports that the IDE included
- Remove fixme to move auto-updates (for now)

* Lazy retry auto-update
2024-01-13 20:17:26 +01:00
srkizer
de53150bd3
Optional recursive dependency pulls and fallback dependency load (#1595)
* Optional recursive dependency pulls and fallback dependency load

* add api10 todo

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-01-03 17:28:41 +00:00
KazWolfe
01cde50a46
chore: Suppress expected load errors (#1593)
- Add new `PluginPreconditionFailedException` to track cases where a plugin could not be loaded due to a precondition not being met.
  - Make `BannedPluginException` inherit from this
- Make `PluginPreconditionFailedException`s show as warnings in the log.
2024-01-01 16:11:09 +01:00
marzent
69096c440a
Allow plugins to load Dalamud dependency assemblies (#1580) 2023-12-31 16:20:00 -08:00
github-actions[bot]
c993be9c97 Merge remote-tracking branch 'origin/master' into net8-rollup 2023-12-16 20:06:06 +00:00
srkizer
5998fc687f
Fix DataShare race condition, and add debug features (#1573) 2023-12-16 21:05:13 +01:00
goat
711d5e2859
Merge pull request #1554 from Soreepeong/GameInventory 2023-12-08 00:42:47 +01:00
srkizer
a0f4baf8fa
Less footguns in service dependency handling (#1560) 2023-12-06 21:29:46 -08:00
Soreepeong
e594d59986 Enable tracking only when there exists a subscriber 2023-12-02 12:58:55 +09:00
Soreepeong
35b0d53e80 Add typed event variants 2023-12-02 10:59:13 +09:00
Soreepeong
1039c1eb8a Cleanup 2023-12-02 10:22:07 +09:00
Soreepeong
6dd34ebda4 support merge/split events 2023-12-01 22:37:24 +09:00
Soreepeong
35f4ff5c94 wip 2023-12-01 21:51:09 +09:00