google / google/ksp

Support Gradle's `kotlinOptions.freeCompilerArgs`

Open
#2,670 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

Someone ran into this issue in Dagger when trying to set the module name via `kotlinOptions.freeCompilerArgs`: https://github.com/google/dagger/issues/4493.

In this case, using `kotlin.compilerOptions.moduleName` works (KSP supports this); however, it would be nice if KSP also checked the `freeCompilerArgs` as well. At the very least, consider checking the value and throwing an exception with an error message telling users to use the `kotlin.compilerOptions` API instead.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how KSP handles kotlin.compilerOptions.moduleName and the Gradle kotlinOptions.freeCompilerArgs input. Done means either supporting the module-name value from freeCompilerArgs or rejecting it with an error that directs users to the kotlin.compilerOptions API.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.