-
Notifications
You must be signed in to change notification settings - Fork 6k
Create header mode to enable eliding function / method bodies #5516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
d2bc6f9
to
1078988
Compare
Is this a Kotlin/JVM-only feature? If yes, then why the CLI flag is available for other Kotlin compilers? If no, then what's the plan towards the exising |
No, we should change the description of the issue. It should work atleast across the JVM and native compiler. Once all the features are implemented, we might be able to deprecate the Xheader-klib-path. |
compiler/arguments/src/org/jetbrains/kotlin/arguments/description/CommonCompilerArguments.kt
Show resolved
Hide resolved
...ee2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt
Outdated
Show resolved
Hide resolved
I think, it's also important to pass the "header mode" flag down to |
… and expression builders across all compilers. ^KT-78422
d5b4265
to
e6c6a4e
Compare
e6c6a4e
to
e4690f2
Compare
I don't see any tests for the feature and it seems quite strange for me. As a very minimum, I'd recommend to add some new tests to |
|
||
class LightTree2Fir( | ||
val session: FirSession, | ||
val headerCompilationMode: Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this flag is not needed as you can access it via session.languageVersionSettings.getFlag(...)
. As an example you can see how it's done for lenientMode
. I don't see it's a good idea adding any flag we need as an argument everywhere.
More in https://youtrack.jetbrains.com/issue/KT-78422