aboutcode-org / aboutcode-org/scancode.io
Compiled .class May Differ from Source Filename - map_deploy_to_devel (kotlin)
- 主要語言
- Python
- 星號
- 215
- 分支
- 203
- 平均合併
- 4 天 8 小時
- 30 天內合併 PR
- 6
描述
In Koltin, a compiled `.class` file may not directly correspond to its source filename.
Use case
----------
Project: kotlin-stdlib-1.9.23
binary
```
to/kotlin/annotation/AnnotationRetention.class
```
However, there is no corresponding `.kt` file in the source package.
The actual source for the `.class` file is at `./jvmMain/kotlin/annotation/Annotations.kt`
```
public enum class AnnotationTarget {
/** Class, interface or object, annotation class is also included */
CLASS,
/** Annotation class only */
ANNOTATION_CLASS,
/** Generic type parameter */
TYPE_PARAMETER,
/** Property */
PROPERTY,
/** Field, including property's backing field */
FIELD,
/** Local variable */
LOCAL_VARIABLE,
...
```
As a result, the code need to look at the inner classes to identify the mapping.
Similar issues:
https://github.com/aboutcode-org/scancode.io/issues/1875
https://github.com/aboutcode-org/scancode.io/issues/1993
(and the fix are likely similar)
貢獻指南
評估
這個 Issue 還沒有評估資料。