-
-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 17224 - Foreach documentation still refers to TypeTuples, rather than AliasSequences #5484
Conversation
…r than AliasSequences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM too.
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
|
@@ -164,7 +164,7 @@ | |||
*/ | |||
module std.traits; | |||
|
|||
import std.typetuple; // TypeTuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CyberShadow can you confirm if that's the case with ae
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a deprecation
message as soon as we have figured out if just staticMap
or more symbols are affected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @CyberShadow?
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