code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Builder can't detect a nested dub sub-package

Open aubade opened this issue 3 years ago • 1 comments

I've got a complicated dub definition file for my project that I'm trying to get code-d to cooperate with.

{
	"name" : "ice-engine",
	"description" : "The Identity Crisis Engine",
	"homepage" : "<redacted>",
	"copyright" : "Copyright �2013-2014, <redacted>",
	"license": "proprietary",
	"workingDirectory":".",
	"targetPath":"bin",
	"targetType":"none",
	"importPaths": ["Libraries", "Libraries/misc", "Engine", "Vanilla", "TestApps", "ICE"],
	"sourcePaths": ["Libraries/misc"],
	"copyFiles-windows": ["extlibs\\dsfmlc-audio-2.dll", "extlibs\\dsfmlc-graphics-2.dll", "extlibs\\dsfmlc-window-2.dll",
							"extlibs\\dsfmlc-system-2.dll", "extlibs\\openal32.dll", "extlibs\\libsndfile-1.dll",
							"extlibs\\libmodplug.dll", "extlibs\\physfs.dll", "extlibs\\lua51.dll",
							"extlibs\\libgcc_s_dw2-1.dll", "extlibs\\libstdc++-6.dll", "extlibs\\libwinpthread-1.dll"
	],
	"subPackages":[
		"./Engine/spqr",
		"./Engine/sundery",
		"./Engine/grap",
		"./Engine/phil",
		"./Engine/echo",
		"./Engine/wander",
		"./Engine/tiler",
		"./Engine/yui",
		"./Engine/assetman",
		"./Engine/scrip",
		"./Engine/brain",
		"./Vanilla/",
		"./ICE/",
		{
			"name":"enginetest",
			"targetType":"executable",	
			"targetName":"ICE-test",
			"targetPath":"bin",
			"dependencies": {
				"ice-engine:spqr":"*",
				"ice-engine:sundery":"*",
				"ice-engine:phil":"*",
				"ice-engine:grap":"*",
				"ice-engine:echo":"*",
				"ice-engine:wander":"*",
				"ice-engine:tiler":"*",
				"ice-engine:yui":"*",
				"ice-engine:scrip":"*",
				"ice-engine:assetman":"*",
				"ice-engine:brain":"*"
			},
			"configurations": [
				{
					"name":"standard"
				},
				{
					"name":"nothread",
					"subConfigurations":{
						"ice-engine:spqr":"nothread",
						"ice-engine:sundery":"nothread",
						"ice-engine:phil":"nothread",
						"ice-engine:grap":"nothread",
						"ice-engine:echo":"nothread",
						"ice-engine:wander":"nothread",
						"ice-engine:tiler":"nothread",
						"ice-engine:yui":"nothread",
						"ice-engine:scrip":"nothread",
						"ice-engine:assetman":"nothread",
						"ice-engine:brain":"nothread"
					}
				}
			],
			"buildTypes": {
				"profile": {
					"buildRequirements":["allowWarnings"],
					"buildOptions": ["debugInfo","releaseMode", "optimize", "inline", "noBoundsCheck", "profile"],
					"dflags-gdc":["-pg"],
					"libs-posix-gdc":["c_p"]
				},
				"debug": {
					"buildOptions": ["debugInfo", "debugMode","alwaysStackFrame"]
				},
				"debug-optimize": {
					"buildOptions": ["debugInfo", "debugMode",  "alwaysStackFrame", "optimize", "inline"]
				},
				"release":{
					"lflags-windows-x86-dmd": ["/SUBSYSTEM:WINDOWS"],
					"buildOptions": ["releaseMode", "optimize", "inline", "noBoundsCheck"]
				},
					"release-symbols":{
					"lflags-windows-x86-dmd": ["/SUBSYSTEM:WINDOWS"],
					"buildOptions": ["debugInfo","releaseMode", "optimize", "inline", "noBoundsCheck"]
				}
			},           		
			"lflags-windows-x86-dmd":["/LIBPATH:..\\extlibs\\coff","/LIBPATH:.\\extlibs\\coff","..\\DSFMLC\\build\\lib"],
			"lflags-windows-ldc":["-L.\\extlibs\\coff"],
			"sourceFiles":["TestApps/testcode2.d"],
			"versions":["EngineTest", "fpfloat"]
		}
	],
	"buildTypes": {
		"profile": {
			"buildRequirements":["allowWarnings"],
			"buildOptions": ["debugInfo","releaseMode", "optimize", "inline", "noBoundsCheck", "profile"],
			"dflags-gdc":["-pg"],
			"libs-posix-gdc":["c_p"]
		},
		"debug": {
			"buildOptions-windows": ["debugInfo","debugMode","alwaysStackFrame", "stackStomping"]
		},
		"debug-optimize": {
			"buildOptions": ["debugMode", "debugInfo", "alwaysStackFrame", "stackStomping", "optimize", "inline"]
		},
		"release":{
			"lflags-windows-x86-dmd": ["/SUBSYSTEM:WINDOWS"],
			"buildOptions": ["releaseMode", "optimize", "inline", "noBoundsCheck"]
		},
		"release-symbols":{
			"lflags-windows-x86-dmd": ["/SUBSYSTEM:WINDOWS"],
			"buildOptions": ["debugInfo","releaseMode", "optimize", "inline", "noBoundsCheck"]
		}

	}
}

(visible in context at https://bitbucket.org/aubade/ice/src if such is important)

Either way, the important thing at the moment is to be able to build the "enginetest" subpackage. Unfortunately, code-d sees all the subpackages except the bottom two ("./ICE", and the nested EngineTest subpackage)

I've tried taking one of the tasks it does support and just modifying that but there seems to be no way for a tasks.json to specify to dub which module needs building. (i.e. "dub build ice:enginetest")

aubade avatar Jan 09 '22 23:01 aubade

I think as a workaround you should be able to use "dub_args": [":enginetest"] in your custom config for now

WebFreak001 avatar Jan 10 '22 07:01 WebFreak001