Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-576

it must be possible to explicitly declare alternative dependencies

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 1.2.0
    • None

      the current recommendation to make a prioritized list of alternative dependencies is daisy-chaining optional dependencies by their condition, ending with the least desired one being mandatory.

      the downside of this approach is that if neither one is available, the complaint will be actually about the least desirable one. this is obviously not too helpful.

      that means that is must be possible to explicitly declare alternatives and prioritize them:

      Product {
          ...
          AlternativeDepends {
              Depends {
                  name: "gnutls"
                  priority: 0
              }
              Depends {
                  name: "openssl"
                  priority: 1
              }
              Depends {
                  name: "nss"
                  priority: 2
              }
          }
      }
      

      or maybe like that:

      Product {
          ...
          Depends {
              alternatives: // Array of Depends. property name is optional - it's actually the auto-append property.
                  [{
                      name: "gnutls"
                      priority: 0
                  }, {
                      name: "openssl"
                      priority: 1
                  }, {
                      name: "nss"
                      priority: 2
                  }]
          }
      }
      

      or maybe like that:

      Product {
          ...
          Depends {
              name: "gnutls"
              group: "ssl"
              priority: 0
          }
          Depends {
              name: "openssl"
              group: "ssl"
              priority: 1
          }
          Depends {
              name: "nss"
              group: "ssl"
              priority: 2
          }
      }
      

      additional consideration: what if an alternative actually needs multiple modules to be satisfied?
      maybe it would make sense to say that all dependencies with the same priority must be satisfied at the same time (rather than conflicting).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            buddenha Oswald Buddenhagen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes