-
Notifications
You must be signed in to change notification settings - Fork 12
Apt template resolution from IDEA #221
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
Comments
I have been meaning to boot up IDEA on this project to test (I do use it from time to time). Ironically I have been using Eclipse and VSCode because there usually the more problematic ones. The first one is CLASS_OUTPUT. You can ignore the URI portion of it. The reason it does not resolve is because IDEA has not copied over the resources yet or does not seem them for whatever reason. Eclipse has a similar problem. Do you have incremental compiling turned on? The second one is a guessing attempt based on where the APT filer thinks its CWD is. What I probably need to do is use Anyway you can see that logic here I'll have a fix tonight or tomorrow. In the meantime see or read: https://jstach.io/jstachio/io.jstach.jstache/io/jstach/jstache/JStache.html#RESOURCES_PATH_OPTION I need to improve the overview to point to that. |
I've read |
Darn I'm having a hard time reproducing. Perhaps there are some symlinks (aka |
No symlinks in my path. Steps to reproduce:
If you use the maven tool window to build, or your IDEA is set to delegate build to maven, then it works without issue. Maybe check here to see if your build is delegated to maven: |
I think the critical step I missed is upgrade to 1.3.0 |
I tried upgrading 1.3.0 and made sure delegate to maven is off. I tailed the intellij log file as well as checked build output. I only get one warning:
I'm not sure what that means exactly. Maybe that is the issue? Is this CE or Ultimate? macOs IntelliJ IDEA 2023.2 (Community Edition) Kotlin: 232-1.9.0-IJ8660.185 |
Its CE. Anything I can do to help? |
One thing I did not try is change the pom before import of project. I changed the pom after I imported. I will try that in a little bit. |
I guess where do you see the error? Is it in the Build Output window or is in the actual intellij log file? Does the error eventually go away? I assume you are on macOS. Intel or Arm (I know its highly unlike this matters)? Do you have another machine or vm image you could try? I don't have intellij in front of me at the moment and won't be able to test till tonight. |
It's in the build output. I'm using arm Mac. I can try on an intel mac later today. Let me see if I have a VM lying around. |
I've tried with a windows and ubuntu VM, both had the same error. |
Ok so I downloaded latest CE on my macOS ARM (the previous one I tested on was Intel). Followed all the steps. Here is my build output:
The only thing I can currently think of is I picked JDK 20. |
Can you copy the build output? |
OK I got it to happen. |
I switched to JDK 17 and it happened. EDIT So I can reproduce it readily by using JDK 17. If I use 18 or higher the problem goes away. (btw I really appreciate your patience on this and am sorry I was not able to reproduce so easily!) Sadly I'm not sure what the solution is yet other than telling people to use a newer JDK. |
@taypo Can you try using JDK 20 and see if the problem goes away on your end while I figure out what hack I can put in? |
Yeah, it worked now with JDK 20. |
I found the problem and fixed it. The fallback was thinking it was Gradle because Intellij has Gradle somewhere in its execution command. As for why it happens on JDK 17 there appears to be a bug where Intellij is not copying resources over for that JDK. Eclipse does this as well and it is a known issue hence all that fallback logic. |
@taypo in Release 1.3.1 which just got released. May have to wait a little for Maven Central. Thanks for the help! |
I was trying Dave Syer's template demo and got the following error while building inside IDEA.
This with version 1.3.0 of jstachio. 1.2.0 failed with a similar error with a different path in the log.
First path seems to be correct, though I'm not sure about the
file:
prefix. Second path is definitely missing 2 directories in the middle. If you delegate build to maven from IDEA, everything works.Thanks
The text was updated successfully, but these errors were encountered: