bvanseg / ccake

A command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-version support of packages

bvanseg opened this issue · comments

Is your feature request related to a problem? Please describe.
Currently, CCake supports installing a single toolchain such as MinGW in a global scope (within a .ccake file in the user's home dir). While this is convenient, it will become a hassle if some project A needs version X of the same toolchain that also happens to be used in another project B as version Y.

Describe the solution you'd like
To avoid duplicate dependencies across multiple projects, packages should still be maintained globally, but different versions should be maintained under the same tool/lib name. Projects should contain a dependencies section where dependency identifiers (keys) along with their versions (values) can be specified. Ultimately in the CLI this would look like ccake install mingw@version where version is some version identifier specific to the tool or library. On the file system, mingw would be a folder within the .ccake/cache folder which contains folder names matching the version (Ex. .ccake/cache/mingw/x.y.z).

Describe alternatives you've considered
N/A.

Additional context
The prescribed design is similar to Gradle. However, this design can lead to bit rot, where unused dependencies in the global scope are no longer used, but still sit on the file system taking up unnecessary space. To help prevent this, CCake could potentially keep track of where dependencies are used in what projects. If a dependency no longer has references to any projects on the file system, it could be safely cleaned up with a ccake clean command.