Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alr show --dependents to show which crates have another as a dependency #1170

Merged
merged 6 commits into from
Sep 14, 2022

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Sep 1, 2022

Three varieties to show direct, indirect and full dependency chains. This will come in handy to improve our crate CI testing, and more generally to get an idea of how critical in the ecosystem a crate is.

Examples of output with the hal crate:

Direct dependents:

$ alr show --dependents hal
CRATE                VERSION  DEPENDENCY               
adl_middleware       0.1.1    ^0.1.0 
cortex_m             0.5.0    ~0.3.0 
embedded_components  0.1.0    ^0.1.0 
microbit_bsp         0.2.0    ^0.1.0 
midi                 0.2.0    ~0.3.0 
minisamd51_bsp       0.1.0    ^0.1.0 
pico_bsp             2.0.0    ~0.3.0 
pygamer_simulator    0.1.1    ^0.1.0 
rp2040_hal           2.0.0    ~0.3.0 
samd51_hal           0.2.0    ^0.1.0 
tiny_text            1.0.0    *      
usb_embedded         0.3.0    ~0.3.0 
virtapu              0.1.1    ^0.1.0

All dependents, with the [first] shortest dependency chain:

$ alr show --dependents=shortest hal
CRATE                VERSION  DEPENDENCY  CHAIN                                
adl_middleware       0.1.1    ^0.1.0      adl_middleware=0.1.1»hal=0.3.0
bb_pico_bsp          0.1.0    ^0.1.0      bb_pico_bsp=0.1.0»embedded_components=0.1.0»hal=0.3.0
cortex_m             0.5.0    ~0.3.0      cortex_m=0.5.0»hal=0.3.0
embedded_components  0.1.0    ^0.1.0      embedded_components=0.1.0»hal=0.3.0
microbit_bsp         0.2.0    ^0.1.0      microbit_bsp=0.2.0»hal=0.3.0
midi                 0.2.0    ~0.3.0      midi=0.2.0»hal=0.3.0
minisamd51_bsp       0.1.0    ^0.1.0      minisamd51_bsp=0.1.0»hal=0.3.0
minisamd51_example   0.1.1    ^0.1.0      minisamd51_example=0.1.1»minisamd51_bsp=0.1.0»hal=0.3.0
pico_bsp             2.0.0    ~0.3.0      pico_bsp=2.0.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»pico_bsp=2.0.0»hal=0.3.0
pygamer_bsp          0.1.0    ~0.3.0      pygamer_bsp=0.1.0»cortex_m=0.5.0»hal=0.3.0
pygamer_simulator    0.1.1    ^0.1.0      pygamer_simulator=0.1.1»hal=0.3.0
rp2040_hal           2.0.0    ~0.3.0      rp2040_hal=2.0.0»hal=0.3.0
samd51_hal           0.2.0    ^0.1.0      samd51_hal=0.2.0»hal=0.3.0
sh1107               1.2.2    ^0.1.0      sh1107=1.2.2»embedded_components=0.1.0»hal=0.3.0
shoot_n_loot         0.1.0    ^0.1.0      shoot_n_loot=0.1.0»pygamer_simulator=0.1.1»hal=0.3.0
tiny_text            1.0.0    *           tiny_text=1.0.0»hal=0.3.0
usb_embedded         0.3.0    ~0.3.0      usb_embedded=0.3.0»hal=0.3.0
virtapu              0.1.1    ^0.1.0      virtapu=0.1.1»hal=0.3.0

All dependents with all their dependency chains:

$ alr show --dependents=all hal
CRATE                VERSION  DEPENDENCY  CHAIN                                
adl_middleware       0.1.1    ^0.1.0      adl_middleware=0.1.1»hal=0.3.0
bb_pico_bsp          0.1.0    ^0.1.0      bb_pico_bsp=0.1.0»embedded_components=0.1.0»hal=0.3.0
bb_pico_bsp          0.1.0    ^0.1.0      bb_pico_bsp=0.1.0»embedded_components=0.1.0»adl_middleware=0.1.1»hal=0.3.0
cortex_m             0.5.0    ~0.3.0      cortex_m=0.5.0»hal=0.3.0
embedded_components  0.1.0    ^0.1.0      embedded_components=0.1.0»hal=0.3.0
embedded_components  0.1.0    ^0.1.0      embedded_components=0.1.0»adl_middleware=0.1.1»hal=0.3.0
microbit_bsp         0.2.0    ^0.1.0      microbit_bsp=0.2.0»hal=0.3.0
microbit_bsp         0.2.0    ^0.1.0      microbit_bsp=0.2.0»embedded_components=0.1.0»hal=0.3.0
microbit_bsp         0.2.0    ^0.1.0      microbit_bsp=0.2.0»embedded_components=0.1.0»adl_middleware=0.1.1»hal=0.3.0
midi                 0.2.0    ~0.3.0      midi=0.2.0»hal=0.3.0
minisamd51_bsp       0.1.0    ^0.1.0      minisamd51_bsp=0.1.0»hal=0.3.0
minisamd51_bsp       0.1.0    ^0.1.0      minisamd51_bsp=0.1.0»samd51_hal=0.2.0»hal=0.3.0
minisamd51_bsp       0.1.0    ~0.3.0      minisamd51_bsp=0.1.0»samd51_hal=0.2.0»cortex_m=0.5.0»hal=0.3.0
minisamd51_example   0.1.1    ^0.1.0      minisamd51_example=0.1.1»minisamd51_bsp=0.1.0»hal=0.3.0
minisamd51_example   0.1.1    ^0.1.0      minisamd51_example=0.1.1»minisamd51_bsp=0.1.0»samd51_hal=0.2.0»hal=0.3.0
minisamd51_example   0.1.1    ~0.3.0      minisamd51_example=0.1.1»minisamd51_bsp=0.1.0»samd51_hal=0.2.0»cortex_m=0.5.0»hal=0.3.0
pico_bsp             2.0.0    ~0.3.0      pico_bsp=2.0.0»hal=0.3.0
pico_bsp             2.0.0    ~0.3.0      pico_bsp=2.0.0»rp2040_hal=2.0.0»hal=0.3.0
pico_bsp             2.0.0    ~0.3.0      pico_bsp=2.0.0»rp2040_hal=2.0.0»cortex_m=0.5.0»hal=0.3.0
pico_bsp             2.0.0    ~0.3.0      pico_bsp=2.0.0»rp2040_hal=2.0.0»usb_embedded=0.3.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»pico_bsp=2.0.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»rp2040_hal=2.0.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»pico_bsp=2.0.0»rp2040_hal=2.0.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»rp2040_hal=2.0.0»cortex_m=0.5.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»rp2040_hal=2.0.0»usb_embedded=0.3.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»pico_bsp=2.0.0»rp2040_hal=2.0.0»cortex_m=0.5.0»hal=0.3.0
pico_examples        2.0.0    ~0.3.0      pico_examples=2.0.0»pico_bsp=2.0.0»rp2040_hal=2.0.0»usb_embedded=0.3.0»hal=0.3.0
pygamer_bsp          0.1.0    ~0.3.0      pygamer_bsp=0.1.0»cortex_m=0.5.0»hal=0.3.0
pygamer_bsp          0.1.0    ^0.1.0      pygamer_bsp=0.1.0»samd51_hal=0.2.0»hal=0.3.0
pygamer_bsp          0.1.0    ~0.3.0      pygamer_bsp=0.1.0»samd51_hal=0.2.0»cortex_m=0.5.0»hal=0.3.0
pygamer_simulator    0.1.1    ^0.1.0      pygamer_simulator=0.1.1»hal=0.3.0
rp2040_hal           2.0.0    ~0.3.0      rp2040_hal=2.0.0»hal=0.3.0
rp2040_hal           2.0.0    ~0.3.0      rp2040_hal=2.0.0»cortex_m=0.5.0»hal=0.3.0
rp2040_hal           2.0.0    ~0.3.0      rp2040_hal=2.0.0»usb_embedded=0.3.0»hal=0.3.0
samd51_hal           0.2.0    ^0.1.0      samd51_hal=0.2.0»hal=0.3.0
samd51_hal           0.2.0    ~0.3.0      samd51_hal=0.2.0»cortex_m=0.5.0»hal=0.3.0
sh1107               1.2.2    ^0.1.0      sh1107=1.2.2»embedded_components=0.1.0»hal=0.3.0
sh1107               1.2.2    ^0.1.0      sh1107=1.2.2»embedded_components=0.1.0»adl_middleware=0.1.1»hal=0.3.0
shoot_n_loot         0.1.0    ^0.1.0      shoot_n_loot=0.1.0»pygamer_simulator=0.1.1»hal=0.3.0
shoot_n_loot         0.1.0    ^0.1.0      shoot_n_loot=0.1.0»virtapu=0.1.1»hal=0.3.0
tiny_text            1.0.0    *           tiny_text=1.0.0»hal=0.3.0
usb_embedded         0.3.0    ~0.3.0      usb_embedded=0.3.0»hal=0.3.0
virtapu              0.1.1    ^0.1.0      virtapu=0.1.1»hal=0.3.0

