Visual D error messages not useful
Rainer Schuetze
r.sagitario at gmx.de
Thu May 14 06:37:46 UTC 2020
On 12/05/2020 18:33, FunkyD wrote:
> Win32\Debug DMD\TestApp.exe not up to date: command line changed
> ------ Build started: Project: TestApp, Configuration: Debug DMD Win32
> ------
> Building Win32\Debug DMD\TestApp.exe...
> 1 file(s) copied.
I haven't found any invocation of "copy" in the batches generated by
Visual D, is that the output of a custom build step?
> Building Win32\Debug DMD\TestApp.exe failed!
> Details saved as
> "file://C:\TestApp\TestApp\Win32\Debug%20DMD\TestApp.buildlog.html"
> Build time: 9 s
> Solution build stopped.
> Build has been canceled.
>
> I have no idea why my app won't compile. Same stuff in x64 mode. It used
> to compile but it's been a while since I've tried and have updated dmd
> and visual d several times since. Nothing in the log
>
> In the html file:
>
> if %errorlevel% neq 0 goto reportError
All usages of this statement follow an invocation of some program that
is expected to print its own message on failure.
Other similar cases add a message about what is probably wrong.
> ...
> :reportError
> echo Building Win32\Debug DMD\TestApp.exe failed!
>
> Which is a useless error message. Can we not get an error message that
> actually helps and also maybe the line number which of the html file
> that has the error?
>
The html file is just a capture of the output pane.
>
> Suggestions:
>
> 1. Replace the error goto's with more useful info such as passing the
> line of the batch file(or some unique id to find it) and also the last
> line that erred(the line above the if statement usually).
>
> 2. Possibly first check paths that are used by the compilation process
> and all the exe's used to make sure they exist. Do this first before
> compiling. I'm thinking maybe something changed with the windows
> libraries but I have no idea because the buildlog is large and has many
> of those error goto's that any one could have been the problem.
>
Indeed there might be cases where the invoked executable is not found by
the system, and the cmd interpreter just reports "command not found" or
similar without telling what comamnd is invoked. Retrying that now, it
seems that has changed, maybe with recent Windows versions.
>
> I'm pretty sure you generate the build batch file so you could easily
> automate adding better checking like this(unique id or line number)
> along with printing out the command line that failed or whatever fails.
> Also it should be easy to add a few `if exists` type of checks for the
> various paths used in building(both windows stuff and dmd/visual d).
> Normally these checks should pass fine but in some cases they won't and
> it would be helpful to have that info.
>
>
> Maybe even have a verbose mode that provides more info?
You can run the generated batch (e.g. Debug\TestApp.build.cmd) from the
command line (from the folder of the project). This will echo the
executed commands to the console.
Maybe an option to show this output in the output window would help.
More information about the Digitalmars-d-ide
mailing list