Skip to content

Commit

Permalink
Temporarily disable support for correct toString and hashCode because…
Browse files Browse the repository at this point in the history
… it needs custom header generation.
  • Loading branch information
FilipDolnik committed Apr 17, 2024
1 parent a24b677 commit c95a3f4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SKIE/acceptance-tests
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ enum class SkieConfigurationFlag {
Build_ConcurrentSkieCompilation,

Migration_WildcardExport,
// TODO Add tests once we implement custom header generation
Migration_AnyMethodsAsFunctions,

Debug_VerifyDescriptorProviderConsistency,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ internal class CreateKirDescriptionAndHashPropertyPhase(

context(KirPhase.Context)
override fun isActive(): Boolean =
SkieConfigurationFlag.Migration_AnyMethodsAsFunctions.isDisabled
// WIP Change back once we generate custom header
// WIP Add tests for this flag and functionality
false
// SkieConfigurationFlag.Migration_AnyMethodsAsFunctions.isDisabled

private val cache = mutableMapOf<FunctionDescriptor, KirProperty>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ internal class CreateKirSimpleFunctionsPhase(

private val convertedPropertyKindLazyInitializers = mutableListOf<() -> Unit>()

private val needsDescriptionAndHashFunctions = SkieConfigurationFlag.Migration_AnyMethodsAsFunctions in context.rootConfiguration.enabledFlags
// WIP Change back once we generate custom header
// private val needsDescriptionAndHashFunctions = SkieConfigurationFlag.Migration_AnyMethodsAsFunctions in context.rootConfiguration.enabledFlags
private val needsDescriptionAndHashFunctions = true

context(KirCompilerPhase.Context)
override suspend fun execute() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ abstract class SkieMigrationConfiguration @Inject constructor(objects: ObjectFac
* SKIE corrects this behavior and always exports `toString()` as `description` and `hashCode()` as `hash`.
* To enable the original behavior, set this flag to `true`.
*/
// TODO Set this to false once we generate custom headers
val anyMethodsAsFunctions: Property<Boolean> = objects.property(Boolean::class.java).convention(true)
val anyMethodsAsFunctions: Property<Boolean> = objects.property(Boolean::class.java).convention(false)

internal fun buildConfigurationFlags(): Set<SkieConfigurationFlag> =
setOfNotNull(
Expand Down

0 comments on commit c95a3f4

Please sign in to comment.