In 2.4.0, annotation lists are typed as List<IrAnnotation> and
IrConstructorCallImpl does not extend IrAnnotation. Replace all
IrConstructorCallImpl.fromSymbolOwner() calls that create annotations
with a compat wrapper codeQlAnnotationFromSymbolOwner() that uses
IrAnnotationImpl.fromSymbolOwner() in 2.4.0 (returning proper
IrAnnotation instances) and IrConstructorCallImpl.fromSymbolOwner()
in pre-2.4.0 versions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In 2.4.0, IrMemberAccessExpression.arguments includes all parameters
(dispatch receiver, extension receiver, and regular value args). The
old getValueArgument/putValueArgument/valueArgumentsCount APIs indexed
only value arguments. Fix the compat layer to apply the correct offset
when translating between the old index-based API and the new unified
arguments list.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The CompilerPluginRegistrar service file must only be included in the
2.4.0 jar. Older Kotlin versions (2.3.x and below) read this service
file and try to cast the class to CompilerPluginRegistrar, but the
older version extractor only implements ComponentRegistrar, causing a
ClassCastException at runtime.
For 2.4.0, the registrar implements both ComponentRegistrar (no-op, as
extensionArea was removed) and CompilerPluginRegistrar (actual
registration via ExtensionStorage).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Download kotlin-compiler-2.4.0.jar, kotlin-compiler-embeddable-2.4.0.jar,
and kotlin-stdlib-2.4.0.jar from Maven Central. Add 2.4.0 to the VERSIONS
list and update MODULE.bazel via bazel mod tidy.
The extractor does not yet compile against 2.4.0 due to removed APIs
(valueParameters, extensionReceiverParameter, getValueArgument, etc.).
Version-specific compatibility shims are needed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Raise the acceptable version limit to 2.4.10 and update documentation
to reflect Kotlin 2.4.x support.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Use BUILD_REPO/DIST_REPO split so zip contains only runtime deps
(build-lifecycle plugins, test jars, etc. stay in throwaway BUILD_REPO)
- Minimal inline stub pom.xml (no deps) instead of archetype:generate
to avoid polluting DIST_REPO with stub project's own dependencies
- Replace grep -oP (PCRE, unavailable on macOS BSD grep) with Python re
- Use version-aware Python version_key() for max POM version selection
(lexicographic sort fails for e.g. 2.18.10 vs 2.18.6; release > snapshot)
- Write zip to caller's working directory; keep cleanup trap active;
remove `trap - EXIT` which was leaving WORK_DIR behind