-
Notifications
You must be signed in to change notification settings - Fork 290
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
Improve Maintnance of Optional Plugins #95
Comments
Alternatively you could check out build solutions (you could use myget they have a build server that oss projects can use for free) |
I like the idea about separation. I guess these optional plugins are technically same as any other third party plugin or plugin user is creating for game. So currently I am missing some "official" way how to share plugin code. Plugin needs reference to Duality's core so how would one create repository which can be easily downloaded, built and attached to game? For example look at these two projects: They are both done differently and I am not able to simply open and run any of them. FrozenCore needs to be placed into exact folder to find Duality and DualityScripting requires NuGet package which is not publicly available (or at least it was not found automatically). So I would really love to have some comfortable and ideally unified way how to share and use third party plugins. Maybe it could be possible to integrate NuGet package manager into editor and download plugins as packages without source code compilation. Actually this option could be pretty cool. Core of Duality could be also published by NuGet so we (plugin developers) will be able to easily share source code with all dependencies and publish binaries to NuGet repository for everyone. I think that plugins and whole extensibility is main selling point of Duality (at least for me) so something like that could increase the number of plugin developers => more interesting features => more users => more games. :-) |
Hi existent Apologies for not getting around to sorting this out sooner. We've just been so flat out on our game, I haven't had time! You can use our versions of all of the main Duality repos by adding this link - https://www.myget.org/F/6416d9912a7c4d46bc983870fb440d25/ - to your NuGet Package Manager's Package Sources dialogue in Visual Studio. NuGet will then look at our feed (which is totally public on MyGet) to pull down the dependencies. I've actually been thinking about ways to integrate NuGet into Duality recently, as it absolutely seems to be the way to go when dealing with this sort of thing. We already have problems internally with versioning some of our own plugins, and a dependency manager would totally just make those go away. I might try and find some time this weekend and look into it. Sounds like fun:) |
@Existent has a very good summary on the topic. I agree that a unified way of getting plugins into Duality would be great - and that NuGet is a good candidate for providing that. Didn't get around to look into it thoroughly, but I'd appreciate a Pull Request if @BraveSirAndrew finds a good way of integrating it. :) That said, the Duality repository should definitely work out of the box, so I'd favor a non-destructive approach that doesn't require anyone to install NuGet before being able to build Duality. Edit: Some questions / issues that we might need to talk about:
|
Quick googling brings for example these results: |
I've now begun looking into NuGet. My first goal is to replace Dualitys submodule-driven dependency management with NuGet package driven dependency management. Once that is done, I'll think about how to handle unified plugin management with NuGet. Thoughts so far:
|
I didn't get as much time over the weekend to work on this as I was hoping for, but I've managed to do a quick spike of how we might include a NuGet-powered plugin manager inside Duality. I've committed my spike here - https://github.com/BraveSirAndrew/duality/tree/plugin_manager. It's really bare bones right now, has no tests, and is generally super hacky. It uses a command line interface which supports only two commands, -list and -install. List will show all of the packages in the online repository (which I've temporarily set up at https://www.myget.org/F/dualityplugins/), and -install [pluginName] will install the plugin called pluginName. For version compatibility, the code checks the major version of the Duality assembly against the first dependency found in the nuget package. I'm cheating here by telling NuGet not to install dependencies itself and using the first dependency as a minimum Duality version check instead, as I couldn't find another way to do that. It then pulls in any dependencies manually, although this code is incomplete as my sample plugin doesn't have any dependencies:) The version thing brings up the question of how version numbers should be treated going forwards, if the plugin manager is to become a real thing. I think some form of semantic versioning (http://semver.org/) is needed, so plugins can be guaranteed to run against a major version. |
Also we should keep in mind the situation when one plugin is depending on another one. For example steering plugin can be used in some AI plugin. |
|
Allright, I've given this topic some more thought. Here are my results so far:
Still quite sketchy, but it's a start. Feedback appreciated. |
I really like the direction this is going in. Are you also planning to support usual NuGet packages? I mean what if plugin will have usual NuGet package as an dependency? Should this be also handled and resolved by build-in package/plugin manager? It could lead to potential version mismatch when two plugins will be using different versions of same package. But on the other hand, it would be quite unexpected that these dependencies won't be resolved. |
This is sounding very cool. @Existent I think so long as the package.xml lists all of the plugins that are installed (which will include all dependencies), NuGet can be made to correctly handle shared dependencies, using the usual semantic versioning rules. @AdamsLair Using tags to mark packages as Duality plugins might not be necessary if we can find a good place to host just Duality plugins. Additionally though, would this be a problem for dependencies, which might exist outside the Duality repo and wouldn't be marked with the required tag? For example, the scripting plugin now has some dependencies on FSharp assemblies, hosted on NuGet. The plugin manager would have to pull those assemblies down as well, even though they're not tagged. Where I see this ultimately ending up is in something like Unity's (hope that's not a dirty word around here :) ) package management, where assets can be bundled with a plugin. NuGet lets you run powershell scripts after installing that could be used to move files around. In the case of assets, that would mean moving them to the data folder. |
Yep, that's true. But what's the advantage of finding a different place, when the default one is already pretty good? As long as there is no rule against using the NuGet servers to host plugins for a very specific software framework, that is. The tag solution should also work with plugin dependencies, as those tags would only be the first and easiest indicator of what NuGet packages to show within the Package Manager. As you pointed out, when installing a package, of course all of its dependencies need to be installed and managed, too! One solution: They could be silently installed in the same way, internally handled in the same way, just not being displayed to the user.
Nah, it's fine. :) I will be unavailable for ~ a week, but I'll try to look into this topic a little more when I return. |
I am not sure about current infrastructure or process how new version is built, but today I found this link http://www.hanselman.com/blog/AppVeyorAGoodContinuousIntegrationSystemIsAJoyToBehold.aspx it could be useful for automatic builds and test runs so I am sharing it. |
That looks super cool! It might be worth noting that the current Duality tests most likely won't run on there though, as no VM under the sun (that I could find) virtualises the graphics card, and most Duality tests spin up a dummy OpenGL context. |
True. It's partly due to an unfortunate design of the Duality framework that doesn't (and currently can't) separate framework initialization from graphics initialization, and partly due to the fact that some tests actually draw stuff and compare it to reference images. That said, AppVeyor looks very cool. Will keep that in the back of my mind. |
Some more notes:
Again, feedback and suggestions are appreciated. |
By now, after all these concepts, I really want this implemented... just need to find some time to actually do it. If it all works out, this might turn out to be awesome :) |
|
Status Update: There is a limited prototype in the repository right now. All of this is deactivated by some commented out lines.
Immediate ToDo:
|
Status Update: Fixed a lot of the above issues and created package specifications of all currently existing Duality modules for testing. Incorporated package building into the NightlyBuilder process. Immediate ToDo:
|
Status Update: Package Management is operational in an experimental state. Successful tests for self-updates have been performed with a minimalist binary .zip package that downloads all of the required packages itself on first startup. Immediate ToDo:
|
Hi there |
Yup, know about branching. Will probably use next time :) |
Status Update: Began implementing Package Management user interface in a separate editor plugin. Since the package management API is implemented in the editor itself, others could easily provide their own package manager module while still using the same backend. Immediate ToDo:
|
Status Update: Menu Handling has been rewritten with a new and shiny model / view system. Work is being done on the PackageManager GUI, attempting to implement it in an awesome, asynchronous way right from the beginning. Don't freeze while retrieving online data, be fully usable no matter how much has been retrieved yet. Immediate ToDo:
Concept Stuff:
|
Status Update: Now correctly handling cases when Duality packages are installed implicitly / as dependencies of other packages. Also doing a lot of user interface stuff for the Package Manager UI. It is actually usable now when it comes to installing and uninstalling. No fancy special cases though, and no updates, let alone safe updates. Immediate ToDo:
|
Status Update: Updating is done in first iteration, Uninstall checks are done as well. Also, several bugfixes and tweaks have been introduced. Immediate ToDo:
|
Status Update: Polished user interface a little bit, updated all packages and entered Beta mode. Package Management is now available for beta testing, both in binary form and on the master branch. "Safe Update" functionality wasn't implemented, as it seemed more and more like a nice2have feature with questionable relevance. Immediate ToDo:
|
Status Update: Wrote a little bit of documentation on package Management. Still rough, but it's a start. Immediate ToDo:
|
Status Update: Tweaked and fixed a lot of Package Management stuff, including most of the above ToDo entries. Immediate ToDo:
|
I've tweaked the user interface a little bit more and am now closing the issue, as the main part of the system has been done. Bug reports and feature requests on the system now belong to individual issues as usual. |
Problem
Solution
The text was updated successfully, but these errors were encountered: