aboutcode-org / aboutcode-org/scancode.io

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

Offen
#2,214 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
215
Forks
203
Ø Merge
4 T. 8 Std.
Gemergte PRs (30 T.)
6

Beschreibung

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)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.