workspaced.com.dub
-
Declaration
void
startup
(stringdir
, boolregisterImportProvider
= true, boolregisterStringImportProvider
= true, boolregisterImportFilesProvider
= false);Load function for dub. Call with
{"cmd": "load", "components": ["dub"]}
This will start dub and load all import paths. All dub methods are used with"cmd": "dub"
Note: This will block any incoming requests while loading.
-
Declaration
void
stop
();Stops dub when called.
-
Declaration
void
update
(AsyncCallbackcallback
);Reloads the dub.json or dub.sdl file from the cwd
Return Value
false
if there are no import paths availableCall With:
{"subcmd": "
update
"} -
Declaration
void
upgrade
();Calls
dub
upgrade
Call With:
{"subcmd": "
upgrade
"} -
Declaration
@property auto
dependencies
();Lists all
dependencies
. This will go through alldependencies
and contain thedependencies
ofdependencies
. You need to create a tree structure from this yourself.Return Value
[{
dependencies
: [string], ver: string, name: string}]Call With:
{"subcmd": "list:dep"}
-
Declaration
@property auto
rootDependencies
();Lists dependencies of the root package. This can be used as a base to create a tree structure.
Return Value
[string]
Call With:
{"subcmd": "list:rootdep"}
-
Declaration
@property string[]
imports
();Lists all import paths
Call With:
{"subcmd": "list:import"}
-
Declaration
@property string[]
stringImports
();Lists all string import paths
Call With:
{"subcmd": "list:string-import"}
-
Declaration
@property string[]
fileImports
();Lists all import paths to files
Call With:
{"subcmd": "list:file-import"}
-
Declaration
@property string[]
configurations
();Lists all
configurations
defined in the package descriptionCall With:
{"subcmd": "list:
configurations
"} -
Declaration
@property string[]
buildTypes
();Lists all build types defined in the package description AND the predefined ones from dub ("plain", "debug", "release", "release-debug", "release-nobounds", "unittest", "docs", "ddox", "profile", "profile-gc", "cov", "unittest-cov")
Call With:
{"subcmd": "list:build-types"}
-
Declaration
@property string
configuration
();Gets the current selected
configuration
Call With:
{"subcmd": "get:
configuration
"} -
Declaration
bool
setConfiguration
(stringconfiguration
);Selects a new
configuration
and updates the import paths accordinglyReturn Value
false
if there are no import paths in the newconfiguration
Call With:
{"subcmd": "set:
configuration
"} -
Declaration
@property string[]
archTypes
();List all possible arch types for current set compiler
Call With:
{"subcmd": "list:arch-types"}
-
Declaration
@property string
archType
();Returns the current selected arch type
Call With:
{"subcmd": "get:arch-type"}
-
Declaration
bool
setArchType
(JSONValuerequest
);Selects a new arch type and updates the import paths accordingly
Return Value
false
if there are no import paths in the new arch typeCall With:
{"subcmd": "set:arch-type"}
-
Declaration
@property string
buildType
();Returns the current selected build type
Call With:
{"subcmd": "get:build-type"}
-
Declaration
bool
setBuildType
(JSONValuerequest
);Selects a new build type and updates the import paths accordingly
Return Value
false
if there are no import paths in the new build typeCall With:
{"subcmd": "set:build-type"}
-
Declaration
@property string
compiler
();Returns the current selected
compiler
Call With:
{"subcmd": "get:
compiler
"} -
Declaration
bool
setCompiler
(stringcompiler
);Selects a new
compiler
for buildingReturn Value
false
if thecompiler
does not existCall With:
{"subcmd": "set:
compiler
"} -
Declaration
@property string
name
();Returns the project
name
Call With:
{"subcmd": "get:
name
"} -
Declaration
@property auto
path
();Returns the project
path
Call With:
{"subcmd": "get:
path
"} -
Declaration
void
build
(AsyncCallbackcb
);Asynchroniously builds the project WITHOUT OUTPUT. This is intended for linting code and showing
build
errors quickly inside the IDE.Return Value
[{line: int, column: int, type: ErrorType, text: string}]
where type is an integerCall With:
{"subcmd": "
build
"} -
Declaration
enum
ErrorType
: ubyte;-
Declaration
Error
-
Declaration
Warning
-
Declaration
Deprecation
-
-
Declaration
struct
BuildIssue
;