Wrong compile error in IDE for generated Lenses
See original GitHub issueSometimes there is an error in your IDE with the generated L
object after the Gradle build were successfull.
val name = inspector.sub(L.Person.name)
This is of course confusing and we should try to check if we can tell the IDE where to find this generated sources.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (3 by maintainers)
Top Results From Across the Web
False compile error - IDEs Support (IntelliJ Platform) | JetBrains
Hi,Something strange is happening in Idea..When I build my project, Idea tells me that I have 3 compile errors. Then I go to...
Read more >Visual Studio Code Extension: Error Lens - YouTube
In this video, I'm going to explain about the extension called ErrorLens for Visual Studio Code. It is a great extension to catch...
Read more >Fix the top 10 most common compile time errors in Java
Here are the 10 most commonly encountered Java compile errors, ... If not, the compiler generates the following Java compile time error:
Read more >Compiler Error Messages Considered Unhelpful
Diagnostic error messages generated by compilers and interpreters, including error, warning, and run-time messages, have been re- searched for over 50 years ...
Read more >IDEA JetBrains IntelliJ - Compile error on 'make' but fine when ...
The error message is basically saying that that method doesn't exist but believes the old method still exists! I click on the 'make'...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Classes annotated with
@Lenses
have to be in thecommonMain
SourceSet (as described here https://docs.fritz2.dev/Lenses.html). Also you should put your data model classes in a package different from root to avoid name conflicts.We add
commonMain
to our project template to make this more obvious…Yes, I had the same problem in this project too. And I also had to remove the
ẁithJava()
call. But then therun
tasks stopped working and I must changed more things in my build file in order to get it work again. Now it should work fine withoutwithJava()
. Hopefully the current version of build.gradle.kts is a good place to take from.If you have some improvements please let me know or give me a PR! Thanks