[KT-48068] Add opt-in support for NSEnum for Kotlin Native iOS via an annotation
Basically implementing the feature suggested here: https://youtrack.jetbrains.com/issue/KT-48068
/test-private
Failed to process command due to an unexpected exception.
The K2 (Analysis API, aka AA) implementation is missing, which makes the new test fail in this mode. Run
./gradlew :native:objcexport-header-generator:testAnalysisApi --tests "org.jetbrains.kotlin.backend.konan.tests.ObjCExportHeaderGeneratorTest"
to reproduce.
Related code: https://github.com/JetBrains/kotlin/blob/f90cbf3d9a9437ca98360347a18dd9d9193ea76f/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCClass.kt#L54
Another thing to fix: adding a declaration to stdlib requires updating the ABI dump. Run the following command to do that:
./gradlew :tools:binary-compatibility-validator:cleanTest :tools:binary-compatibility-validator:test --tests "*" -Poverwrite.output=true
The K2 (Analysis API, aka AA) implementation is missing, which makes the new test fail in this mode. Run
I have added this, but AA emits the a comment about the annotation whereas K1 does not... Any suggestions how to resolve this? Current state is the AA output
Ok, I think the implementation is good now. But there are a few more things to be done to actually get it merged:
- Rebase it to
master, squash the commits and write a commit message as recommended here.
I think I have rebased the fork successfully but would like to confirm that I won't screw up the branch with the wrong git command.... (I mainly use perforce for work... O:)
Can you confirm that a valid option to squash is to run git rebase -i HEAD~29 in the fork and then replace /every/ "pick" there with "squash" -- including commits from previous times I synced the fork to head? Would you recommend something else?
I think I have rebased the fork successfully but would like to confirm that I won't screw up the branch with the wrong git command.... (I mainly use perforce for work... O:)
It seems that you actually merged the master branch, not rebased to master.
Can you confirm that a valid option to squash is to run
git rebase -i HEAD~29in the fork and then replace /every/ "pick" there with "squash" -- including commits from previous times I synced the fork to head? Would you recommend something else?
That won't work because of the merge.
First, you need to get rid of the merge commits. Luckily, git rebase helps:
git rebase -i 5952e77c40174e23afb9b2606d3ee3dded3b4b9f
And then you can replace "pick" with "squash" (or "fixup").
Thank you! Merged manually as 48a6704c2ba38ddcf9e29ab880755ec1e373e0ef.