fix Issue 17494 - Do not execute scope(...) if an Error exception has…#6896
fix Issue 17494 - Do not execute scope(...) if an Error exception has…#6896WalterBright wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#6896" |
This should be in the commit message as well, so it's picked up by @dlang-bot. |
I don't know what dlang-bot looks for, everything I try fails. I tried "fix 17493" and "fix issue 17493", to no avail. |
Are you editing the commit message (when creating the git commit on your computer), or the pull request description (in your web browser)? We're talking about the former. |
I think I mention the link to the explanation almost daily ;-) And in dubito, try it online Of course you can also execute the D function yourself: import std.algorithm, std.conv, std.range, std.string;
import std.format : format;
auto matchIssueRefs(string message)
{
import std.regex;
static auto matchToRefs(M)(M m)
{
enum splitRE = regex(`[^\d]+`); // ctRegex throws a weird error in unittest compilation
auto closed = !m.captures[1].empty;
return m.captures[5].stripRight.splitter(splitRE)
.filter!(id => !id.empty) // see #6
.map!(id => IssueRef(id.to!int, closed));
}
// see https://github.com/github/github-services/blob/2e886f407696261bd5adfc99b16d36d5e7b50241/lib/services/bugzilla.rb#L155
enum issueRE = ctRegex!(`((close|fix|address)e?(s|d)? )?(ticket|bug|tracker item|issue)s?:? *([\d ,\+&#and]+)`, "i");
return message.matchAll(issueRE).map!matchToRefs.joiner;
}
struct IssueRef { int id; bool fixed; }
void main()
{
import std.stdio;
matchIssueRefs("fix Issue 17494 17493 - Do not execute scope(...) if an Error ").writeln;
} |
|
Cool! A promise made by the spec finally fulfilled. This will allow smaller and faster functions for most cases. We'll need a changelog entry as well. |
It used to work by looking at the github comments. |
|
Hmm #6816 also broke D-YAML, but this bugfix PR doesn't seem to fix the regression observed in D-YAML. (working on a reduction) |
It never did that, we want our information in git to be available for tooling, not locked into a proprietary platform. |
|
We're about to release 2.075.0 soon, so let's not try to counter a risky change with yet another one (changing all |
|
I agree it's a risky change. |
f04a58f to
0e486a2
Compare
|
Apparently hangs some test in dmd's test suite. |
|
@WalterBright I'll approve pending the unittester, I suppose this needs a bit of work. |
|
removing the auto-merge flag because the tests don't pass and in fact are stalling resulting in abnormally long builds that must hit timeouts to end. |
0e486a2 to
823487b
Compare
72bd0ef to
1f29e17
Compare
|
If the agreement is that no unwinding should happen if an Error is thrown, then the standard exception handling mechanism should not be used: by throwing an exception, (some) unwinding will always happen... |
|
What is the status of the issue ? It's marked closed. Can this PR be as well ?
|
Commented on the issue,
Not for official releases - the changes from A small test case; |
1f29e17 to
472792c
Compare
472792c to
dcf2204
Compare
|
@WalterBright tests have failed. |
dcf2204 to
b0c3fe6
Compare
|
The tests all fail because the test suite hangs and times out. There's no clue which test hung. |
27c990f to
e798e1f
Compare
… been thrown
fix 17494
This is an enhancement, see https://issues.dlang.org/show_bug.cgi?id=17494
It's also a regression fix.