Skip to content

Conversation

@ambushwork
Copy link
Member

What does this PR do?

Currently we use DD_DEFAULT_TAG as semantics tag value for all the nodes,

In this PR, we detect the composable function name of the expression, and use it as the value of the semantics tag.

For example, in the client code if they have:

Column{
     Image(painter = xx, contentDescription = null)
     Text(text = "something")
     CustomView()
}

In the semantics tree it will have:

    |-Node #16 
    | _dd_semantics = 'Column'
    |  |-Node #48 
    |     | _dd_semantics = 'Image'
    |  |-Node #49
    |     | _dd_semantics = 'Text'
    |  |-Node #50
    |     | _dd_semantics = 'CustomView'

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@ambushwork ambushwork requested review from a team as code owners March 19, 2025 14:20
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.97%. Comparing base (af8db6f) to head (b7b2e6f).
Report is 5 commits behind head on feature/kotlin-compiler-plugin.

Additional details and impacted files
@@                         Coverage Diff                          @@
##             feature/kotlin-compiler-plugin     #337      +/-   ##
====================================================================
- Coverage                             78.00%   77.97%   -0.03%     
+ Complexity                              345      343       -2     
====================================================================
  Files                                    42       42              
  Lines                                  1350     1353       +3     
  Branches                                159      159              
====================================================================
+ Hits                                   1053     1055       +2     
  Misses                                  210      210              
- Partials                                 87       88       +1     
Files with missing lines Coverage Δ
...datadog/gradle/plugin/kcp/ComposeTagTransformer.kt 82.93% <100.00%> (-0.62%) ⬇️

... and 2 files with indirect coverage changes

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

@ambushwork ambushwork merged commit adf432b into feature/kotlin-compiler-plugin Mar 19, 2025
13 checks passed
@ambushwork ambushwork deleted the yl/kcp-use-composable-name-for-tag branch March 19, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants