Skip to content

dub run with targetType none fails with assert error instead of proper error message #2618

@MrcSnm

Description

@MrcSnm

System information

  • dub version: 1.31.1
  • OS Platform and distribution: MacOS 12.6 Monterey
  • compiler version: 2.102.1

Bug Description

I'm trying to pull my libraries using targetType none, but on macOS I get the following error:

core.exception.AssertError@source/dub/compilers/dmd.d(303): No target name set.

How to reproduce?

"name": "hipremeengine_ios",
	"authors": [
		"Marcelo Silva"
	],
	"targetType": "library",
	"targetPath": "libs",
	"copyright": "Copyright © 2023, Marcelo Silva",
	"dependencies": {
		"metal": {"path": "/Users/marcelosilva/Desktop/D/HipremeEngine/dependencies/metal/"}
	},

	"configurations": [
		{
			"name": "dependencies",
			"targetType": "none",
			"targetName": "metal",
			"postBuildCommands": [
				"cp /Users/marcelosilva/Desktop/D/HipremeEngine/dependencies/metal/libmetal.a libs"
			]
		}
	],
	"postBuildCommands": [
		"dub build -c dependencies"
	]

Expected Behavior

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions