Skip to content

-d option does not work #3074

@shoo

Description

@shoo

The following code does not work when using -d

int main() {
	debug (TEST) {
		import std.stdio;
		writeln("DEBUGGING");
		return 0;
	} else {
		return 1;
	}
}

Running:

dub run -d=TEST 

results in:

       Error Error processing arguments: Can't parse string: bool should be case-insensitive 'true' or 'false'
             Run 'dub help' for usage information.

However, this command works as expected:

dub run --debug=TEST

Currently, -d is documented as an alias for --debug.
But there is also an undocumented option, --deep, which also assigns -d as an alias. This leads to a conflict:

  -d  --deep            Build all dependencies, even when main target is a
                        static library.
  -d  --debug=VALUE     Define the specified `debug` version identifier when
                        building - can be used multiple times

I believe this conflict is the reason why -d does not work as intended.
If that is the case, I suggest removing the -d alias from --deep.

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