BuildStream does not automatically fetch a junction within a junction / displays an inaccurate helper

I have a project which contains a junction element (junction-A.bst). Within the junctioned project (A), there is another junction, junction-B.bst.

In my current project, I have an element (foo.bst) that depends on an element within junction A (bar.bst), and this element, in turn, depends on an element in junction B (baz.bst).

Now, with a fresh clone of my initial project, I will try to execute bst show foo.bst.

This will fail, as expected, and prompt me to fetch junction-A.

 $ bst show foo.bst 
[--:--:--][][] START   Loading elements
[00:00:00][][] FAILURE Loading elements

Subproject fetch needed for junction: junction-A.bst

    Try fetching the project with `bst fetch junction-A.bst`

Now, I bst fetch junction-A.bst:

 $ bst fetch junction-A.bst 
[--:--:--][][] START   Fetch
[--:--:--][][] START   Loading elements
[00:00:00][][] SUCCESS Loading elements
[--:--:--][][] START   Resolving elements
[00:00:00][][] SUCCESS Resolving elements
[--:--:--][][] START   Resolving cached state
[00:00:00][][] SUCCESS Resolving cached state
[--:--:--][][] START   Checking sources
[00:00:00][][] SUCCESS Checking sources

BuildStream Version 1.3.0+608.g0458bc4e
  Session Start: Tuesday, 02-10-2018 at 16:28:01
  Project:       Project (/home/jennis/bst_projects/project)
  Targets:       junction-A.bst

User Configuration
  Configuration File:      Default Configuration
  Log Files:               /home/jennis/.cache/buildstream/logs
  Source Mirrors:          /home/jennis/.cache/buildstream/sources
  Build Area:              /home/jennis/.cache/buildstream/build
  Artifact Cache:          /home/jennis/.cache/buildstream/artifacts
  Strict Build Plan:       Yes
  Maximum Fetch Tasks:     10
  Maximum Build Tasks:     4
  Maximum Push Tasks:      4
  Maximum Network Retries: 2

Pipeline
   buildable 951a30a9a9daafa7035fc68ce7967ea8031fcbde902ec0f1b67f4842f3a04e53 junction-A.bst 
===============================================================================
[00:00:00][][] SUCCESS Fetch

Pipeline Summary
  Total:       1
  Session:     0
  Fetch Queue: processed 0, skipped 0, failed 0 

All good.

Now I will try the first command again, bst show foo.bst:

 $ bst show alertproxy_stack.bst 
[--:--:--][][] START   Loading elements
[00:00:00][][] FAILURE Loading elements

Subproject fetch needed for junction: junction-B.bst

    Try fetching the project with `bst fetch junction-B.bst`

Now, junction-B.bst is not an element that actually exists in my project. It exists in project A (via junction-A.bst).

So, executing what is suggested (bst fetch junction-B.bst) fails, as expected:

 $ ▶ bst fetch junction-B.bst
[--:--:--][][] START   Fetch
[--:--:--][][] START   Loading elements
[00:00:00][][] FAILURE Loading elements
[00:00:00][][] FAILURE Fetch

Could not find element 'junction-B.bst' in elements directory '/home/jennis/bst_projects/project/elements'

Now, with knowledge of junctions, remedying this is simple. We need only execute:

bst fetch junction-A.bst:junction-B.bst

But we cannot assume that the user has this knowledge of junctions and if we could, they're still receiving an inaccurate hint: 'Try fetching the project with bst fetch junction-B.bst'

So, I think there are two options here:

  1. We ensure that the helper message is correct, i.e. it suggests we fetch junction-A.bst:junction-B.bst
  2. We recursively fetch junctions (preferable)