Skip to content

Commit fe88ab0

Browse files
Iveta Jurčíkováfacebook-github-bot
Iveta Jurčíková
authored andcommitted
Rename KotlinCDScribeAnalytics to KotlinCDLoggerAnalytics
Summary: ### Context The Scribe logger was integrated into the Android Build Toolchain to collect data from KotlinCD steps. However, with the recent transition of ABT to open-source, we can no longer include Meta-specific code in the OSS release, as it would cause build failures. ### This Stack This stack aims to use ServiceLoader to inject the correct implementation based on the repository source (OSS or Meta). **Final structure** {F1976250827} ### This diff Renames KotlinCDScribeAnalytics abstract class to KotlinCDLoggerAnalytics to hide implementation details from its name. Reviewed By: hick209 Differential Revision: D71559747 fbshipit-source-id: a5b4340948a47cc0f3d44562a3f5b46ed34e1028
1 parent da2255d commit fe88ab0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

prelude/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/scribe/KotlinCDScribeAnalytics.kt prelude/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger/KotlinCDLoggerAnalytics.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of this source tree.
88
*/
99

10-
package com.facebook.buck.jvm.kotlin.cd.analytics.scribe
10+
package com.facebook.buck.jvm.kotlin.cd.analytics.logger
1111

1212
import com.facebook.buck.core.util.log.Logger
1313
import com.facebook.buck.jvm.cd.command.kotlin.LanguageVersionForLogs
@@ -19,7 +19,7 @@ import java.time.Clock
1919
import java.time.Duration
2020
import java.time.Instant
2121

22-
class KotlinCDScribeAnalytics
22+
class KotlinCDLoggerAnalytics
2323
@JvmOverloads
2424
constructor(
2525
private val kotlinCDLogger: KotlinCDLogger,
@@ -86,6 +86,6 @@ constructor(
8686
}
8787

8888
companion object {
89-
private val LOG: Logger = Logger.get(KotlinCDScribeAnalytics::class.java)
89+
private val LOG: Logger = Logger.get(KotlinCDLoggerAnalytics::class.java)
9090
}
9191
}

prelude/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/workertool/KotlinCDCommand.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.facebook.buck.jvm.kotlin.KotlinStepsBuilder;
2828
import com.facebook.buck.jvm.kotlin.cd.analytics.KotlinCDAnalytics;
2929
import com.facebook.buck.jvm.kotlin.cd.analytics.KotlinCDNoopAnalytics;
30-
import com.facebook.buck.jvm.kotlin.cd.analytics.scribe.KotlinCDScribeAnalytics;
30+
import com.facebook.buck.jvm.kotlin.cd.analytics.logger.KotlinCDLoggerAnalytics;
3131
import com.facebook.buck.jvm.kotlin.cd.logger.KotlinCDLogger;
3232
import com.facebook.buck.jvm.kotlin.cd.workertool.postexecutors.ClassAbiWriter;
3333
import com.facebook.buck.jvm.kotlin.cd.workertool.postexecutors.PostExecutorsFactory;
@@ -189,7 +189,7 @@ private KotlinCDAnalytics initKotlinCDAnalytics() {
189189
String target = parts[0];
190190
String subtarget = parts.length > 1 ? parts[1] : "library";
191191

192-
return new KotlinCDScribeAnalytics(
192+
return new KotlinCDLoggerAnalytics(
193193
KotlinCDLogger.loadImplementation(),
194194
buildUuid,
195195
target,

prelude/toolchains/android/test/com/facebook/buck/jvm/kotlin/cd/analytics/scribe/KotlinCDScribeAnalyticsTest.kt prelude/toolchains/android/test/com/facebook/buck/jvm/kotlin/cd/analytics/logger/KotlinCDLoggerAnalyticsTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of this source tree.
88
*/
99

10-
package com.facebook.buck.jvm.kotlin.cd.analytics.scribe
10+
package com.facebook.buck.jvm.kotlin.cd.analytics.logger
1111

1212
import com.facebook.buck.jvm.cd.command.kotlin.LanguageVersion
1313
import com.facebook.buck.jvm.kotlin.cd.analytics.ClasspathChangesParam
@@ -26,7 +26,7 @@ import org.mockito.kotlin.never
2626
import org.mockito.kotlin.times
2727
import org.mockito.kotlin.verify
2828

29-
internal class KotlinCDScribeAnalyticsTest {
29+
internal class KotlinCDLoggerAnalyticsTest {
3030

3131
private val kotlinCDLogger: KotlinCDLogger = mock()
3232

@@ -130,7 +130,7 @@ internal class KotlinCDScribeAnalyticsTest {
130130
}
131131

132132
private fun createFakeKotlinCDAnalytics(buildUuid: String? = DEFAULT_BUILDUUID) =
133-
KotlinCDScribeAnalytics(
133+
KotlinCDLoggerAnalytics(
134134
kotlinCDLogger = kotlinCDLogger,
135135
buildUuid = buildUuid,
136136
target = TARGET,

0 commit comments

Comments
 (0)