Jump to page: 1 2
Thread overview
Blog article on new import changes
Mar 29, 2016
Jack Stouffer
Mar 29, 2016
Dicebot
Mar 29, 2016
Sebastiaan Koppe
Mar 30, 2016
xenon325
Mar 30, 2016
Walter Bright
Apr 01, 2016
xenon325
Mar 30, 2016
Martin Nowak
Mar 30, 2016
H. S. Teoh
March 29, 2016
I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs.

I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):

http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/
March 29, 2016
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
> I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs.
>
> I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):
>
> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

This is an informative article, good job.

Here are some notes I jotted down when reading it

>In the newest version of D upcoming, several changes have been made to the import system, including fixes for 2 of the oldest bugs in D history.

Grammatically, it's redundant to put "upcoming" where it is; numbers under 20 are typically written with their name.

> However, until the fix was rendered, these module symbols were imported as if they were marked public.

This sentence is redundant.

> This determines where the problem lies.

This sentence is also redundant.
March 29, 2016
On 3/29/16 11:49 AM, Jack Stouffer wrote:
> Here are some notes I jotted down when reading it

Thanks, all fixed.

Note, the "upcoming" note was added hastily before publishing because I realized 2.071 hasn't been released.

Now reads:

"In the upcoming version of D, several changes have been made to the import system"

March 29, 2016
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
> I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs.
>
> I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):
>
> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

Worth mentioning that -transition=checkimports may slow down compilation notably which is why it isn't the default.
March 29, 2016
On 3/29/16 1:01 PM, Dicebot wrote:
> On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
>> I anticipate 2.071.0 is going to cause a lot of deprecation messages
>> and strange errors to occur, due to the fixes of very long-standing
>> import bugs.
>>
>> I wrote a blog post (actually my first ever) on this, let me know what
>> you think (and please, any clarifications/errors, let me know):
>>
>> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/
>
> Worth mentioning that -transition=checkimports may slow down compilation
> notably which is why it isn't the default.

Thanks, added a note.

-Steve
March 29, 2016
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
> I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs.
>
> I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):
>
> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

I would avoid 'generated' names like ex1_a and ex1_b, and go for something concrete. E.g.

module car;
import tire;

Or whatever.

Besided that, great and clear article.
March 29, 2016
On 3/29/16 2:02 PM, Sebastiaan Koppe wrote:
> On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
>> I anticipate 2.071.0 is going to cause a lot of deprecation messages
>> and strange errors to occur, due to the fixes of very long-standing
>> import bugs.
>>
>> I wrote a blog post (actually my first ever) on this, let me know what
>> you think (and please, any clarifications/errors, let me know):
>>
>> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/
>
> I would avoid 'generated' names like ex1_a and ex1_b, and go for
> something concrete. E.g.
>
> module car;
> import tire;

Yeah, I probably could.

I wanted all my code in one gist, so I tried to come up with examples I could compile all at once. Worked great like dmd ex1*.d :)

I'll see if I can change it, I agree it would sound better.

> Besided that, great and clear article.

Thanks

-Steve
March 30, 2016
On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
> I anticipate 2.071.0 is going to cause a lot of deprecation messages and strange errors to occur, due to the fixes of very long-standing import bugs.
>
> I wrote a blog post (actually my first ever) on this, let me know what you think (and please, any clarifications/errors, let me know):
>
> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

1.
> In addition, importing a module using static, renamed, or selective imports, then the module was imported publicly, even though it was supposed to be private.

Not an English speaker, but this doesn't sound right (at least stylistically).
Reread it several times, but I couldn't get the meaning of the sentence, until opened bug report.

2.
> With 2.070.2 and prior versions, compiling this works just fine. With 2.071.0 and above, you will get either a deprecation warning, or an error.

> With 2.070.2, this compiled just fine. [...] With 2.071.0 and above, this will trigger a deprecation warning. In the future, the code will trigger an error.

> In 2.070.2, this produces no warning or error. In 2.071.0 and beyond, this will produce a deprecation warning, and eventually an error.

Not sure if it's worth it to repeat after each example. Feels redundant.

3. I think it's OK to write just major compiler versions, no need for patch version: 2.070 and 2.071
March 30, 2016
On 03/29/2016 05:25 PM, Steven Schveighoffer wrote:
> I wrote a blog post (actually my first ever) on this, let me know what
> you think (and please, any clarifications/errors, let me know):
> 
> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/

Thanks
March 30, 2016
On 3/29/16 11:08 PM, xenon325 wrote:
> On Tuesday, 29 March 2016 at 15:25:27 UTC, Steven Schveighoffer wrote:
>> I anticipate 2.071.0 is going to cause a lot of deprecation messages
>> and strange errors to occur, due to the fixes of very long-standing
>> import bugs.
>>
>> I wrote a blog post (actually my first ever) on this, let me know what
>> you think (and please, any clarifications/errors, let me know):
>>
>> http://www.schveiguy.com/blog/2016/03/import-changes-in-d-2-071/
>
> 1.
>> In addition, importing a module using static, renamed, or selective
>> imports, then the module was imported publicly, even though it was
>> supposed to be private.
>
> Not an English speaker, but this doesn't sound right (at least
> stylistically).
> Reread it several times, but I couldn't get the meaning of the sentence,
> until opened bug report.
>

Definitely some grammar issues there. New reworded sentence:

In addition, when importing a module using static, renamed, or selective imports, the symbols imported were incorrectly made public to importing modules.

Sound better?

> 2.
>> With 2.070.2 and prior versions, compiling this works just fine. With
>> 2.071.0 and above, you will get either a deprecation warning, or an
>> error.
>
>> With 2.070.2, this compiled just fine. [...] With 2.071.0 and above,
>> this will trigger a deprecation warning. In the future, the code will
>> trigger an error.
>
>> In 2.070.2, this produces no warning or error. In 2.071.0 and beyond,
>> this will produce a deprecation warning, and eventually an error.
>
> Not sure if it's worth it to repeat after each example. Feels redundant.

I think it's important to state the previous and new behavior, even though it's always the same. It does sound redundant, but makes it easier to understand.

>
> 3. I think it's OK to write just major compiler versions, no need for
> patch version: 2.070 and 2.071

Yes, I did that.

Thanks for the feedback.

-Steve
« First   ‹ Prev
1 2