Improve SQLPage function argument warnings#1225
Merged
Conversation
Made-with: Cursor
…oundIdentifier special case - expr_to_stmt_param returns Result<StmtParam, ExprToParamError>; error carries only line + kind (UnsupportedExpr, UnemulatedFunction, NamedArgs) - function_args_to_stmt_params logs one formatted message (ctx.format_param_error) then returns Err - Single unsupported-expr arm; expr_summary() used for description - Rename ParamWarnContext to ParamExtractContext Made-with: Cursor
…essage tests; remove are_params_extractable - When func_call_to_param returns StmtParam::Error, store it and have extract_parameters return Err so parse yields ParsedStatement::Error with specialized message - Add test_parse_sql_unsupported_expr_in_sqlpage_arg and test_parse_sql_unemulated_function_in_sqlpage_arg - Remove dead are_params_extractable and its unused import Made-with: Cursor
…tations - Overhauled ExprToParamError formatting to construct exact user-friendly descriptions. - Removed superfluous anyhow::Context prefixes in func_call_to_param. - Passed source_path properly through validate_function_calls to ensure file line numbers populate the new error template accurately. - Renamed error test file to match its dynamic error output signature. - Removed redundant mut mutability warnings on parsing logic loops.
…r' wrappers - Replaced stringly-typed anyhow errors with a strongly typed SqlPageFunctionError. - Removed source_path threading completely from the parameter extraction phases, conforming to better separation of concerns. - Appended file path prefix dynamically at the evaluation stage in clone_anyhow_err strictly when downcasting to SqlPageFunctionError. - Removed the confusing generic 'Caused by: x.sql contains a syntax error...' wrapper from actual function logic errors.
7a716e5 to
003f3e0
Compare
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.
Summary
Test plan
Made with Cursor