Help with pattern based collections

Could someone help me understand what I’m doing wrong here:

def "World" {
  def "Foo" {
    def "Bar" {  # I want the path expression to match this!

    }
  }

  pathExpression collection:test:membershipExpression = "/World/Foo//Bar"
}

This evaluates to nothing.

I’d expect all these variations to also work, but some do and some don’t:

  • /World//Bar - YES
  • /World//Foo/Bar - YES
  • /World/Foo/Bar - NO
  • /World/Foo/Bar* - NO
  • /World/Foo*/Bar* - YES
  • /World/Foo*/Bar - YES

I’m on version 23.11.

I did discover this (ugly) workaround:

def "World" {
  def "Baz" {
    def "Foo" {
      def "Bar" {
      }
    }
  }

  pathExpression collection:test:membershipExpression = "/World//Foo//Bar"
}

Something about inserting an intermediate prim between World and Foo makes the “//Bar” part work as well.

Could you try 24.11? There were a handful of correctness fixes that went into pbc’s this year…