digitalmars.D.learn - Visual D showing weird errors
- Raimondo Mancino (43/43) Apr 26 2021 Hello, I'm new to the language; I just started learning it a few
- Imperatorn (2/7) Apr 26 2021 What compiler and version are you using?
- Raimondo Mancino (2/11) Apr 26 2021 According to -v: DMD64 D Compiler v2.096.0-dirty
- Johann Lermer (4/5) Apr 26 2021 Well, that says it all, doesn't it? I'm not familiar with the
- Mike Parker (3/10) Apr 26 2021 That's actually normal for the Windows versions. I'm not sure
- Johann Lermer (4/6) Apr 26 2021 Ouuu, that's bad advertising, isn't it? Who wants to use dirty
- Mike Parker (3/6) Apr 26 2021 You might try to build outside of VS and see if you get the same
- Raimondo Mancino (8/10) Apr 26 2021 The weird thing is that I get these errors just in the errors
- Mike Parker (2/12) Apr 26 2021 Might be related to recent work on the semantic engine.
- Imperatorn (3/13) Apr 26 2021 Also, be sure to join on Discord as well
- Raimondo Mancino (2/4) Apr 26 2021 Thank you, I think I'll join.
- Adam D. Ruppe (14/16) Apr 26 2021 Do you have a separate object.d in your current directory? That
- Raimondo Mancino (5/18) Apr 26 2021 Actually, you were right. I was about to write that updating
- Rainer Schuetze (8/21) Apr 26 2021 The problem is that the semantic engine used by Visual D is working with
- Imperatorn (2/11) Apr 26 2021 That would be awesome
- Rainer Schuetze (3/19) Apr 27 2021 There is a new version 1.1.1 available now with the semantic engine
- Imperatorn (3/23) Apr 27 2021 Splendid, thanks! Will try it out soon
Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these. I was trying the Visual D extension to Visual Studio, but after the first code generation (DLL library, x86 & x64 both checked), I get this weird error: ``` C:\D\dmd2\src\druntime\import\core\sys\windows\dll.d: \object.d(18): can only `*` a pointer, not a `typeof(null)` ``` So I opened the object.d in VS and apparently, this is the line of code it's yelling at: ``` alias noreturn = typeof(*null); /// bottom type ``` I am unsure how to solve this problem. It doesn't appear to happen if I choose "console application" instead of "DLL Library". Although, errors do appear if I try to inspect, for example, stdio.d: ``` Error: C:\D\dmd2\src\druntime\import\object.d(3460): template instance `object._dup!(const(char), immutable(char))` error instantiating C:\D\dmd2\src\druntime\import\object.d(3438): instantiated from here: `_trustedDup!(const(char), immutable(char))` C:\D\dmd2\src\phobos\std\exception.d(516): instantiated from here: `idup!(const(char))` C:\D\dmd2\src\phobos\std\exception.d(437): instantiated from here: `bailOut!(Exception)` --> instantiated from here: `enforce!(void*)` ``` and also: ``` Error: C:\D\dmd2\src\phobos\std\exception.d(437): template instance `std.exception.bailOut!(ErrnoException)` error instantiating --> instantiated from here: `enforce!(shared(_iobuf)*)` ``` and others. Since these are thrown by the standard library, I suspect this could be a bug; but maybe I'm just missing something? Thank you for your help.
Apr 26 2021
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote:Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these. [...]What compiler and version are you using?
Apr 26 2021
On Monday, 26 April 2021 at 08:40:01 UTC, Imperatorn wrote:On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote:According to -v: DMD64 D Compiler v2.096.0-dirtyHello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these. [...]What compiler and version are you using?
Apr 26 2021
On Monday, 26 April 2021 at 08:58:25 UTC, Raimondo Mancino wrote:According to -v: DMD64 D Compiler v2.096.0-dirtyWell, that says it all, doesn't it? I'm not familiar with the windows versions, but that doesn't seem to be an offical release - at least I never had a dmd2 that claimed to be dirty ;-)
Apr 26 2021
On Monday, 26 April 2021 at 10:40:44 UTC, Johann Lermer wrote:On Monday, 26 April 2021 at 08:58:25 UTC, Raimondo Mancino wrote:That's actually normal for the Windows versions. I'm not sure where it comes from, but it's always there.According to -v: DMD64 D Compiler v2.096.0-dirtyWell, that says it all, doesn't it? I'm not familiar with the windows versions, but that doesn't seem to be an offical release - at least I never had a dmd2 that claimed to be dirty ;-)
Apr 26 2021
On Monday, 26 April 2021 at 10:42:54 UTC, Mike Parker wrote: (According to -v: DMD64 D Compiler v2.096.0-dirty)That's actually normal for the Windows versions. I'm not sure where it comes from, but it's always there.Ouuu, that's bad advertising, isn't it? Who wants to use dirty software, it could infect your computer... :-O
Apr 26 2021
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote:Since these are thrown by the standard library, I suspect this could be a bug; but maybe I'm just missing something? Thank you for your help.You might try to build outside of VS and see if you get the same errors.
Apr 26 2021
On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote:You might try to build outside of VS and see if you get the same errors.The weird thing is that I get these errors just in the errors frame, but building works just fine without errors. If I run devenv.exe directly on the solution, or select "build" from the menu, it builds fine; just, I don't get autocompletion or go-to-definition for some symbols. Debugging works as well (although I see mangled symbol names, but I guess it's how it is supposed to work).
Apr 26 2021
On Monday, 26 April 2021 at 11:03:19 UTC, Raimondo Mancino wrote:On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote:Might be related to recent work on the semantic engine.You might try to build outside of VS and see if you get the same errors.The weird thing is that I get these errors just in the errors frame, but building works just fine without errors. If I run devenv.exe directly on the solution, or select "build" from the menu, it builds fine; just, I don't get autocompletion or go-to-definition for some symbols. Debugging works as well (although I see mangled symbol names, but I guess it's how it is supposed to work).
Apr 26 2021
On Monday, 26 April 2021 at 11:03:19 UTC, Raimondo Mancino wrote:On Monday, 26 April 2021 at 10:44:14 UTC, Mike Parker wrote:Also, be sure to join on Discord as well (https://discord.gg/bMZk9Q4) if you're not already there!You might try to build outside of VS and see if you get the same errors.The weird thing is that I get these errors just in the errors frame, but building works just fine without errors. If I run devenv.exe directly on the solution, or select "build" from the menu, it builds fine; just, I don't get autocompletion or go-to-definition for some symbols. Debugging works as well (although I see mangled symbol names, but I guess it's how it is supposed to work).
Apr 26 2021
On Monday, 26 April 2021 at 14:17:34 UTC, Imperatorn wrote:Also, be sure to join on Discord as well (https://discord.gg/bMZk9Q4) if you're not already there!Thank you, I think I'll join.
Apr 26 2021
On Monday, 26 April 2021 at 08:00:08 UTC, Raimondo Mancino wrote:C:\D\dmd2\src\druntime\import\core\sys\windows\dll.d: \object.d(18): can only `*` a pointer, not a `typeof(null)`Do you have a separate object.d in your current directory? That can cause all kinds of weird errors. Otherwise I suspect this is a conflict between two versions of the compiler. If you had one installed before then updated it or maybe if visual d installed a different one, this could be a problem. So either some old files were left behind or there's two copies installed and VS is running one but pointing at the other. Or something. The noreturn thing is relatively new making me think this might be the case. The compiler and stdlib are ridiculously tightly coupled so any version mismatch can cause trouble. just guessing though.
Apr 26 2021
On Monday, 26 April 2021 at 15:54:36 UTC, Adam D. Ruppe wrote:Do you have a separate object.d in your current directory? That can cause all kinds of weird errors. Otherwise I suspect this is a conflict between two versions of the compiler. If you had one installed before then updated it or maybe if visual d installed a different one, this could be a problem. So either some old files were left behind or there's two copies installed and VS is running one but pointing at the other. Or something. The noreturn thing is relatively new making me think this might be the case. The compiler and stdlib are ridiculously tightly coupled so any version mismatch can cause trouble. just guessing though.Actually, you were right. I was about to write that updating Visual D to the latest version worked. I'm sorry for this silly thread. Thank you all for your help and suggestions.
Apr 26 2021
On 26/04/2021 10:00, Raimondo Mancino wrote:Hello, I'm new to the language; I just started learning it a few months ago. I'm doing okay with it, I find it very versatile and fast to learn. I come from Java and C/C++ and I think D solves tons of problems I had with these. I was trying the Visual D extension to Visual Studio, but after the first code generation (DLL library, x86 & x64 both checked), I get this weird error: ``` C:\D\dmd2\src\druntime\import\core\sys\windows\dll.d: \object.d(18): can only `*` a pointer, not a `typeof(null)` ```The problem is that the semantic engine used by Visual D is working with the DMD frontend of 2.095, but "noreturn" is a new language feature introduced with 2.096. You can filter out messages from "Intellisense" in the Error List window by selecting to show "Build only". I hope I can supply a new version of Visual D with an updated semantic engine soon.
Apr 26 2021
On Monday, 26 April 2021 at 17:37:26 UTC, Rainer Schuetze wrote:On 26/04/2021 10:00, Raimondo Mancino wrote:That would be awesome[...]The problem is that the semantic engine used by Visual D is working with the DMD frontend of 2.095, but "noreturn" is a new language feature introduced with 2.096. You can filter out messages from "Intellisense" in the Error List window by selecting to show "Build only". I hope I can supply a new version of Visual D with an updated semantic engine soon.
Apr 26 2021
On 26/04/2021 20:22, Imperatorn wrote:On Monday, 26 April 2021 at 17:37:26 UTC, Rainer Schuetze wrote:There is a new version 1.1.1 available now with the semantic engine updated to dmd 2.096.1.On 26/04/2021 10:00, Raimondo Mancino wrote:That would be awesome[...]The problem is that the semantic engine used by Visual D is working with the DMD frontend of 2.095, but "noreturn" is a new language feature introduced with 2.096. You can filter out messages from "Intellisense" in the Error List window by selecting to show "Build only". I hope I can supply a new version of Visual D with an updated semantic engine soon.
Apr 27 2021
On Wednesday, 28 April 2021 at 06:06:47 UTC, Rainer Schuetze wrote:On 26/04/2021 20:22, Imperatorn wrote:Splendid, thanks! Will try it out soonOn Monday, 26 April 2021 at 17:37:26 UTC, Rainer Schuetze wrote:There is a new version 1.1.1 available now with the semantic engine updated to dmd 2.096.1.On 26/04/2021 10:00, Raimondo Mancino wrote:That would be awesome[...]The problem is that the semantic engine used by Visual D is working with the DMD frontend of 2.095, but "noreturn" is a new language feature introduced with 2.096. You can filter out messages from "Intellisense" in the Error List window by selecting to show "Build only". I hope I can supply a new version of Visual D with an updated semantic engine soon.
Apr 27 2021