alire icon indicating copy to clipboard operation
alire copied to clipboard

[RFC] Explicitly document subcrates

Open mosteo opened this issue 2 years ago • 3 comments

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?

mosteo avatar Jul 29 '22 09:07 mosteo

nested-crates?

jquorning avatar Jul 29 '22 11:07 jquorning

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

Fabien-Chouteau avatar Jul 29 '22 14:07 Fabien-Chouteau

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.

mosteo avatar Jul 31 '22 08:07 mosteo