Issue 17224 - Foreach documentation still refers to TypeTuples, rather than AliasSequences#5484
Conversation
…r than AliasSequences
|
Thanks for your pull request, @wilzbach! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
| */ | ||
| module std.traits; | ||
|
|
||
| import std.typetuple; // TypeTuple |
There was a problem hiding this comment.
It seems like Jenkins fails, because this somehow publicly imported functions like staticMap, which is now not the case.
There was a problem hiding this comment.
@CyberShadow can you confirm if that's the case with ae?
There was a problem hiding this comment.
staticMap was originally in std.traits, until 5c9725d moved it to another module. So, breaking this would require going through a deprecation cycle.
Sidenote: ae was added to the project tester just a few days ago, I'm happy it caught a potential regression already :)
Hmm I can only see |
std/traits.d
Outdated
|
|
||
| // Legacy inheritance from std.typetuple - should be deprecated | ||
| // See also: https://github.com/dlang/phobos/pull/5484#discussion_r122602797 | ||
| public import std.meta : staticMap; |
There was a problem hiding this comment.
I will add a deprecation message as soon as we have figured out if just staticMap or more symbols are affected.
|
I think Sebastian was going to work on this some more? As per his comment:
Otherwise, if it doesn't break the project tester, it's good in my book. |
|
Sorry, I missed that. |
Yep I wanted to wait and see if someone comes forward with more symbols that should be publicly imported in However, it seems that dmd doesn't trigger the deprecation warnings. Any ideas / workarounds? (I already tried using an alias symbol instead of the selective public import). Sample programs: void main(string[] args)
{
import std.traits;
alias TL = staticMap!(Unqual, int, const int, immutable int);
import std.meta : AliasSeq;
static assert(is(TL == AliasSeq!(int, int, int)));
}or one without void main(string[] args)
{
import std.traits;
alias TL = staticMap!(Unqual, int, const int, immutable int);
import std.stdio;
foreach (el; TL)
{
writeln(el.stringof);
}
} |
|
@wilzbach How about leaving the deprecations to a different PR so this can be moved forward? |
Good idea. Done. |
Analogous to dlang/dlang.org#1701