Comments (12)
As @NathanKell pointed out on IRC, this isn't safe if one mod needs to overwrite part of another mod (which also relates to #15 ). We may need some sort of signal to indicate that dependencies need to be installed first. If we do go down that route, using it should be discouraged, as well-packaged mods should be install-order independent.
from ckan.
Discouraged but still present - for example, mods for mods (how meta) will definitely need this.
from ckan.
@Wizarth : Most mods of mods use ModuleManager to do their changes. This means they don't need to overwrite any files, and install order is truly unimportant. So while RealismOverhaul must be installed after TACLS, it can be installed before before or after any of the other mods it depends upon, just as long as they're all present before one starts the actual game.
So while dependencies themselves are super common (and cyclical dependencies are fine), dependency ordering should be quite rare (and cyclical dependencies are disallowed).
from ckan.
Stealing from the debian policy manual, I'm going to suggest we have depends
and pre-depends
.
I'm also rather partial to their entire relationship model, which includes:
recommends
- A strong, but not absolute dependency.suggests
- A suggestion another mod be installed.enhances
- An indication this mod improves the functionality of another mod.
In #11 we also suggest having a supports
field, which is a clear indication of compatibility.
@NathanKell, in the example we had of RealismOverhaul, we might say that it depends
on ModuleManager, recommends
EngineIgnitor, and suggests
TextureReplacer.
A typical install (ckan install RealismOverhaul
) would install both dependencies and recommends. However a user may do a ckan install --no-recommends RealismOverhaul
to get just the bare minimum, or a ckan install --all-suggested RealismOverhaul
to get everything it suggests.
(Actual switch options are indicative only, and may change.)
from ckan.
Sounds good to me.
from ckan.
Okay, this is my work unit for the day, and also quite possibly the biggest remaining bit of needed functionality. We'll be abstracting a bunch of things into a generalised relationship class. We'll generate a list of install rounds; nominally just one, but if something has a pre-depends that will create an install round before it (and if there's a pre-depends in that, then another install round before that and so on).
To start with, I'll just be doing dependency resolution; anything with a 'pre-depends' will just throw an exception for now.
from ckan.
I'm following dependency chains, but they're raising a few issues.
When we install a module, we must install its dependencies, and we may install its recommends
list (unless specifically asked not to), and its suggests
list (if explicitly requested).
But what do we do in the case of chained recommendations? If A depends on B, and B recommends C, then do we install C when asked to install A?
I'm inclined to go with the following rules:
- If we're running in
--no-recommends
mode, we only install dependencies, no matter what. - If we're running in
--with-recommends
mode (the default), we install all recommended modules, all the way down the chain. - If we're running
--with-suggests
we only install the suggested modules for the top-level module, everything else gets the default treatment. - If we're running
--with-all-suggests
, then we install all suggestions, all the way down.
This meas that the default experience (with recommends) gives both user and module authors the configuration they'd expect. Recommends is a strong relationship, so those things should be installed.
Users running --with-suggests
get the suggestions for the module they asked for, but not for something six layers deep that was required, but which the user was unaware of. This means we don't surprise the user with unexpected cruft.
Users running --with-all-suggests
(suggested alias: --with-kitchen-sink
) get what they asked for. ;)
Thoughts and feedback welcome.
from ckan.
Do we know what apt-get does in this circumstance, for reference?
On Sun, Oct 12, 2014 at 6:33 PM, Paul Fenwick [email protected]
wrote:
I'm following dependency chains, but they're raising a few issues.
When we install a module, we must install its dependencies, and we may
install its recommends list (unless specifically asked not to), and its
suggests list (if explicitly requested).But what do we do in the case of chained recommendations? If A depends
on B, and B recommends C, then do we install C when asked to install A?I'm inclined to go with the following rules:
- If we're running in --no-recommends mode, we only install
dependencies, no matter what.- If we're running in --with-recommends mode (the default), we install
all recommended modules, all the way down the chain.- If we're running --with-suggests we only install the suggested
modules for the top-level module, everything else gets the default
treatment.- If we're running --with-all-suggests, then we install all
suggestions, all the way down.This meas that the default experience (with recommends) gives both user
and module authors the configuration they'd expect. Recommends is a
strong relationship, so those things should be installed.Users running --with-suggests get the suggestions for the module they
asked for, but not for something six layers deep that was required, but
which the user was unaware of. This means we don't surprise the user with
unexpected cruft.Users running --with-all-suggests (suggested alias: --with-kitchen-sink)
get what they asked for. ;)Thoughts and feedback welcome.
—
Reply to this email directly or view it on GitHub
#32 (comment).
from ckan.
Aaah, WWAGD? I don't know, but that's a good thing to check. :)
from ckan.
It looks like apt-get switches things on and off the whole way down. So by default, you get all the recommended packages for everything. With suggests turned on, you get a kitchen sink.
So I'm essentially doing the same there, but tweaking --with-suggests
to not include all the suggestions all the way down. Given how many times I've seen the question asked about how one installs the suggests for the requested module but not everything else¹, I think my deviation from the apt-get way of doing things has merit.
But thanks for mentioning that, WWAGD was indeed the obvious way to see if my plan had potential for sanity. :)
¹ Debian lore has it that installing gparted with suggestions will also give you apache, and a full dev environment for three different languages.
from ckan.
More progress on this in 306cc03 with FindReverseDependencies()
by @AlexanderDzhoganov .
from ckan.
It sure looks like we're doing the core of this now, so closing.
from ckan.
Related Issues (20)
- Changeset screen should have a way to keep auto-installed mods
- Installing large mods can cause the UI to appear to hang for a while
- [Feature]: Add an option to auto-deselect "recommended" mods on install
- Relationships screen usability improvements HOT 5
- Add a “clean GameData” button to the toolbar HOT 2
- Using "Update" on a manually-installed NearFutureSolar will fail to install NearFutureSolarCore HOT 3
- Access to config.json is denied HOT 3
- Repository Update Failed: "Downloads failed" dialog does not appear when custom metadata repository goes missing and switching game instances HOT 14
- [Bug]: Only folders are showing when tryin to create a new instance. HOT 2
- [Feature]: Install Recommended Dependencies Recursively HOT 15
- I get a error every time I olaunch ckan and have to give it permission to run on every launch HOT 1
- Clearing the changeset after selecting "update all" does not work when filters/search are active
- [Bug]: Number must be either non-negative and less than or equal to Int32.MaxValue HOT 6
- [Bug]: [LINUX]: " *directory* is not a valid game directory. " message when trying to create new game instance HOT 3
- Autoupdater should use a consistent filename for the exe so that it can be excluded from windows virus scanning HOT 14
- [Feature]: Allow using Proton instance for significantly improved speed over Linux native HOT 2
- [Bug]: Continue button is greyed out when trying to install modpack HOT 9
- -- asroot HOT 1
- Performance hitch when typing in the search box while versions tab is open HOT 2
- [Feature]: Show / Sort By Downloads in ConsoleUI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckan.