digitalmars.D - I just want a dub subpackage to refer to the parent package
- Pillager86 (5/5) May 01 2020 I did add-local on the main package yet the subpackage can't find
- Pillager86 (2/8) May 01 2020 Nevermind I fixed it. Still dub needs help.
- Dennis (3/5) May 01 2020 Yeah :(
- Steven Schveighoffer (21/26) May 01 2020 I went through something similar to this recently. I used vibe.d's dub
- Luis (19/47) May 01 2020 Umm.... It's like what I did on Pegged to subpackage some
I did add-local on the main package yet the subpackage can't find the import paths even though it compiled before. Why is this so difficult? It has to be structured like this. If you have a game engine, the logical thing to do is make a subpackage that implements the main function that tests it. Dub needs help.
May 01 2020
On Friday, 1 May 2020 at 17:00:56 UTC, Pillager86 wrote:I did add-local on the main package yet the subpackage can't find the import paths even though it compiled before. Why is this so difficult? It has to be structured like this. If you have a game engine, the logical thing to do is make a subpackage that implements the main function that tests it. Dub needs help.Nevermind I fixed it. Still dub needs help.
May 01 2020
On Friday, 1 May 2020 at 17:13:37 UTC, Pillager86 wrote:Nevermind I fixed it.What was the fix?Still dub needs help.Yeah :(
May 01 2020
On 5/1/20 1:00 PM, Pillager86 wrote:I did add-local on the main package yet the subpackage can't find the import paths even though it compiled before. Why is this so difficult? It has to be structured like this. If you have a game engine, the logical thing to do is make a subpackage that implements the main function that tests it. Dub needs help.I went through something similar to this recently. I used vibe.d's dub recipes as a guide. What you want to do is this in your main package file: "subPackages" : [ "package1", "package2", ... ] Then in e.g. package1 recipe file: "dependencies" : { "mainPackage" : { "path" : ".." }, "mainPackage:package2" : { "path" : ".." } } That second one is what really threw me for a loop. You use the path to the main package, but then name the subpackage you are depending on. -Steve
May 01 2020
On Friday, 1 May 2020 at 17:32:31 UTC, Steven Schveighoffer wrote:On 5/1/20 1:00 PM, Pillager86 wrote:Umm.... It's like what I did on Pegged to subpackage some examples. In particular, the grammar composition example have a dependency to the main package (Pegged) and to two other examples : "dependencies": { "pegged": { "version": "*", "path": "../.." }, "pegged:strings": { "version": "*", "path": "../.." }, "pegged:numbers": { "version": "*", "path": "../.." } }I did add-local on the main package yet the subpackage can't find the import paths even though it compiled before. Why is this so difficult? It has to be structured like this. If you have a game engine, the logical thing to do is make a subpackage that implements the main function that tests it. Dub needs help.I went through something similar to this recently. I used vibe.d's dub recipes as a guide. What you want to do is this in your main package file: "subPackages" : [ "package1", "package2", ... ] Then in e.g. package1 recipe file: "dependencies" : { "mainPackage" : { "path" : ".." }, "mainPackage:package2" : { "path" : ".." } } That second one is what really threw me for a loop. You use the path to the main package, but then name the subpackage you are depending on. -Steve
May 01 2020