1DUB-DESCRIBE(1) The D Language Foundation DUB-DESCRIBE(1)
2
3
4
6 dub-describe - Prints a JSON description of the project and its depen‐
7 dencies
8
10 dub describe [<package>[@<version-spec>]] OPTIONS...
11
13 Prints a JSON build description for the root package an all of their
14 dependencies in a format similar to a JSON package description file.
15 This is useful mostly for IDEs.
16
17
18
19 All usual options that are also used for build/run/generate apply.
20
21
22
23 When --data=VALUE is supplied, specific build settings for a project
24 will be printed instead (by default, formatted for the current com‐
25 piler).
26
27
28
29 The --data=VALUE option can be specified multiple times to retrieve
30 several pieces of information at once. A comma-separated list is also
31 acceptable (ex: --data=dflags,libs). The data will be output in the
32 same order requested on the command line.
33
34
35
36 The accepted values for --data=VALUE are:
37
38
39
40 main-source-file, dflags, lflags, libs, linker-files, source-files,
41 versions, debug-versions, import-paths, string-import-paths, import-
42 files, options
43
44
45
46 The following are also accepted by --data if --data-list is used:
47
48
49
50 target-type, target-path, target-name, working-directory, copy-files,
51 string-import-files, pre-generate-commands, post-generate-commands,
52 pre-build-commands, post-build-commands, pre-run-commands, post-run-
53 commands, requirements
54
56 -b, --build=VALUE
57 Specifies the type of build to perform. Note that setting the
58 DFLAGS environment variable will override the build type with cus‐
59 tom flags. Possible names:
60 debug, plain, release, release-debug, release-nobounds, unittest,
61 profile, profile-gc, docs, ddox, cov, cov-ctfe, unittest-cov,
62 unittest-cov-ctfe, syntax and custom types
63
64 -c, --config=VALUE
65 Builds the specified configuration. Configurations can be defined
66 in dub.json
67
68 --override-config=VALUE
69 Uses the specified configuration for a certain dependency. Can be
70 specified multiple times. Format: --override-config=<depen‐
71 dency>/<config>
72
73 --compiler=VALUE
74 Specifies the compiler binary to use (can be a path). Arbitrary
75 pre- and suffixes to the identifiers below are recognized (e.g.
76 ldc2 or dmd-2.063) and matched to the proper compiler type:
77 dmd, gdc, ldc, gdmd, ldmd
78
79 -a, --arch=VALUE
80 Force a different architecture (e.g. x86 or x86_64)
81
82 -d, --debug=VALUE
83 Define the specified debug version identifier when building - can
84 be used multiple times
85
86 --nodeps
87 Do not resolve missing dependencies before building
88
89 --build-mode=VALUE
90 Specifies the way the compiler and linker are invoked. Valid val‐
91 ues:
92 separate (default), allAtOnce, singleFile
93
94 --single
95 Treats the package name as a filename. The file must contain a
96 package recipe comment.
97
98 --force-remove
99 Deprecated option that does nothing.
100
101 --filter-versions
102 [Experimental] Filter version identifiers and debug version identi‐
103 fiers to improve build cache efficiency.
104
105 --import-paths
106 Shortcut for --data=import-paths --data-list
107
108 --string-import-paths
109 Shortcut for --data=string-import-paths --data-list
110
111 --data=VALUE
112 Just list the values of a particular build setting, either for this
113 package alone or recursively including all dependencies. Accepts a
114 comma-separated list. See above for more details and accepted pos‐
115 sibilities for VALUE.
116
117 --data-list
118 Output --data information in list format (line-by-line), instead of
119 formatting for a compiler command line.
120
121 --data-0
122 Output --data information using null-delimiters, rather than spaces
123 or newlines. Result is usable with, ex., xargs -0.
124
125 COMMON OPTIONS
126 See dub(1)
127
129 0 DUB succeeded
130
131 1 usage errors, unknown command line flags
132
133 2 package not found, package failed to load, miscellaneous error
134
136 dub.sdl, dub.json
137
139 Copyright (c) 1999-2023 by The D Language Foundation
140
142 http://code.dlang.org/docs/commandline ⟨⟩
143
145 dub(1), dub-generate(1)
146
147
148
149The D Language Foundation 2023-07-24 DUB-DESCRIBE(1)