Skip to content

Conversation

@kakkoyun
Copy link
Member

This update refactors the ResolveInterfaceTypeByName function to enhance its structure and error reporting. The function now separates the logic for handling built-in types and package-qualified types, improving readability. A new helper function, validateTypeNameIsInterface, has been introduced to encapsulate the validation of interface types, ensuring consistent error messages and reducing code duplication.

Additionally, specific error messages have been added for import failures and type lookups, providing clearer context for users.

Signed-off-by: Kemal Akkoyun [email protected]

@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch from c56bf17 to 6c4905d Compare May 26, 2025 10:52
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from 9c2709c to be2028f Compare May 26, 2025 10:52
@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch from 6c4905d to 62d099c Compare May 26, 2025 14:16
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch 2 times, most recently from 35ebe90 to 66e79f8 Compare May 26, 2025 14:19
@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch from 62d099c to f5ea563 Compare May 26, 2025 14:19
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from 6e4ae96 to 1c9cd64 Compare May 27, 2025 11:40
@kakkoyun kakkoyun requested a review from RomainMuller June 2, 2025 13:40
@kakkoyun kakkoyun changed the base branch from 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package to graphite-base/616 June 5, 2025 10:56
@github-actions github-actions bot added the conventional-commit/chore Maintenance work that does not show up in the release notes label Jun 5, 2025
@kakkoyun kakkoyun force-pushed the graphite-base/616 branch from d2cdd1b to bbe2ed1 Compare June 5, 2025 11:00
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from 1c9cd64 to d01d615 Compare June 5, 2025 11:00
@kakkoyun kakkoyun changed the base branch from graphite-base/616 to 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package June 5, 2025 11:00
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from d053f83 to d1d3c13 Compare June 5, 2025 14:25
@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch from bbe2ed1 to d575c0b Compare June 5, 2025 14:25
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from d1d3c13 to b8a2864 Compare June 5, 2025 16:27
@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch from d575c0b to a59cbdb Compare June 5, 2025 16:27
Base automatically changed from 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package to main June 5, 2025 17:21
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from b8a2864 to ad3e699 Compare June 5, 2025 17:30
@kakkoyun kakkoyun enabled auto-merge June 5, 2025 17:31
kakkoyun added 3 commits June 5, 2025 21:41
…roved clarity and error handling

This update refactors the `ResolveInterfaceTypeByName` function to enhance its structure and error reporting. The function now separates the logic for handling built-in types and package-qualified types, improving readability. A new helper function, `validateTypeNameIsInterface`, has been introduced to encapsulate the validation of interface types, ensuring consistent error messages and reducing code duplication.

Additionally, specific error messages have been added for import failures and type lookups, providing clearer context for users.

Signed-off-by: Kemal Akkoyun <[email protected]>
Signed-off-by: Kemal Akkoyun <[email protected]>
Signed-off-by: Kemal Akkoyun <[email protected]>
@kakkoyun kakkoyun force-pushed the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch from ad3e699 to 827efcf Compare June 5, 2025 19:46
@kakkoyun kakkoyun disabled auto-merge June 5, 2025 19:47
@kakkoyun kakkoyun enabled auto-merge June 5, 2025 19:47
@kakkoyun kakkoyun added this pull request to the merge queue Jun 5, 2025
Merged via the queue into main with commit ec50330 Jun 5, 2025
48 of 54 checks passed
@kakkoyun kakkoyun deleted the 04-15-feat_injector_typed_refactor_resolveinterfacetypebyname_for_improved_clarity_and_error_handling branch June 5, 2025 20:33
@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 56.25000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 66.80%. Comparing base (b3088d9) to head (827efcf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/injector/typed/typecheck.go 56.25% 11 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #616      +/-   ##
==========================================
- Coverage   68.49%   66.80%   -1.69%     
==========================================
  Files         113      113              
  Lines        7868     7866       -2     
==========================================
- Hits         5389     5255     -134     
- Misses       1938     2068     +130     
- Partials      541      543       +2     
Components Coverage Δ
Generators 80.24% <ø> (ø)
Instruments ∅ <ø> (∅)
Go Driver 75.81% <ø> (-0.70%) ⬇️
Toolexec Driver 67.53% <ø> (-3.31%) ⬇️
Aspects 72.21% <ø> (-2.46%) ⬇️
Injector 73.01% <56.25%> (-1.98%) ⬇️
Job Server 68.96% <ø> (-1.08%) ⬇️
Other 66.80% <56.25%> (-1.69%) ⬇️
Files with missing lines Coverage Δ
internal/injector/typed/typecheck.go 65.15% <56.25%> (+6.32%) ⬆️

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conventional-commit/chore Maintenance work that does not show up in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants