aboutcode-org / aboutcode-org/scancode.io

Compiled .class May Differ from Source Filename - map_deploy_to_devel (kotlin)

Aberta
#2,214 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
Python
Estrelas
215
Forks
203
Merge médio
4d 8h
PRs com merge (30d)
6

Descrição

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)

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.