Bump ktast to 0.10.0 and support implicit import#70
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the documentation to reflect the upgrade of ktast to version 0.10.0 and introduces implicit imports for both ktast and ktcodeshift packages in transform scripts.
- Removed explicit import statements for ktast and ktcodeshift in the examples.
- Added a new "Implicit imports" section to document the available implicit imports.
Files not reviewed (13)
- ktcodeshift-cli/build.gradle.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/Annotations.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/FlattenList.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/GenerateBuilders.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/Identity.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/JUnit4To5.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/RenameVariable.transform.kts: Language not supported
- ktcodeshift-cli/src/test/resources/examples/SortWhenBranches.transform.kts: Language not supported
- ktcodeshift-dsl/build.gradle.kts: Language not supported
- ktcodeshift-dsl/src/main/kotlin/ktcodeshift/NodeCollection.kt: Language not supported
- ktcodeshift-dsl/src/main/kotlin/ktcodeshift/NodeExtension.kt: Language not supported
- ktcodeshift-dsl/src/main/kotlin/ktcodeshift/script/ScriptDefinition.kt: Language not supported
- ktcodeshift-dsl/src/test/kotlin/ktcodeshift/ApiTest.kt: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builder API has moved from ktcodeshift to ktast. For the compatibility of transform scripts, we provide implicit import of
ktast.builder.*packages. In addition, to avoid having to write the import statements, we added implicit import support for thektast.ast.*andktcodeshift.*packages.In summary, the following imports are implicitly available in the transform file now: