Repository navigation
Remove dead capture arm, fix the name-scan benchmark, make two messages say the fix - #310
Merged
Merged
Conversation
…esult The capture source interface and its one implementation had both TryArm and Arm, which did the same compare-exchange; Arm only dropped the result. The claim of a capture set now calls TryArm for the captures after the first and discards the result. Same compare-exchange per claim; one interface member and one method fewer. Internal types only, no public API change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…an overload The two-argument QueryCore for a call made from a definition only forwarded to the three-argument one with no options. The three-argument one now takes options with a default of none, and the forwarding overload is gone. Every caller passes a call, so overload resolution is unchanged. Compile time only; no run-time cost. Internal type, no public API change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The shared helper behind the capture methods of a bound call built the call into a local, set the out parameter, and returned the local. It now sets the out parameter and returns the call directly. The call is built the same way; nothing is allocated or read differently. Public signatures unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The benchmark reaches the internal name set through expressions. It looked for a name set constructor with one or two parameters, but the constructor takes three (the names, where a procedure's set is kept, and its key), and the match call left out the third argument (the subject of an ambiguity message). Both expressions threw when the benchmark's setup ran. The constructor call now fills every parameter after the names with its default, and the match call passes a null subject. A dry run of the benchmark class (the Dry job, in process, all eight parameter combinations, five benchmarks each) now completes all 40 runs, which includes the setup check that every path finds the same names. No timed numbers were taken. Benchmark project only; no library change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… each Two exception messages said what was wrong but not what to do, while the same condition raised elsewhere in Core already said the fix. A blank command text from a query definition now says "Pass the SQL text or the name of the stored procedure.", as the command constructors do. Both now go through one check (DbQuery.Checked, which the command's own check calls), so the wording and the null and blank behavior live in one place. Taking a single connection that is still in use from the connection provider now says to wait for the running call to finish, or to create the command from a connection factory or pool. The provider and the command's own guard use one constant for the text. The test constants that pinned the old definition text now pin the one wording (the two constants for the same fact became one), and a new test pins the provider's message. Only the text of two exceptions changes; no run-time cost, no public API change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t rules Layout only; no behavior change. The shared connection-use message and the blank command message are split into joined literals at phrase breaks (same text), the throws that use them are wrapped and braced, and the tests that pin them split their literals the same way while still asserting the full text. The benchmark's constructor-argument chain now follows the one call per line rule from the second call on, its comments are wrapped, and a comment on Run that repeated the header is removed. The options doc line of the query core is wrapped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Internal changes, no public API change.
ICaptureSource.ArmandCaptureSource.Arm; the capture claim callsTryArmdirectly.QueryCoreof a definition's call becomes a default parameter (options = QueryOptions.None) on the three-argument one. Callers resolve as before.capturedlocal in the bound-call capture helper. The call is built in the same order (the capture is constructed beforeWithCapture), which nothing can observe.TextNameScanBenchmarks: it looked for a name-set constructor of one or two parameters and calledMatchwithout its third argument, so its setup threw. It now fills every parameter after the names with its default and passes a null subject. A dry run (in process, all eight parameter combinations) completes all 40 runs; no timed numbers were taken.DbQuery.Checkedthat the command's own check calls), and taking a single connection that is still in use (wait for the running call, or create the command from a connection factory or pool; one constant used by the provider and the command's guard). Only the text of these two exceptions changes. A new test pins the provider's message; the test constants for the same fact became one.Cost: the blank-command check is one extra static call at command construction, not per row. Nothing else changes at run time.
Verification: solution Release and Debug (VS MSBuild) 0 warnings, 0 errors; Core.Tests 16154 passed with the generator on, 16133 passed and 16 skipped with it off; 267 sample checks passed; 28 style and analyzer checks 0 findings; docfx 0 warnings. Generator.Tests were 189 passed on the previous commit; the last commit is layout only and does not touch the generator.
Reviews: swarm on correctness (no defect) and on the project rules (layout findings applied in the last commit).
🤖 Generated with Claude Code