Add modules proposal#62
Conversation
|
This is really exciting! I'm glad that we're solving plugin libraries and splitting up Dalamud via the same mechanism. Some initial thoughts:
|
|
I echo much of what NotNite has said; This is very excellent and I do very much support this, would make a module that could be used for posing hooks from Brio and an IPC for Brio. There are a few problems for me. Optional dependencies: Brio has a hard rule to never depend on another plugin or service outside of Dalamud or CS for any core functionality I don't see a way to consume a third-party module like a Penumbra or C+ IPC module without it becoming a hard load requirement for Brio and wouldn't be able to load without those modules being there and available. It would be hard to justify using it without it being optional And then, where do the modules come from and how would we be able to tell a user where to get the appropriate repository, there were discussions on discord about making sure there isn't a malicious module pulled in by a malicious custom repo and in turn a malicious module getting used by a 3pp inadvertently, so there needs to be some way to fully qualify that the module being consumed is the real module. Some examples discussed on Discord at the time of writing:
While I wouldn't really mind any of them, and while the central repository one does feel nice, I do recognize it's not really something Dalamud would do, so my opinion is it should be some combination of being backed by nuget, loading the module from the same repository as a first try and/or fully qualifying the module, I feel that creates the most trust in the code being pulled in, without Dalamud as a platform having to manage anything for 3pp |
|
I personally dislike the concept of a central registry, because it defeats half of the purpose of custom repositories (independent developer control). I also think it's important to allow modules to come from a repo they aren't being requested from, as a module author may host it on their own repo (e.g. Kami may make a separate KTK repo that users add) or it might be served on one of many possible URLs (a hypothetical Penumbra module would be published on Sea of Stars and the original Penumbra repository simultaneously). I think I prefer having the resolver prioritize modules on the same repository, then falling back to modules from specifically allowed repositories, such that a malicious repository can't publish a malicious module that gets automatically installed. This is different from the threat model of CRPs, because modules are installed automatically by the resolver without any user input, while users pick which variant of a duplicate plugin to install. Note that I'm not sure how to best handle versioning or updates with this model. A malicious plugin installing a malicious module is probably out of scope. I also haven't put much thought into how signing/NuGet could be incorporated, but it would probably be a more elegant solution than specifying repository URLs. |
|
One issue I came across while writing a toy resolver was testing releases. A few of the questions that will have to be answered are:
They aren't impossible to answer, but they do inform the resolver design, and matter for both user and developer experience so should be considered carefully. |
This pull request proposes a scheme to introduce libraries into the Dalamud ecosystem, to alleviate pressure on developers during patch days and to improve the code sharing experience.
I would love honest input from first and third-party developers. Don't expect this to be implemented as is soon, as it is quite broad in scope and I don't have a lot of time to work on features myself. Maybe an acceptable outcome of this proposal is that we extract bits and bobs that would be easier to implement but still provide a lot of value.
Please read the entire proposal before commenting. Thanks!
Read a rendered version here: https://github.com/goaaats/DIPs/blob/modules/text/0000-modules.md