Skip to content

Support optional dependency groups (like extras in pip) #301

@std-max

Description

@std-max

Hello,

It would be very useful if Bender could support different types of dependencies, similar to optional dependency groups in Python (for example with pip install package[dev]).

Right now, all dependencies are imported the same way, which can be limiting. In some cases, we do not want to include everything by default, especially development-related libraries. For example, VHDL/SystemVerilog packages often come with their own dev/test utilities, and these can conflict or overlap with the dev dependencies of the top-level project.

I understand that Bender already provides targets to select which sources to include. However, dependency resolution still seems to be done across all packages, regardless of the selected target. This means that even if some sources are not used, their dependencies are still resolved and potentially introduced into the project, which can be problematic.

A possible improvement would be to allow defining dependency groups such as:

  • default
  • test
  • or user-defined groups

Then users could choose which set of dependencies to include when importing a package.
This would make dependency management more flexible and avoid bringing in unwanted development code into production builds.

I would be happy to hear your opinion on this.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions