Skip to content

refactor(injector): Refactor TypeName handling and migrate to typed package#615

Merged
kakkoyun merged 3 commits into
mainfrom
04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package
Jun 5, 2025
Merged

refactor(injector): Refactor TypeName handling and migrate to typed package#615
kakkoyun merged 3 commits into
mainfrom
04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package

Conversation

@kakkoyun
Copy link
Copy Markdown
Member

This commit refactors the handling of TypeName across the injector package, transitioning from the join package to a new typed package. The changes include:

  • Replacing instances of join.TypeName with typed.TypeName in various files, ensuring consistent type handling.
  • Updating related functions and methods to accommodate the new TypeName structure, including adjustments to import path retrieval and pointer handling.
  • Adding comprehensive tests for the new TypeName implementation to validate its functionality and error handling.

This refactor enhances code clarity and maintainability by centralizing type name logic within the typed package.

Signed-off-by: Kemal Akkoyun kemal.akkoyun@datadoghq.com

@kakkoyun kakkoyun marked this pull request as ready for review April 16, 2025 08:44
@kakkoyun kakkoyun requested a review from a team as a code owner April 16, 2025 08:44
Copy link
Copy Markdown
Member Author

kakkoyun commented Apr 16, 2025

Comment thread internal/injector/typed/typename.go Outdated
Comment thread internal/injector/typed/typename.go
Comment thread internal/injector/aspect/advice/call_test.go Outdated
Comment thread internal/injector/config/builtin.go Outdated
Comment thread internal/injector/config/builtin.go Outdated
@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 kakkoyun/check-return-error-types-join-point branch from 5af6ebb to afe939a Compare May 26, 2025 10:52
Comment thread internal/injector/typed/typename.go Outdated
@kakkoyun kakkoyun force-pushed the kakkoyun/check-return-error-types-join-point branch from cd7519c to 9721aaa Compare May 26, 2025 14:14
@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
Comment thread internal/injector/typed/typename.go Outdated
@kakkoyun kakkoyun force-pushed the kakkoyun/check-return-error-types-join-point branch from 9721aaa to f7476cf 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 requested a review from RomainMuller June 2, 2025 13:40
Comment thread internal/injector/aspect/join/declaration.go Outdated
Comment thread internal/injector/aspect/join/join.go Outdated
@kakkoyun kakkoyun changed the base branch from kakkoyun/check-return-error-types-join-point to graphite-base/615 June 5, 2025 10:42
@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 changed the base branch from graphite-base/615 to kakkoyun/check-return-error-types-join-point June 5, 2025 10:54
@kakkoyun kakkoyun force-pushed the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch 2 times, most recently from 131e6fc to bbe2ed1 Compare June 5, 2025 11:00
@kakkoyun kakkoyun force-pushed the kakkoyun/check-return-error-types-join-point branch 2 times, most recently from cbef457 to cda266d 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
Base automatically changed from kakkoyun/check-return-error-types-join-point to main June 5, 2025 15:08
kakkoyun added 3 commits June 5, 2025 18:27
…ackage

This commit refactors the handling of TypeName across the injector package, transitioning from the join package to a new typed package. The changes include:

- Replacing instances of join.TypeName with typed.TypeName in various files, ensuring consistent type handling.
- Updating related functions and methods to accommodate the new TypeName structure, including adjustments to import path retrieval and pointer handling.
- Adding comprehensive tests for the new TypeName implementation to validate its functionality and error handling.

This refactor enhances code clarity and maintainability by centralizing type name logic within the typed package.

Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
@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
@kakkoyun kakkoyun enabled auto-merge June 5, 2025 16:27
@kakkoyun kakkoyun added this pull request to the merge queue Jun 5, 2025
Merged via the queue into main with commit ed29e75 Jun 5, 2025
50 of 56 checks passed
@kakkoyun kakkoyun deleted the 04-15-refactor_injector_refactor_typename_handling_and_migrate_to_typed_package branch June 5, 2025 17:21
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 80.47337% with 33 lines in your changes missing coverage. Please review.

Project coverage is 66.46%. Comparing base (121b15f) to head (a59cbdb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/injector/typed/typename.go 74.39% 16 Missing and 5 partials ⚠️
internal/injector/aspect/join/function.go 83.33% 2 Missing and 3 partials ⚠️
...ternal/injector/aspect/advice/code/dot_function.go 90.62% 3 Missing ⚠️
internal/injector/aspect/join/declaration.go 50.00% 1 Missing and 1 partial ⚠️
internal/injector/aspect/join/struct.go 84.61% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
- Coverage   67.74%   66.46%   -1.28%     
==========================================
  Files         110      110              
  Lines        7682     7670      -12     
==========================================
- Hits         5204     5098     -106     
- Misses       1925     2052     +127     
+ Partials      553      520      -33     
Components Coverage Δ
Generators 80.24% <ø> (ø)
Instruments ∅ <ø> (∅)
Go Driver 75.81% <ø> (ø)
Toolexec Driver 67.37% <ø> (ø)
Aspects 72.21% <86.20%> (+0.44%) ⬆️
Injector 72.83% <80.47%> (+0.33%) ⬆️
Job Server 65.91% <ø> (-3.05%) ⬇️
Other 66.46% <80.47%> (-1.28%) ⬇️
Files with missing lines Coverage Δ
internal/injector/aspect/advice/call.go 79.41% <100.00%> (ø)
internal/injector/aspect/advice/struct.go 67.39% <100.00%> (ø)
internal/injector/aspect/join/declaration.go 48.10% <50.00%> (ø)
internal/injector/aspect/join/struct.go 67.78% <84.61%> (ø)
...ternal/injector/aspect/advice/code/dot_function.go 58.28% <90.62%> (+1.34%) ⬆️
internal/injector/aspect/join/function.go 67.39% <83.33%> (+0.72%) ⬆️
internal/injector/typed/typename.go 74.39% <74.39%> (ø)

... and 3 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.

2 participants