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

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

Open
gtristan opened this issue Jul 22, 2024 · 0 comments
Open

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

gtristan opened this issue Jul 22, 2024 · 0 comments

Comments

@gtristan
Copy link
Contributor

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.

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

No branches or pull requests

1 participant