On 2019-03-31 13:39, Mihails wrote:

Contrary to `install.sh` and DVM approach, DC changes active compiler globally instead of a current shell context only.

FYI, DVM allows to set the globally active compiler as well, using "dvm use <version> -d". This is known as the default compiler.

These days I don't use the "use" command that often because the compiler is more stable, less reason to pin a project to a given compiler version. Also most of my projects work with the latest version of the compiler.

This done intentionally to simplify integration with IDEs and other non-CLI tools - though temporary shell-only switching is also planned once I come with a decent design.

DVM has two wrappers that helps with editor and IDE integration in the form of "dvm-current-dc", which always points to the currently active compiler (which actually more is the latest chosen compiler) and "dvm-default-dc" which always points to the default, or global, compiler. Both of these live in "~/.dvm/bin" (on Posix). You can point your editor or IDE to the full path of one of these two wrappers. DVM also provides wrappers for each compiler version in the form of "dmd-<version>" also located in "~/.dvm/bin", if you want to explicitly invoke a given version without switching the active version.

--
/Jacob Carlborg

Reply via email to