how to specify a default configuration in a library's dub.json? (i.e if the use doesn't not have subConfigurations)

mw mingwu at gmail.com
Wed May 26 22:45:20 UTC 2021


> BTW, is the version string quote causing the problem: 
> "use_openssl_1_0_x" is defined as a version string in the 
> dub.json, but in the code:
>
> https://github.com/apache/thrift/pull/2397/files#diff-731671345667ab400d85c10e38fb33ed0c39b1e4d6b38456949284e4e1f47b66R93
>
> I'm checking it as:
>
>     ```
>       version(use_openssl_1_0_x) {  // without the quote "", 
> should I have string quote here?
>       }
>     ```

I'm following pyd's example:

https://github.com/ariovistus/pyd/blob/master/dub.json#L35

```
"versions": [
				"Python_2_4_Or_Later",
				"Python_2_5_Or_Later",
				"Python_2_6_Or_Later",
				"Python_2_7_Or_Later"
			]
```

`"Python_2_7_Or_Later"` is introduced as quoted string in 
dub.json, and later:

https://github.com/ariovistus/pyd/blob/master/infrastructure/deimos/python/dictobject.d#L118

```
version(Python_2_7_Or_Later) {
}
```

`Python_2_7_Or_Later` is directly used as version label, without 
being quoted.


So how to fix the problem?


More information about the Digitalmars-d-learn mailing list