frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
281 stars 196 forks source link

Marketplace: Introduce App Dependecies #539

Open NagariaHussain opened 2 years ago

NagariaHussain commented 2 years ago

Currently, there is no way we can prevent the user from installing an app without its dependent app. For example, you can't install India Compliance without ERPNext, you can't have Restaurant Management app without the Frappe Helper app, etc.

Here is what we can do:

  1. Have a child table in Marketplace App for App Dependencies
  2. Each row in the child table should be a Marketplace App (and not app) on which this app depends.
  3. When the user tries to install this app on site or add this app on bench and the dependencies are not already installed, a dialog should be shown where they are shown the apps that must be installed first.
shadrak98 commented 2 years ago

This can be done in general as well and not only for Marketplace apps.

Have a child table in Marketplace App for App Dependencies

a better implementation would be to make it general by adding a child table in the App source maybe?

NagariaHussain commented 2 years ago

a better implementation would be to make it general by adding a child table in the App source maybe?

Let's start with marketplace apps only.

It will be harder to start with apps in general (permission issues, private app source etc.)

We can figure that out later or maybe it should be done in FF level.

ankush commented 2 years ago

Make sure it's somewhat consistent with dependency resolution that already exists: https://github.com/frappe/bench/pull/1257

required_apps hook is used for this in some apps already.

NagariaHussain commented 2 years ago

Make sure it's somewhat consistent with dependency resolution that already exists: https://github.com/frappe/bench/pull/1257

required_apps hook is used for this in some apps already.

FC should be able to read those hooks while app source is added I think. So, we can track them better in FC when bench tries to install dep apps.