Skip to content

BuildStream crashes when we try to use the same junction twice, but named differently

I have a BuildStream project that depends on two junctions (junctionA and junctionB). JunctionA also depends on junctionB.

Now, if in my project I declare the junction element 'junction-B.bst', and in the junctionA project I declare the junction element 'junction-B-diff-name.bst' (i.e. a junction element representing the same junction but just with a different filename) BuildStream will crash when trying to use things from junctionB via my project (e.g. junction-b.bst:foo.bst) and via junctionA's junction to junctionB (e.g. junction-A.bst:junction-B.bst:bar.bst).

I appreciate it's hard to picture what I've described above, so I've created a project which replicates this bug here: https://gitlab.com/jennis/bstjunctionsbug

This is what happens when I try to build something that depends on the same junction in two different ways:

 $ bst build use-junctions.bst 
[--:--:--][][] START   Build
[--:--:--][][] START   Loading elements
[00:00:00][][] FAILURE Loading elements
[00:00:00][][] FAILURE Build


base.bst [line 3 column 2]: Dictionary did not contain expected key 'kind'

I'm 100% sure that base.bst does contain kind. This exists in junctionB and I'm able to build it in the junctionB project.

  1. This error is misleading/incorrect
  2. BuildStream shouldn't crash when the junction is named differently in two projects

Important note

Bare in mind that if we change the junction element name in our project from 'junction-B.bst' to 'junction-B-diff-name.bst' BuildStream won't crash. However, IMO I think BuildStream should be able to handle inconsistent naming.

Edited by James Ennis
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information