-
Notifications
You must be signed in to change notification settings - Fork 41
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
[BUG] Wrong path for generated files #591
Comments
I also saw this behavior recently when messing with the hello world and using |
Thanks @jknazko. I think there is a misunderstanding with the environment variable
Thanks again for raising this issue 🙌 |
new sources should be placed in the same place as kapt places them by default and overridable ideally in the DSL not as an environment variable |
It looks like #608 didn't fix the strange global default path issue, when I'm using the latest Snapshot it still generates files here |
Thanks @alexanderdrw 🙌 Just a comment about:
It's possible to provide absolute paths (relative ones have that issue). |
@jknazko @russhwolf @alexanderdrw a new fix is already available for the current SNAPSHOT and there is a new example to show how it's working:
Please, re-open if you find any problem. Thanks!! |
Describe the bug
Transform.newSources generates files in strange global path independent of project location.
I still can reference generated code and project (sometimes) builds fine but code usages in Intellij lights red because generated files are not in source set.
On mac is everything generated into:
~/Library/Application Support/kotlin/daemon/build/generated/source/kap/main
I tried to change environment variable "arrow.meta.generated.source.output" but it only changes relative path within that .../deamon folder
To Reproduce
I did just a small change in helloWorld example
jknazko/arrow-meta-examples@b4ecb91
Doesn't matter if I build the example from IDE or run gradlew from command line result is that helloWorld_Generated.kt and helloWorld_Generated.kt.meta are generated in ~/Library/Application Support/kotlin/daemon
I see class file in IDE but no source
Not sure if this is related or completely different bug but when I make any change to the code after first successful build then it fails with:
I encountered multiple other errors but don't know how to reproduce, whole experience was very random, broken and usually "fixed" with a lot of intellij restarts + clear caches. But Arrow Meta has great potential.
Expected behavior
I would expect all generated files to be created in build folder within the project itself.
Environment
I always get exactly same behaviour, tried multiple gradle versions with:
Intellij IDEA CE 2019.3.3 - kotlin plugin 1.3.61
Intellij IDEA CE 2020.1 - kotlin plugin 1.3.72
I also replicated it on both MacOS and Linux
The text was updated successfully, but these errors were encountered: