-
Notifications
You must be signed in to change notification settings - Fork 77
Add addon dependencies #90
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
Conversation
thanks this is great ! I'd like to check how the PG handles multiple addons, like if ofxCv include ofxOpenCv but ofxOpenCv is already in the addons.make file, does it get included twice? I am wondering if need some smarts or not.... |
It needs a check yes. And i just realized that the make system has the same problem (just tried with ofxCV depending on ofxOpenCv..) |
instead of adding a check it's easier and cleaner to use a set for the collection of addons that way every addon no matter how many times is added will be unique. the return for the method that gets the collection of addons can still be a vector that gets filled from the set |
I just looked into this, the check is already there: https://github.com/openframeworks/projectGenerator/blob/master/ofxProjectGenerator/src/projects/baseProject.cpp#L261 Should i change it to the set solution @arturoc mentions, or should we keep it as it is? |
Just wanted to ping this issue -- any way I can help move it though? |
Ping. Would love to see this merged ... |
i think this might need some work still to avoid duplicated addons. i think adding the addons in a set as a first step to then add them should solve any potential problem. i guess we could have a public method that is
so all addons have to be added at once and then that method takes care of parsing the dependencies and finally add the individual addons one by one calling the now private the command line tool already has a vector for the addons so the change would be trivial |
This is becoming more important now for automated unit testing etc. @thomasgeissl has done some work on this interesting project that seems related -- https://github.com/thomasgeissl/ofPackageManager While I'm not super interested in creating a npm / bundler-style dependency manager it would be really nice to be able to handle more slightly more complex dependency lists in the addon_config.make file and the addons.make ... At the very least it seems that we should be able specify the github user / repo e.g. |
Here's a nice well-articulated syntax that I'd love to support in https://docs.npmjs.com/files/package.json#git-urls-as-dependencies And we kind of already support this with the |
Actually this looks fine as is. It avoid duplicates at the start of that function already. |
Is this in the latest 0.11 release? I doesn't happen with the bundled PG... |
Recursively add addon dependencies Fixes #30