www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub + local dependencies

reply Jolly James <j.j jmail.com> writes:
 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?
Jul 05 2017
parent reply Mike Parker <aldacron gmail.com> writes:
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`
Jul 05 2017
parent reply Mike Parker <aldacron gmail.com> writes:
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
Jul 05 2017
parent Jolly James <j.j jmail.com> writes:
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
Jul 06 2017