Skip to content

Commit ca285c2

Browse files
fix incorrect test setup result unwrapping
1 parent 91d898b commit ca285c2

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

codeflash/cli_cmds/cmd_init.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ def create_find_common_tags_file(args: Namespace, file_name: str) -> Path:
12311231
console.rule()
12321232

12331233
file_path.write_text(find_common_tags_content, encoding="utf8")
1234+
logger.info(f"Created demo optimization file: {file_path}")
12341235

12351236
return file_path
12361237

codeflash/lsp/beta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ def _init() -> Namespace:
308308
def check_api_key(_params: any) -> dict[str, str]:
309309
try:
310310
return _initialize_optimizer_if_api_key_is_valid()
311-
except Exception:
312-
return {"status": "error", "message": "something went wrong while validating the api key"}
311+
except Exception as ex:
312+
return {"status": "error", "message": "something went wrong while validating the api key " + str(ex)}
313313

314314

315315
@server.feature("provideApiKey")

codeflash/lsp/features/perform_optimization.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def sync_perform_optimization(server: CodeflashLanguageServer, cancel_event: thr
5959
generated_perf_test_paths,
6060
instrumented_unittests_created_for_function,
6161
original_conftest_content,
62+
function_references,
6263
) = test_setup_result.unwrap()
6364

6465
baseline_setup_result = function_optimizer.setup_and_establish_baseline(
@@ -94,6 +95,7 @@ def sync_perform_optimization(server: CodeflashLanguageServer, cancel_event: thr
9495
generated_tests=generated_tests,
9596
test_functions_to_remove=test_functions_to_remove,
9697
concolic_test_str=concolic_test_str,
98+
function_references=function_references,
9799
)
98100

99101
abort_if_cancelled(cancel_event)

0 commit comments

Comments
 (0)