Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 05, 2017 dub + local dependencies | ||||
---|---|---|---|---|
| ||||
> WARNING: A deprecated branch based version specification is used for the dependency xyz. > Please use numbered versions instead. > Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead. The problem is: xyz is a local package and therefor I don't know how to specify its version. So in the dub.json of the package abc requiring xyz is written: > "dependencies": { > "xyz": "~master" > }, Is there a cleaner solution? |
July 06, 2017 Re: dub + local dependencies | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jolly James | On Wednesday, 5 July 2017 at 15:34:36 UTC, Jolly James wrote:
>> WARNING: A deprecated branch based version specification is used for the dependency xyz.
>> Please use numbered versions instead.
>> Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
>
>
> The problem is: xyz is a local package and therefor I don't know how to specify its version. So in the dub.json of the package abc requiring xyz is written:
>
>
>> "dependencies": {
>> "xyz": "~master"
>> },
>
>
> Is there a cleaner solution?
You have a few options:
* Use a path dependency:
"dependencies": {
"xyz": { "path": "path/to/xyz" }
}
* Use add-local with a version on the command line:
dub add-local path/to/xyz 0.0.1
* Use add-local or add-paths and specify a version as described by `dub add-paths -h`
|
July 06, 2017 Re: dub + local dependencies | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Thursday, 6 July 2017 at 00:09:46 UTC, Mike Parker wrote: > > You have a few options: > > * Use a path dependency: > "dependencies": { > "xyz": { "path": "path/to/xyz" } > } > > * Use add-local with a version on the command line: > dub add-local path/to/xyz 0.0.1 > > * Use add-local or add-paths and specify a version as described by `dub add-paths -h` Sorry -- extraneous `s` on the `path` bit. And for the record: https://code.dlang.org/docs/commandline#add-local https://code.dlang.org/docs/commandline#add-path https://code.dlang.org/package-format?lang=json#version-specs |
July 06, 2017 Re: dub + local dependencies | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Thursday, 6 July 2017 at 00:12:25 UTC, Mike Parker wrote:
> On Thursday, 6 July 2017 at 00:09:46 UTC, Mike Parker wrote:
>
>>
>> You have a few options:
>>
>> * Use a path dependency:
>> "dependencies": {
>> "xyz": { "path": "path/to/xyz" }
>> }
>>
>> * Use add-local with a version on the command line:
>> dub add-local path/to/xyz 0.0.1
>>
>> * Use add-local or add-paths and specify a version as described by `dub add-paths -h`
>
> Sorry -- extraneous `s` on the `path` bit.
>
> And for the record:
>
> https://code.dlang.org/docs/commandline#add-local
> https://code.dlang.org/docs/commandline#add-path
> https://code.dlang.org/package-format?lang=json#version-specs
thx
|
Copyright © 1999-2021 by the D Language Foundation