Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up #6572: Re-order test classpath to load correct Logger as workaround for KT-60813 #6636

Closed
wants to merge 4 commits into from

Conversation

TWiStErRob
Copy link
Member

This solution replaces the slf4j Logger with the correct one by classpath ordering: c4ef737

I ran into #4140/#4170 not being implemented fully (current implementation is based on assumptions). The assumption is that the / resource on the classpath points to the current module's test sourceSet. By changing the order I changed this and now the slf4j.jar is on the classpath first, which triggers #4140. I was able to workaround this by looking for a specific file that's in the correct folder (ba150db), but it's not scalable, so I instead changed the logic to insert the new dependency in the middle of the classpath: 68352ce

This makes `gradlew :d-f:test -Pcompile-test-snippets=true` pass
…use it's not scalable. Satisfy the assumption that the the `/` resource on the classpath points to the current module's test sourceSet.
@TWiStErRob TWiStErRob added this to the 2.0.0 milestone Nov 19, 2023
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (933be47) 85.13% compared to head (68352ce) 85.13%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6636   +/-   ##
=========================================
  Coverage     85.13%   85.13%           
  Complexity     4079     4079           
=========================================
  Files           570      570           
  Lines         13363    13363           
  Branches       2402     2402           
=========================================
  Hits          11376    11376           
  Misses          791      791           
  Partials       1196     1196           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@detekt-ci
Copy link
Collaborator

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against 68352ce

@3flex
Copy link
Member

3flex commented Nov 23, 2023

Kotlin 1.9.21 fixes KT-60813 so I've opened #6646 to remove the workaround introduced in #6636. This PR isn't required anymore.

@3flex 3flex closed this Nov 23, 2023
@TWiStErRob TWiStErRob deleted the followup6572 branch November 23, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants