alire-project / alire

Command-line tool from the Alire project and supporting library
GNU General Public License v3.0
288 stars 49 forks source link

[RFC] Explicitly document subcrates #1122

Open mosteo opened 2 years ago

mosteo commented 2 years ago

I'm thinking that, as the use of subcrates for demos, examples, tests, etc. generalizes, it could be interesting to have a property in the manifest to make users better aware of them. Either simply:

subcrates = ["demo", "tests"]

or

[[subcrate]]
directory   = "demo"              # Always a portable relative path
description = "Short description" # So this is available without fetching the crate

On alr get and alr show we could announce them.

Not very fond of "subcrate" as a word though. Children?

jquorning commented 2 years ago

nested-crates?

Fabien-Chouteau commented 2 years ago

I don't see this as being very useful to be honest.

mosteo commented 2 years ago

I don't see this as being very useful to be honest.

I envision something like:

$ alr get libhello

libhello=1.0.0 successfully retrieved.
This release also includes these nested crates:
   demo:  An example on how to use this library.
   tests: A test suite to verify functionality.

Now, it's true that we could achieve that even without modifying the manifest, just looking for alire.toml files, although not remotely for alr show.

Perhaps this could be tucked away in an alr doc --show-nested or somesuch when we come around that.