www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - [import,module] got biting again :(

reply %u <e ee.com> writes:
Yay, free access to a!

I searched for this bug in the bug-reports..
Why are there so many basic import bugs?

--
module main;
import b;

void main(){
  a.write();
}
--
module a;
import std.stdio;

void write(){
  writefln("a");
}
--
module b;
import a; //also with static
--
Oct 14 2010
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
%u:

 Why are there so many basic import bugs?

Module system bugs are among the most voted in Bugzilla. True modules are absent in C/C++, so maybe Walter thinks assuring their semantics is correct is not so important compared to other kinds of bugs, or maybe such bugs are hard to fix, I don't know. Bye, bearophile
Oct 14 2010
prev sibling parent reply Don <nospam nospam.com> writes:
%u wrote:
 Yay, free access to a!
 
 I searched for this bug in the bug-reports..
 Why are there so many basic import bugs?

There's only really one. But it's huge.
Nov 07 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Don:

 There's only really one. But it's huge.

Really? :-) I didn't know this. (You are very often right, but I have a hard time believing this). Bye, bearophile
Nov 07 2010
parent reply Don <nospam nospam.com> writes:
bearophile wrote:
 Don:
 
 There's only really one. But it's huge.

Really? :-) I didn't know this. (You are very often right, but I have a hard time believing this). Bye, bearophile

Bug 314 is the root cause of every module bug that I know of. Basically the compiler isn't keeping track of how symbols got imported. So it gets everything wrong.
Nov 08 2010
parent reply bearophile <bearophileHUGS lycos.com> writes:
Don:

 Bug 314 is the root cause of every module bug that I know of. Basically 
 the compiler isn't keeping track of how symbols got imported. So it gets 
 everything wrong.

Bug 314 is among my voted bugs since a lot of time. Even if bug 314 isn't the only module system bug present, solving it is a good starting point. In Comment 28 of bug 314 Christian Kamm has given a kind of partial patch, as requested. Is it good enough? Bye, bearophile
Nov 08 2010
parent Don <nospam nospam.com> writes:
bearophile wrote:
 Don:
 
 Bug 314 is the root cause of every module bug that I know of. Basically 
 the compiler isn't keeping track of how symbols got imported. So it gets 
 everything wrong.

Bug 314 is among my voted bugs since a lot of time.

Actually it was the most voted bug in D, long before your involvement with D!
Even if bug 314 isn't the only module system bug present, solving it is a good
starting point.

 
 In Comment 28 of bug 314 Christian Kamm has given a kind of partial patch, as
requested. Is it good enough?

Still needs work. Especially, we need a comprehensive set of test cases.
Nov 08 2010