Skip to content
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

Support string templates #303

Closed
cushon opened this issue Jan 28, 2024 · 2 comments
Closed

Support string templates #303

cushon opened this issue Jan 28, 2024 · 2 comments

Comments

@cushon
Copy link
Collaborator

cushon commented Jan 28, 2024

See https://openjdk.org/jeps/430

String templates aren't compile-time constants, so they don't affect ABI. The fix should be to handle them during lexing and parsing so we can cleanly skip over the value of the template.

class T {
  void f(String name) {
    return STR."My name is \{name}";
  }
}
$ java -cp turbine-HEAD-SNAPSHOT-all-deps.jar com.google.turbine.main.Main --sources T.java --output /tmp/o.jar
...
T.java:3: error: unexpected input: {
    return STR."My name is \{name}";
                            ^
@vorburger
Copy link
Member

@cushon are you (going to be) actively working on this? Or would you possibly welcome a contribution with a fix?

copybara-service bot pushed a commit that referenced this issue Jan 29, 2024
#303

PiperOrigin-RevId: 602189523
copybara-service bot pushed a commit that referenced this issue Jan 29, 2024
#303

PiperOrigin-RevId: 602189523
copybara-service bot pushed a commit that referenced this issue Jan 29, 2024
#303

PiperOrigin-RevId: 602189523
copybara-service bot pushed a commit that referenced this issue Jan 29, 2024
#303

PiperOrigin-RevId: 602458900
@vorburger
Copy link
Member

@cushon close this? (Next step is bazelbuild/bazel#21128.)

@cushon cushon closed this as completed Jan 30, 2024
copybara-service bot pushed a commit that referenced this issue May 16, 2024
Rollback of 2b0a592. I kept some changes to `IntegrationTestSupport` and `LowerIntegrationTest` related to testing preview features, which may be needed again in the future.

See https://bugs.openjdk.org/browse/JDK-8329949

#303

PiperOrigin-RevId: 633967314
copybara-service bot pushed a commit that referenced this issue May 16, 2024
Rollback of 2b0a592. I kept some changes to `IntegrationTestSupport` and `LowerIntegrationTest` related to testing preview features, which may be needed again in the future.

See https://bugs.openjdk.org/browse/JDK-8329949

#303

PiperOrigin-RevId: 634284408
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants