www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - help: Unresolvable dependencies to package openssl

reply mw <mingwu gmail.com> writes:
Hi,

In my dub.json, I have:

```
             "dependencies": {
                     "apache-thrift": "==0.16.0",
                     ...
             }

             "subConfigurations": {
                     "apache-thrift": "use_openssl_1_1",
                     "pyd": "python39"
             },

```

But:

     $ dub build
     Unresolvable dependencies to package openssl:
       apache-thrift 0.16.0 depends on openssl ~>2.0.3
       apache-thrift 0.16.0 depends on openssl ~>1.1.6
       app ~master depends on openssl ~>2.0.3


Why the subConfigurations: "use_openssl_1_1":

https://github.com/apache/thrift/blob/master/dub.json#L26

         {
           "name": "use_openssl_1_1",
           "versions": ["use_openssl_1_1_x"],
           "dependencies": {
             "openssl": {
               "version": "~>2.0.3"
             }
           }
         }

did not pick up the 2.0.3? but report conflict instead?

Thanks.
Mar 08 2023
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 3/8/23 7:52 PM, mw wrote:
 Hi,
 
 In my dub.json, I have:
 
 ```
              "dependencies": {
                      "apache-thrift": "==0.16.0",
                      ...
              }
 
              "subConfigurations": {
                      "apache-thrift": "use_openssl_1_1",
                      "pyd": "python39"
              },
 
 ```
 
 But:
 
      $ dub build
      Unresolvable dependencies to package openssl:
        apache-thrift 0.16.0 depends on openssl ~>2.0.3
        apache-thrift 0.16.0 depends on openssl ~>1.1.6
        app ~master depends on openssl ~>2.0.3
 
 
 Why the subConfigurations: "use_openssl_1_1":
 
 https://github.com/apache/thrift/blob/master/dub.json#L26
 
          {
            "name": "use_openssl_1_1",
            "versions": ["use_openssl_1_1_x"],
            "dependencies": {
              "openssl": {
                "version": "~>2.0.3"
              }
            }
          }
 
 did not pick up the 2.0.3? but report conflict instead?
 
 Thanks.
This is a known limitation -- dub builds the selections file based on *all* configurations in the file. If you have conflicting ones, it will not know what to pick. However, if you manually construct the selections file, then it will work. See https://github.com/dlang/dub/issues/1217 -Steve
Mar 08 2023
parent mw <mingwu gmail.com> writes:
On Thursday, 9 March 2023 at 01:22:08 UTC, Steven Schveighoffer 
wrote:
 This is a known limitation -- dub builds the selections file 
 based on *all* configurations in the file. If you have 
 conflicting ones, it will not know what to pick.

 However, if you manually construct the selections file, then it 
 will work.
Thanks, it worked.
 See https://github.com/dlang/dub/issues/1217

 -Steve
Mar 09 2023