Bug 23642 – DMD installer should set up PATH in the same order as it was before reinstall

Status
NEW
Severity
enhancement
Priority
P4
Component
installer
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2023-01-19T16:53:17Z
Last change time
2025-01-02T15:47:33Z
Assigned to
No Owner
Creator
Andrej Mitrovic
Moved to GitHub: installer#711 →

Comments

Comment #0 by andrej.mitrovich — 2023-01-19T16:53:17Z
It seems that reinstalling DMD on Windows will cause it to first uninstall and remove DMD from PATH, and then install it and add DMD to PATH as the *last* entry. This can cause unexpected problems, for example: - If there is no user-provided dub settings file (https://dub.pm/settings) - And if another D compiler is installed and is in PATH, e.g. LDC - And if the DMD was in PATH before LDC Then after installing a new version of DMD via the installer the LDC compiler will be picked up by default by DUB. Of course one can set up the default with https://dub.pm/settings, but the user may not be aware of that.
Comment #1 by andrej.mitrovich — 2023-01-21T06:00:43Z
It was clarified to me that in fact LDC comes with its own distribution of DUB. So that version was picked first from the PATH, and naturally that version of DUB prefers LDC by default. Still the installer should be improved to keep DMD in the same PATH location compared to other paths.
Comment #2 by robert.schadek — 2025-01-02T15:47:33Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/installer/issues/711 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB