www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Visual D cutting off pragma msg?

reply Inquie <Inquie data.com> writes:
Sometimes when I compile certain long pragmas it seems that 
Visual D cuts off some of the output. This occurred in both dmd 
and ldc so I do not think it is a compiler issue.

It has only recently been doing this as far as I know. It may be 
due to the build time being output too soon(before it's really 
finished output the message) and/or due to the visual studio 2017.

It's not easily reproducible but is pretty consistent when the 
same output is displayed. (I know it's cutting it off because the 
pragma msg is also written to disk and it is complete in the file)
Apr 02 2017
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 02.04.2017 21:12, Inquie wrote:
 Sometimes when I compile certain long pragmas it seems that Visual D
 cuts off some of the output. This occurred in both dmd and ldc so I do
 not think it is a compiler issue.
Both compilers share the same front end, and pragma(msg) is evaluated there, so it could still happen in the compiler.
 It has only recently been doing this as far as I know. It may be due to
 the build time being output too soon(before it's really finished output
 the message) and/or due to the visual studio 2017.

 It's not easily reproducible but is pretty consistent when the same
 output is displayed. (I know it's cutting it off because the pragma msg
 is also written to disk and it is complete in the file)
Do you have an example for reproduction? I tried messages of different lengths (up to 100017) but could not see a problem. How do you write the message to disk at the same time? Or do you mean the build log?
Apr 02 2017
parent Inquie <Inquie data.com> writes:
On Monday, 3 April 2017 at 06:39:50 UTC, Rainer Schuetze wrote:
 On 02.04.2017 21:12, Inquie wrote:
 Sometimes when I compile certain long pragmas it seems that 
 Visual D
 cuts off some of the output. This occurred in both dmd and ldc 
 so I do
 not think it is a compiler issue.
Both compilers share the same front end, and pragma(msg) is evaluated there, so it could still happen in the compiler.
ok, it might be an issue with D then.
 It has only recently been doing this as far as I know. It may 
 be due to
 the build time being output too soon(before it's really 
 finished output
 the message) and/or due to the visual studio 2017.

 It's not easily reproducible but is pretty consistent when the 
 same
 output is displayed. (I know it's cutting it off because the 
 pragma msg
 is also written to disk and it is complete in the file)
Do you have an example for reproduction? I tried messages of different lengths (up to 100017) but could not see a problem. How do you write the message to disk at the same time? Or do you mean the build log?
On compile I print out the pragma then I run the program and it writes that same msg to disk... since there is no way to save to file at compile time. What is being printed and what is being written is the same string so I know it is the visual that is only incomplete. I don't have a simple example right now. The length of output is about 50k chars. For example, the last line of output looks like .... Add = cast(typeof ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ...which changes and that is definitely not the last line of the pragma). I'll try to throw together code that demonstrates the issue but it might take some time. It's probably not an issue with visual d then.
Apr 03 2017