|
bashdeps
Exact dependency materialization and manifest maintenance tools
|
Accepted
This ADR defines whether bashdeps exposes a sourceable Bash library API or an executable command-line interface.
The release artifacts are Bash files and therefore can technically be sourced by a caller. Technical possibility should not silently become a compatibility promise. The current consumers need dependency acquisition as a command, and no demonstrated use case requires callers to invoke private parsing, transport, hashing, staging, or publication functions directly.
A public sourced API would freeze function names, variable names, shell-state behavior, error-return conventions, and namespace interactions that otherwise remain implementation details.
ADR-007 and ADR-009 define the public executable filename as bashdeps.bash.
The supported public interface for version 1 SHALL be the bashdeps.bash executable CLI defined by ADR-007.
The project SHALL NOT document or guarantee a sourceable public Bash API.
Maintained and generated Bash artifacts MAY be written so sourcing them does not immediately execute the CLI dispatcher. That property is defensive behavior, not a promise that internal functions are supported for direct invocation.
Private functions and variables SHALL use the __bashdeps_ namespace.
Consumers SHALL NOT be expected to call __bashdeps_* functions or depend on private variable values. Those names and signatures MAY change without being considered public API changes so long as documented bashdeps.bash CLI behavior remains stable.
Direct execution SHALL dispatch when the artifact is invoked as a process. Sourcing SHALL leave the caller responsible for any resulting private definitions and SHALL not be a documented installation or integration method.
A future sourceable library API requires a separate ADR defining its namespace, state model, callable functions, error semantics, and compatibility guarantees.
This maximizes reuse but substantially enlarges the compatibility surface before a consumer has demonstrated the need.
This makes the boundary unmistakable but is unnecessarily hostile to inspection, testing, or embedding scenarios. Remaining inert when sourced is sufficient as long as no public sourced API is claimed.
Implementation helpers remain free to evolve while tests focus primarily on the bashdeps.bash CLI behavior.
Generated artifacts can still use ordinary Bash source structure and private functions without turning those helpers into consumer commitments.
Consumers such as Makefiles invoke bashdeps.bash as a process rather than sourcing it into their own shell state.
None for version 1.