-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cherry-pick 5.5] Task locals revisions #37158
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
Conversation
@swift-ci please smoke test |
@swift-ci please test |
TaskLocals print a verbose error before crashing if API is abused within a task-group. This printing needs `io.h` on windows.
@swift-ci please test |
1 similar comment
@swift-ci please test |
Build failed |
Very weird:
|
@swift-ci please test Linux |
Build failed |
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.
Mostly had feedback on things that are not a blocker for this cherry-pick, but would be good to address in main
in the future.
paramTy->dump(); | ||
paramTy->getCanonicalType()->dump(); | ||
neverTy->dump(); | ||
neverTy->getCanonicalType()->dump(); | ||
param->dump(); | ||
param->getType()->dump(); |
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.
We should remove these debugging dumps.
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.
Whoops, yeah. These need to be removed. Thanks, Kavon
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.
Whoops damn sorry, will cleanup on main too then
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.
Ok doug already fixed, thanks
"property %0, must be static because property wrapper %1 can only " | ||
"be applied to static properties", |
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.
Might be simpler to just say: "property wrapper ___ can only be applied to static properties"
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.
Hmm, I wanted to include the name of the property, you sure we'd prefer the shorter message?
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 think the name of the property isn't needed, because the error message will already be pointing to the var decl with the problematic wrapper on it, whether in the terminal or xcode.
// if (requireNoEnclosingInstance) { // && !valueVar->isStatic()) { | ||
// // this means that the property wrapper must be declared on a static property | ||
// valueVar->diagnose( | ||
// diag::property_wrapper_var_must_be_static, valueVar->getName()); | ||
// return PropertyWrapperTypeInfo(); | ||
// result | ||
// } |
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.
Why is this commented?
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.
Thanks, will remove -- this is a leftover, it was the wrong place to do the diagnosis after all so moved elsewhere
@swift-ci please test macOS |
@swift-ci please test |
Approved by @DougGregor et al for 5.5 cherry pick even though has minor ABI change.
Cherry pick of: #36959