Thread overview
[import,module] got biting again :(
Oct 14, 2010
%u
Oct 14, 2010
bearophile
Nov 07, 2010
Don
Nov 08, 2010
bearophile
Nov 08, 2010
Don
Nov 08, 2010
bearophile
Nov 08, 2010
Don
October 14, 2010
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
--
October 14, 2010
%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
November 07, 2010
%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.
November 08, 2010
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
November 08, 2010
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.
November 08, 2010
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
November 08, 2010
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.