Skip to content

Bug with bst show, and --exclude and overridden nested junctions. #1935

@gtristan

Description

@gtristan

Encountered a very obscure loading related issue today.

Not writing up an explicit sample test setup just yet but while it's fresh on my mind, consider a diamond setup with 4 projects:

           (toplevel)
           /         \
         /             \
   (platform)      (feature)
         \             /
           \         /
        (freedesktop-sdk)
  • toplevel: A toplevel product project
  • platform: A specialized platform project modeled on top of fdsdk
  • feature: A specialized feature project, bringing in a framework, that builds on top of fdsdk
  • fdsdk: The base runtime

Both the platform and feature projects have a junction to fdsdk.

Toplevel project relations with subprojects

freedesktop-sdk.bst

There is a link to the platform project's fdsdk junction

kind: link

config:
  target: platform.bst:freedesktop-sdk.bst

platform.bst

This is a normal junction element to the platform project, we trust the platform for deciding on the fdsdk version.

feature.bst

When junctioning our feature project, which brings in some framework we want to use... we make sure to build it against the fdsdk version determined by the platform project, using an override of it's fdsdk junction.

sources:
- kind: git
  url: feature.com/git

config:
  overrides:
    # Override fdsdk with our local link element
    freedesktop-sdk.bst: freedesktop-sdk.bst

Feature base stack

Now, the feature project has decided to create a base.bst element as shorthand for referring to the base runtime, coincidentally, it has done so using a stack element rather than a link, it looks like this:

kind: stack

# depends on bootstrap-import.bst
depends:
- freedesktop-sdk.bst:bootstrap-import.bst

Running bst show behaviors.

Exclude via platform, full path

bst show --deps run foo.bst bar.bst baz.bst --exclude platform.bst:freedesktop-sdk.bst:bootstrap-import.bst

As expected, the bootstrap elements are not reported in bst show.

Exclude via link

bst show --deps run foo.bst bar.bst baz.bst --exclude freedesktop-sdk.bst:bootstrap-import.bst

Again, we get the correct result

Exclude via the feature project's base element

bst show --deps run foo.bst bar.bst baz.bst --exclude feature.bst:base.bst

Here is the weird bug.

Here we are seeing the bootstrap elements from fdsdk shown, even though we have excluded the base.bst element in the feature.bst project which directly depends on freedesktop-sdk.bst:bootstrap-import.bst.

I suspect that this may have to do with load ordering and the fact that the freedesktop-sdk.bst junction in the feature branch was overridden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions