Requires reloads in both directionNot An Issue
Hi umod,

Let's say I have plugins: PluginA and PluginB

PluginA only exists to provide functionality to PluginB.

PluginB contains "// Requires: PluginA" at the top. So whenever I reload PluginA, PluginB also gets reloaded which is great.

The problem I'm having is that, when I reload PluginB, PluginA is also reloaded. This only gets messier when PluginC and PluginD also require PluginA. I don't want C and D to reload just because I want to reload B.

Is there any to circumvent this behavior?

Also, if I reload B, is there any necessity for A to be reloaded? I don't think this cascading reload behavior needs to go in both directions.
That is how that was made, and likely not to change being as Oxide is being replaced with uMod and uMod no longer has that functionality in that sense. The Requires handling was never really fleshed out, more or less added and not furthered.
Is there a timeline / roadmap? I see updates to Oxide on github. How do these recent changes to oxide fit into umod?

Merged post

And in the event of a oxide to umod migration, what would be the equivelent to:

// Requires: PluginA

namespace Oxide.Plugins
{
    class PluginB : RustPlugin
    {
        [PluginReference] PluginA PluginA;
    }
}​
jj5k
Is there a timeline / roadmap? I see updates to Oxide on github. How do these recent changes to oxide fit into umod?

Merged post

And in the event of a oxide to umod migration, what would be the equivelent to:

// Requires: PluginA

namespace Oxide.Plugins
{
    class PluginB : RustPlugin
    {
        [PluginReference] PluginA PluginA;
    }
}​

I dont see any problems at this time, I use Betterchat (you are allowed to quote plugin names) and use Betterchat filter/BetterChatIgnore and Have used Betterchat Mute, When Stopping and starting server for Oxide update I can see that Betterchat filter loads first and then waits for Betterchat to load , no problems there, when Betterchat is updated it unloads and reloads BCFilter , again no problems, if Betterchat filter is updated it does not reload Betterchat as it doesnt need to (it looks for it and as it is there it loads),
Umod is going to replace existing structure (?) from what i have read here and will worry about that when it happens, Betterchat will still be working as far as i know and any plugins that work off of it will either work or i will use something else.

[DEBUG] BetterChatFilter plugin is waiting for requirements to be loaded: BetterChat

[DEBUG] BetterChatFilter plugin is waiting for requirements to be loaded: BetterChat
Loaded plugin Better Chat v5.2.5 by LaserHydra

Loaded plugin Better Chat v5.2.5 by LaserHydra

Loaded plugin BetterChatFilter v1.2.2 by Kinesis

Loaded plugin BetterChatFilter v1.2.2 by Kinesis

Loaded plugin BetterChatIgnore v1.0.3 by MisterPixie

Loaded plugin BetterChatIgnore v1.0.3 by MisterPixie

I think it's a problem to reload files/libraries that haven't changed, if anything unnessasssary. We've built a dynamic Flexbox UI kit for Rust and CUI, we think it's game changing (many of these CUI based plugins with thousands of lines can be replicated in less then a hundred lines of code). The problem is not so much reloading, fine, reload a file that hasn't changed, the problem is the server having to do more unnessary work and what impact that can have on player experience. If anything it feels ineffecient. We'd be happy to contribute upstream. Wulf, how do we help or can we even help? 

P.S. JJ5K and I work together.
5f5089813d67a.png decay
I think it's a problem to reload files/libraries that haven't changed, if anything unnessasssary. We've built a dynamic Flexbox UI kit for Rust and CUI, we think it's game changing (many of these CUI based plugins with thousands of lines can be replicated in less then a hundred lines of code). The problem is not so much reloading, fine, reload a file that hasn't changed, the problem is the server having to do more unnessary work and what impact that can have on player experience. If anything it feels ineffecient. We'd be happy to contribute upstream. Wulf, how do we help or can we even help? 

P.S. JJ5K and I work together.

https://github.com/OxideMod
https://gitlab.com/umod

Awesome, thanks for the links Wulf. I think where some our confusion is coming from is the connection between these two repos. We see you're releasing Oxide with a pretty steady cadance. I guess the real question is the connection or changes that will need to occur between the two code bases. Do you know if that's going to have a large impact? We're also seeing Facepunch released ModLoader with Harmony which furthers our confusion but has nothing to do with uMod. Anyway, thanks for the time and answering our questions. Always appreciated.
5f5089813d67a.png decay
Awesome, thanks for the links Wulf. I think where some our confusion is coming from is the connection between these two repos. We see you're releasing Oxide with a pretty steady cadance. I guess the real question is the connection or changes that will need to occur between the two code bases. Do you know if that's going to have a large impact? We're also seeing Facepunch released ModLoader with Harmony which furthers our confusion but has nothing to do with uMod. Anyway, thanks for the time and answering our questions. Always appreciated.

Oxide is the legacy mod from oxidemod.org that was migrated here and is only being maintained. Requests can be made, but it is mostly just being updated for games at this point as needed.

uMod is for mostly an entire re-wrote of what Oxide does, along with more and will be the future of the project. The majority of work we do goes toward this now, as it isn't really realistic to maintain two codebases. uMod will have deprecation for Oxide for an extended period of time, but ultimately uMod will be its own thing.

Harmony is not really the same thing at all, but the uMod patcher is/will be using it down the road to handle some aspects patching DLLs better. You could consider Harmony as a basic mod loader, not really an API nor does it really provide the same functionality or benfits of a plugin framework and associated tools.

As far as the // Requires functionality goes, there isn't a direct replacement for it, but there will be dependency handling.

Thanks for the details. The solution for us was to move up a level and compile a DLL for our UI stuff. This gives us a bunch of flexibility and keeps our other UI plugins from being tied together. 
@Wulf Going this route, we noticed that the plugins that reference the DLL compile fine on server boot. But when we reload the plugin, it says it can't find the types or namespaces inside. Is there anything special we need to do to handle plugin reloads?
I'm not really familiar with that method beyond what I've stated above, sorry.
All good. In the meantime, we managed to get it working by whitelisting the namespaces, assemblies, and references. Not sure why that fixed it considering the discord extension doesn't specify whitelists...
Locked automatically