Files
kotlin-fork/native/swift/sir-analysis-api
Artem Olkov a040954f68 rrn/rd/KT-63270-swift-printer
KT-63270: add swift printing capabilities to SIR

Co-authored-by: Artem Olkov <artem.olkov@jetbrains.com>
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com>


Merge-request: KT-MR-13191
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-11-29 14:03:59 +00:00
..

Build Swift IR from Analysis API

This module is responsible for populating SIR tree. It is the first step in Swift Export pipeline.

Input: It should be possible to populate SIR from two types of artefacts: 1/ Kotlin Source Module 2/ KLib (currently not supported)

Dev guide

How to generate tests:

./gradlew :generators:sir-tests-generator:generateTests

this will generate test by their input files. Input files could be found and should be placed here - native/swift/sir-analysis-api/testData

The test expects to find .sir file, containing serialized SIR for the test-case. Name of the .sir file should be the same as a name of corresponding .kt file.

The project for the generator can be found here - generators/sir-tests-generator/build.gradle.kts

How to run tests:

./gradlew :native:swift:sir-analysis-api:test --tests "*"

OR just open SirAnalysisGeneratedTests in IDEA and start them from gutter.

Project Setup

No additional setup required to develop this project.