Skip to content

add an option for skipping compilation of hybrid packages #1450

@daylinmorgan

Description

@daylinmorgan

TL;DR add support for --srcOnly flag so install, setup don't compile binaries of hybrid packages

I rely on nimble setup (always in local mode) to fetch dependencies. But for none of the hybrid libraries I've used as dependencies have I ever needed the binaries those packages define/provide (for example karax).

I think it would be useful to offer this an opt-in feature for those cases when users are aware they are installing a hybrid package and have no need for the binary.

Relatedly, I maintain a nix flake that is based on nimble and ingesting nimble.lock files. In this case the compiled outputs are noise that at best consume disk space and at worst a possible failure mode given the build system quirks of nix when they are likely not relied on for a package that is using libraries as a dependency.

Granted nix problems are not nimble's problems but I still think this QOL feature would be useful when developing and installing dependencies.

To avoid this problem for my own hybrid packages I've taken to defining binaries in a subdirwith their own .nimble to keep library installation limited to src files.

I am not aware of any library that requires both its src and binary to function as a library but I imagine there is a way to do that using after install tasks. And if you give folks the ability to something they are sure to find a way, so maintaining the current behavior with an explicit option to disable it seems safer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions