Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Ability to specify a build target for kotlin_home #2121

Closed
raviagarwal7 opened this issue Dec 2, 2018 · 3 comments
Closed

Ability to specify a build target for kotlin_home #2121

raviagarwal7 opened this issue Dec 2, 2018 · 3 comments

Comments

@raviagarwal7
Copy link
Contributor

raviagarwal7 commented Dec 2, 2018

Currently kotlin compilation can happen using the external kotlinc tool or in memory using the kotlin_home buck config.
The current implementation assumes that the kotlin_home will always be a path in the filesystem.

Proposal is to remove that assumption and make kotlin_home support a source path. The changes would mostly be to JarBackedReflectedKotlinc. ExternalKotlinc will not change much.

Also planning to remove all the complex lookups for magically finding kotin libraries. looking at the current kotlin installation in mac (version 1.2.71) all kotlin libraries can be found in KOTLIN_HOME/libexec/lib and all the executables can be found in KOTLIN_HOME/bin. So, we can just only lookup in libexec/lib subfolder and remove all other custom logic.

we also have corresponding pull request in okbuck to move to using source paths - uber/okbuck#748

@raviagarwal7
Copy link
Contributor Author

cc @kageiit, @cwoodwar6, @thalescm

@thalescm
Copy link
Contributor

thalescm commented Dec 3, 2018

👍 I agree with the suggested changes.
My guess is that all this custom logic was made to support different version of kotlin on the beginning, when things weren't too stable. Seems like it's pretty safe to remove it now

raviagarwal7 added a commit to raviagarwal7/buck that referenced this issue Dec 13, 2018
- Support specifying a source path for kotlin_home buck config
- Simplified and cleaned up logic to look up kotlin home.
- Updated Docs

Resolves facebook#2121

Dependent PR’s:
facebook#2131
facebook#2130
raviagarwal7 added a commit to raviagarwal7/buck that referenced this issue Dec 20, 2018
- Support specifying a source path for kotlin_home buck config
- Simplified and cleaned up logic to look up kotlin home.
- Updated Docs

Resolves facebook#2121

Dependent PR’s:
facebook#2131
facebook#2130
raviagarwal7 added a commit to raviagarwal7/buck that referenced this issue Dec 21, 2018
- Support specifying a source path for kotlin_home buck config
- Simplified and cleaned up logic to look up kotlin home.
- Updated Docs

Resolves facebook#2121

Dependent PR’s:
facebook#2131
facebook#2130
raviagarwal7 added a commit to raviagarwal7/buck that referenced this issue Dec 21, 2018
- Support specifying a source path for kotlin_home buck config
- Simplified and cleaned up logic to look up kotlin home.
- Updated Docs

Resolves facebook#2121

Dependent PR’s:
facebook#2131
facebook#2130
thalescm pushed a commit to thalescm/buck that referenced this issue Jan 14, 2019
…k#2122)

Summary:
- Support specifying a source path for `kotlin_home` buck config
- Simplified and cleaned up logic to look up kotlin home.
- Updated Docs

Resolves facebook#2121

Dependent PR’s:
facebook#2131
facebook#2130
Pull Request resolved: facebook#2122

Reviewed By: styurin

Pulled By: styurin

fbshipit-source-id: df2f2524bd
@raviagarwal7
Copy link
Contributor Author

could we please re-open it since the PR was reverted.
I can work on creating a PR on the latest master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants