question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compilation error: IntelliJ IDEA build tool and String Templates

See original GitHub issue

Describe the bug String Templates can’t be turned off. This causes a compilation error in IntelliJ IDEA.

To Reproduce Test project: https://github.com/marksto/spring-manifold-test

Open it in the IntelliJ IDEA.

Pay attention on how it highlights the syntax of the @Value annotation’s value.

Снимок экрана 2019-04-13 в 15 25 09

Try to build or run the project with IntelliJ IDEA built-in tools:

Снимок экрана 2019-04-13 в 15 42 42

Expected behavior The absent strings plugin argument actively disables Manifold’s string templating. Project compiles without errors. There is no need in extra @DisableStringLiteralTemplates annotations (this is too invasive).

Desktop (please complete the following information):

  • OS Type & Version: “mac os x”, version: “10.14.3”, arch: “x86_64”, family: “mac”
  • Java/JDK version: Java version: 1.8.0_172, vendor: Oracle Corporation
  • IntelliJ IDEA version: 2018.1.2
  • Manifold version: 0.59-alpha
  • Manifold IntelliJ plugin version: 0.59-alpha

Additional context The mvn clean install (and the test suite in particular) runs successfully. One can mitigate this with extra @DisableStringLiteralTemplates annotations (see #44).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rsmckinneycommented, Oct 6, 2022

I see. I am considering an option to qualify a string literal like this:

String s = $"High score: ${score}";

Where only string literals starting with $" will be processed for string templates. Would that work for you?

0reactions
lly-kecommented, Oct 7, 2022

Yes, this feature will be previewed in a future version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compile and build applications with IntelliJ IDEA - JetBrains
Learn how to compile and build applications, automatically build a project, trigger the compilation before running, check the compilation ...
Read more >
Intellij IDEA: can not navigate from compiler error to source
When compiling my code using the IDEA maven build tool, I now can't manage to navigate to the source file containing the error...
Read more >
IntelliJ IDEA - Confluence - IHMC
Live template for JUnit 5 test; Live template for Log Tools. Disable Inlay Hints; Java build and compiler settings. Build automatically; Making sure ......
Read more >
Get started with Kotlin/Native in IntelliJ IDEA
Build and run the application · Go to Settings/Preferences | Build, Execution, Deployment | Compiler. · On the Compiler page, select Build project ......
Read more >
IntelliJ IDEA - How to Set Latest Java SDK and fix an Error
Step-3) · Go to IntelliJ IDEA · Click on Preferences · Go to Build, Execution, Deployment -> Compiler -> Java Compiler · Make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found