cortoproject / corto

A hierarchical object store for connecting realtime machine data with web applications, historians & more
https://www.corto.io
MIT License
87 stars 14 forks source link

Make specifying dependencies consistent across framework #615

Closed SanderMertens closed 6 years ago

SanderMertens commented 7 years ago

For consistency across the framework, the field that specifies dependencies for a package should be called "use" instead of "dependencies". This will make it consistent with the buildsystem (USE_PACKAGE) and the corto definition language (use foo/bar).

For all use declarations, a common format will be specified that indicates package, version and a prefix for the package. For example:

"use": ["foo/bar:1.2 as bar"]

This will create a dependency on foo/bar version 1.2, and will be accessible from the package as bar.

The as is a replacement of the prefix that currently is specified on the dependency package (foo/bar), which in some cases can cause name clashes. With the as syntax, packages have full control over making sure name clashes don't happen, while still allowing for short read-friendly names.