From 02d99769ff71434f35b38af51191435bd5eec615 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Tue, 2 Jan 2024 15:20:10 +0100 Subject: [PATCH] [Analysis API] Use library name in result jar ^KT-62888 ^KT-62651 --- ...raryConstructorProperty.standalone.fir.txt | 8 +- ...PropertyWithAnnotations.standalone.fir.txt | 93 --------- ...raryConstructorVariable.standalone.fir.txt | 12 +- ...VariableWithAnnotations.standalone.fir.txt | 179 ----------------- .../libraryMemberProperty.standalone.fir.txt | 8 +- ...PropertyWithAnnotations.standalone.fir.txt | 96 --------- .../libraryMemberVariable.standalone.fir.txt | 14 +- ...VariableWithAnnotations.standalone.fir.txt | 182 ------------------ .../libraryProperty.standalone.fir.txt | 8 +- ...PropertyWithAnnotations.standalone.fir.txt | 88 --------- .../libraryVariable.standalone.fir.txt | 14 +- ...VariableWithAnnotations.standalone.fir.txt | 170 ---------------- .../libraries/CliTestModuleCompilers.kt | 8 +- .../services/libraries/CompilerExecutor.kt | 21 +- 14 files changed, 51 insertions(+), 850 deletions(-) delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorPropertyWithAnnotations.standalone.fir.txt delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariableWithAnnotations.standalone.fir.txt delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberPropertyWithAnnotations.standalone.fir.txt delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariableWithAnnotations.standalone.fir.txt delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryPropertyWithAnnotations.standalone.fir.txt delete mode 100644 analysis/analysis-api/testData/symbols/symbolByReference/libraryVariableWithAnnotations.standalone.fir.txt diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorProperty.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorProperty.standalone.fir.txt index a531beb59b6..01375eb249a 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorProperty.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorProperty.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/SimpleClass.constructorProperty contextReceivers: [] @@ -48,7 +48,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -82,9 +82,9 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getConstructorProperty javaSetterName: null - setterDeprecationStatus: null + setterDeprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorPropertyWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorPropertyWithAnnotations.standalone.fir.txt deleted file mode 100644 index 697046deeb8..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorPropertyWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,93 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/SimpleClass.constructorPropertyWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/SimpleClass.constructorPropertyWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: false - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: true - modality: FINAL - name: constructorPropertyWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - setter: null - symbolKind: CLASS_MEMBER - typeParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getConstructorPropertyWithAnnotations - javaSetterName: null - setterDeprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariable.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariable.standalone.fir.txt index 7fc04b248d0..966d72fb5cc 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariable.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariable.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/SimpleClass.constructorVariable contextReceivers: [] @@ -48,7 +48,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -106,7 +106,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null receiverParameter: null returnType: KtUsualClassType: @@ -138,7 +138,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null ] visibility: Public @@ -148,7 +148,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] @@ -159,7 +159,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getConstructorVariable diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariableWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariableWithAnnotations.standalone.fir.txt deleted file mode 100644 index e75463a48f7..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryConstructorVariableWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,179 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/SimpleClass.constructorVariableWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/SimpleClass.constructorVariableWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: true - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: false - modality: FINAL - name: constructorVariableWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - setter: KtPropertySetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - parameter: KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Unit - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [ - KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - ] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - symbolKind: CLASS_MEMBER - typeParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getConstructorVariableWithAnnotations - javaSetterName: setConstructorVariableWithAnnotations - setterDeprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberProperty.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberProperty.standalone.fir.txt index 6cebaf6a745..c48fec79991 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberProperty.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberProperty.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/SimpleClass.memberProperty contextReceivers: [] @@ -48,7 +48,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -82,9 +82,9 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getMemberProperty javaSetterName: null - setterDeprecationStatus: null + setterDeprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberPropertyWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberPropertyWithAnnotations.standalone.fir.txt deleted file mode 100644 index 79e634e1508..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberPropertyWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,96 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [ - one/Anno() - psi: null - ] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/SimpleClass.memberPropertyWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/SimpleClass.memberPropertyWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: false - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: true - modality: FINAL - name: memberPropertyWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - setter: null - symbolKind: CLASS_MEMBER - typeParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getMemberPropertyWithAnnotations - javaSetterName: null - setterDeprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariable.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariable.standalone.fir.txt index 7b877c1c2c6..eb1db5bd895 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariable.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariable.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/SimpleClass.memberVariable contextReceivers: [] @@ -48,7 +48,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -106,7 +106,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null receiverParameter: null returnType: KtUsualClassType: @@ -138,7 +138,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null ] visibility: Public @@ -148,7 +148,7 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] @@ -159,9 +159,9 @@ KtKotlinPropertySymbol: type: one/SimpleClass getContainingFileSymbol: null getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getMemberVariable javaSetterName: setMemberVariable - setterDeprecationStatus: null + setterDeprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariableWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariableWithAnnotations.standalone.fir.txt deleted file mode 100644 index 5dcb7c87fff..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryMemberVariableWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,182 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [ - one/Anno() - psi: null - ] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/SimpleClass.memberVariableWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/SimpleClass.memberVariableWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: true - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: false - modality: FINAL - name: memberVariableWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - setter: KtPropertySetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - parameter: KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Unit - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [ - KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - ] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - symbolKind: CLASS_MEMBER - typeParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: one/SimpleClass - getContainingFileSymbol: null - getContainingJvmClassName: one.SimpleClass - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getMemberVariableWithAnnotations - javaSetterName: setMemberVariableWithAnnotations - setterDeprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryProperty.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryProperty.standalone.fir.txt index 1c978bbee2a..05bcf3b84fa 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryProperty.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryProperty.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/topLevelProperty contextReceivers: [] @@ -44,7 +44,7 @@ KtKotlinPropertySymbol: visibility: Public getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -74,9 +74,9 @@ KtKotlinPropertySymbol: visibility: Public getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getTopLevelProperty javaSetterName: null - setterDeprecationStatus: null + setterDeprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryPropertyWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryPropertyWithAnnotations.standalone.fir.txt deleted file mode 100644 index 5f6f3ae67fd..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryPropertyWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,88 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [ - one/Anno() - psi: null - ] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/topLevelPropertyWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/topLevelPropertyWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: false - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: true - modality: FINAL - name: topLevelPropertyWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Short - setter: null - symbolKind: TOP_LEVEL - typeParameters: [] - visibility: Public - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getTopLevelPropertyWithAnnotations - javaSetterName: null - setterDeprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariable.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariable.standalone.fir.txt index 8a7ea4c8762..f4cb73b5b73 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariable.standalone.fir.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariable.standalone.fir.txt @@ -17,7 +17,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null callableIdIfNonLocal: one/topLevelVariable contextReceivers: [] @@ -44,7 +44,7 @@ KtKotlinPropertySymbol: visibility: Public getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null hasBackingField: true hasGetter: true @@ -102,7 +102,7 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null receiverParameter: null returnType: KtUsualClassType: @@ -134,22 +134,22 @@ KtKotlinPropertySymbol: typeParameters: [] getContainingFileSymbol: null getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null ] visibility: Public getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public getContainingFileSymbol: null getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" + getContainingModule: KtLibraryModule "Library lib" deprecationStatus: null getterDeprecationStatus: null javaGetterName: getTopLevelVariable javaSetterName: setTopLevelVariable - setterDeprecationStatus: null + setterDeprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariableWithAnnotations.standalone.fir.txt b/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariableWithAnnotations.standalone.fir.txt deleted file mode 100644 index 8ccf06f993e..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/libraryVariableWithAnnotations.standalone.fir.txt +++ /dev/null @@ -1,170 +0,0 @@ -KtKotlinPropertySymbol: - annotationsList: [ - one/Anno() - psi: null - ] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(one/topLevelVariableWithAnnotations) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - callableIdIfNonLocal: one/topLevelVariableWithAnnotations - contextReceivers: [] - getter: KtPropertyGetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [] - visibility: Public - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - hasBackingField: true - hasGetter: true - hasSetter: true - initializer: null - isActual: false - isConst: false - isDelegatedProperty: false - isExpect: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: false - modality: FINAL - name: topLevelVariableWithAnnotations - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - setter: KtPropertySetterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - hasBody: false - hasStableParameterNames: true - isDefault: false - isExtension: false - isInline: false - isOverride: false - modality: FINAL - origin: LIBRARY - parameter: KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Unit - symbolKind: ACCESSOR - typeParameters: [] - valueParameters: [ - KtValueParameterSymbol: - annotationsList: [ - one/Anno() - psi: null - ] - callableIdIfNonLocal: null - contextReceivers: [] - generatedPrimaryConstructorProperty: null - hasDefaultValue: false - isCrossinline: false - isExtension: false - isImplicitLambdaParameter: false - isNoinline: false - isVararg: false - name: value - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Long - symbolKind: LOCAL - typeParameters: [] - getContainingFileSymbol: null - getContainingJvmClassName: null - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - ] - visibility: Public - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - symbolKind: TOP_LEVEL - typeParameters: [] - visibility: Public - getContainingFileSymbol: null - getContainingJvmClassName: one.LibKt - getContainingModule: KtLibraryModule "Library library" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getTopLevelVariableWithAnnotations - javaSetterName: setTopLevelVariableWithAnnotations - setterDeprecationStatus: null diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CliTestModuleCompilers.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CliTestModuleCompilers.kt index 0b9243250ba..3a089b35da6 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CliTestModuleCompilers.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CliTestModuleCompilers.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -37,12 +37,13 @@ abstract class CliTestModuleCompiler : TestModuleCompiler() { compilerKind, tmpDir, buildCompilerOptions(module, testServices), - compilationErrorExpected = Directives.COMPILATION_ERRORS in module.directives + compilationErrorExpected = Directives.COMPILATION_ERRORS in module.directives, + libraryName = module.name, ) override fun compileTestModuleToLibrarySources(module: TestModule, testServices: TestServices): Path { val tmpDir = KtTestUtil.tmpDir("testSourcesToCompile").toPath() - val librarySourcesPath = tmpDir / "library-sources.jar" + val librarySourcesPath = tmpDir / "${module.name}-sources.jar" val manifest = Manifest().apply { mainAttributes[Attributes.Name.MANIFEST_VERSION] = "1.0" } JarOutputStream(librarySourcesPath.outputStream(), manifest).use { jarOutputStream -> for (testFile in module.files) { @@ -50,6 +51,7 @@ abstract class CliTestModuleCompiler : TestModuleCompiler() { addFileToJar(testFile.relativePath, text, jarOutputStream) } } + return librarySourcesPath } diff --git a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CompilerExecutor.kt b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CompilerExecutor.kt index 5735c5cc28f..c75ee6b3ae4 100644 --- a/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CompilerExecutor.kt +++ b/analysis/analysis-test-framework/tests/org/jetbrains/kotlin/analysis/test/framework/services/libraries/CompilerExecutor.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -15,9 +15,15 @@ import java.nio.file.Path import kotlin.io.path.* internal object CompilerExecutor { - fun compileLibrary(compilerKind: CompilerKind, sourcesPath: Path, options: List, compilationErrorExpected: Boolean): Path { + fun compileLibrary( + compilerKind: CompilerKind, + sourcesPath: Path, + options: List, + compilationErrorExpected: Boolean, + libraryName: String, + ): Path { val library = try { - compile(compilerKind, sourcesPath, options) + compile(compilerKind, sourcesPath, options, libraryName) } catch (e: Throwable) { if (!compilationErrorExpected) { throw IllegalStateException("Unexpected compilation error while compiling library", e) @@ -34,12 +40,13 @@ internal object CompilerExecutor { return library } - private fun compile(compilerKind: CompilerKind, sourcesPath: Path, options: List): Path { + private fun compile(compilerKind: CompilerKind, sourcesPath: Path, options: List, libraryName: String): Path { val sourceFiles = sourcesPath.toFile().walkBottomUp() val library = when (compilerKind) { - CompilerKind.JVM -> sourcesPath / "library.jar" - CompilerKind.JS -> sourcesPath / "library.klib" + CompilerKind.JVM -> sourcesPath / "$libraryName.jar" + CompilerKind.JS -> sourcesPath / "$libraryName.klib" } + when (compilerKind) { CompilerKind.JVM -> { val commands = buildList { @@ -53,7 +60,7 @@ internal object CompilerExecutor { CompilerKind.JS -> { val commands = buildList { add(K2JSCompilerArguments::metaInfo.cliArgument) - add(K2JSCompilerArguments::moduleName.cliArgument); add("library") + add(K2JSCompilerArguments::moduleName.cliArgument); add(libraryName) add(K2JSCompilerArguments::outputDir.cliArgument); add(library.parent.absolutePathString()) add(K2JSCompilerArguments::irProduceKlibFile.cliArgument) sourceFiles.mapTo(this) { it.absolutePath }