Editor and IDE developers, add special identifiers for D single modules.

Basile B. b2.temp at gmx.com
Wed Mar 28 09:08:07 UTC 2018


Almost since its birth, the D IDE Coedit has a feature allowing 
to run or test a single module. In this case, the IDE passed 
automatically the version identifer
`runnable_module`. Since today i use new identifiers and i 
suggest you to use them too, to provide a more consistent D 
environment, in case the editor you develop propose a similar 
feature of course (I don't know the other IDEs/editors FYI).


`single_module`
===============

Should be set when a single module is compiled and executed. (add 
-version=single_module to the command line)


`run_single_module`
===================

Should be set when a single module is compiled and executed but 
not if -unittest
is also set. (add -version=run_single_module to the command line)

`test_single_module`
====================

Should be set when a single module is compiled and executed and 
if -unittest is also set. (add -version=test_single_module to the 
command line)


So that finally there will always be 2 identifiers set.
I'll also propose to the DUB developers to add this when a DUB 
script is executed.


More information about the Digitalmars-d-ide mailing list