The crate argument to show can be narrowed down as usual:

$ alr show --dependents=shortest hal=0.1
CRATE                 VERSION  DEPENDENCY  CHAIN                                
adl_middleware        0.1.1    ^0.1.0      adl_middleware=0.1.1»hal=0.1.0
bb_pico_bsp           0.1.0    ^0.1.0      bb_pico_bsp=0.1.0»embedded_components=0.1.0»hal=0.1.0
cortex_m              0.3.0    ^0.1.0      cortex_m=0.3.0»hal=0.1.0
edc_client            1.4.0    ~0.1.0      edc_client=1.4.0»hal=0.1.0
eeprom_i2c            3.2.0    ~0.1.0      eeprom_i2c=3.2.0»hal=0.1.0
embedded_components   0.1.0    ^0.1.0      embedded_components=0.1.0»hal=0.1.0
itsybitsy_bsp         0.0.4    ~0.1.0      itsybitsy_bsp=0.0.4»hal=0.1.0
itsybitsy_rp2040_bsp  0.1.0    ~0.1.0      itsybitsy_rp2040_bsp=0.1.0»hal=0.1.0
microbit_bsp          0.2.0    ^0.1.0      microbit_bsp=0.2.0»hal=0.1.0
minisamd51_bsp        0.1.0    ^0.1.0      minisamd51_bsp=0.1.0»hal=0.1.0
minisamd51_example    0.1.1    ^0.1.0      minisamd51_example=0.1.1»minisamd51_bsp=0.1.0»hal=0.1.0
nrf5x_hal             0.1.0    ~0.1.0      nrf5x_hal=0.1.0»hal=0.1.0
pico_bsp              1.6.0    ~0.1.0      pico_bsp=1.6.0»hal=0.1.0
pico_examples         1.6.0    ~0.1.0      pico_examples=1.6.0»pico_bsp=1.6.0»hal=0.1.0
pygamer_bsp           0.1.0    ^0.1.0      pygamer_bsp=0.1.0»cortex_m=0.3.0»hal=0.1.0
pygamer_simulator     1.0.0    ~0.1.0      pygamer_simulator=1.0.0»hal=0.1.0
rp2040_hal            1.6.0    ~0.1.0      rp2040_hal=1.6.0»hal=0.1.0
samd51_hal            0.3.0    ~0.1.0      samd51_hal=0.3.0»hal=0.1.0
sh1107                1.2.2    ^0.1.0      sh1107=1.2.2»embedded_components=0.1.0»hal=0.1.0
shoot_n_loot          1.0.0    ~0.1.0      shoot_n_loot=1.0.0»pygamer_simulator=1.0.0»hal=0.1.0
tiny_rp2040_bsp       0.1.0    ~0.1.0      tiny_rp2040_bsp=0.1.0»rp2040_hal=1.6.0»hal=0.1.0
tiny_text             1.0.0    *           tiny_text=1.0.0»hal=0.1.0
usb_embedded          0.2.0    ~0.1.0      usb_embedded=0.2.0»hal=0.1.0
virtapu               0.1.1    ^0.1.0      virtapu=0.1.1»hal=0.1.0

@mosteo mosteo marked this pull request as ready for review September 1, 2022 16:48
@mosteo mosteo merged commit 7b8f232 into alire-project:master Sep 14, 2022
@mosteo mosteo deleted the feat/dependents branch September 14, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants