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

String interpolation new #729

Merged
merged 9 commits into from
Feb 3, 2021
Merged

String interpolation new #729

merged 9 commits into from
Feb 3, 2021

Conversation

Licenser
Copy link
Member

@Licenser Licenser commented Jan 29, 2021

Pull request

Description

This implements the RFC for string interpolation

Related

Checklist

  • The RFC, if required, has been submitted and approved
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • Update CHANGELOG.md appropriately, recording any changes, bug fixes or other observable changes in behavior

@Licenser Licenser marked this pull request as ready for review February 2, 2021 17:20
@Licenser Licenser force-pushed the string-interpolation-new branch from 133394b to 77ae3a0 Compare February 2, 2021 17:31
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
@Licenser Licenser force-pushed the string-interpolation-new branch from 7f2f835 to b9a481b Compare February 2, 2021 18:12
@mfelsche
Copy link
Member

mfelsche commented Feb 2, 2021

Question that comes to mind is: What error will a string like "#{}" give?

mfelsche
mfelsche previously approved these changes Feb 2, 2021
Copy link
Member

@mfelsche mfelsche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test error messages look good, so just one issue with me understanding the logic at one point. Otherwise LGTM!

@Licenser
Copy link
Member Author

Licenser commented Feb 2, 2021

Question that comes to mind is: What error will a string like "#{}" give?

Good question :D and great catch I didn't think about that, will add a test tomorrow!

@coveralls
Copy link
Collaborator

coveralls commented Feb 3, 2021

Coverage Status

Coverage increased (+0.4%) to 81.35% when pulling 9982263 on string-interpolation-new into 5f142d7 on main.

Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
@Licenser Licenser force-pushed the string-interpolation-new branch from b5e363e to 7a59a06 Compare February 3, 2021 10:50
@Licenser Licenser requested a review from mfelsche February 3, 2021 12:17
@Licenser
Copy link
Member Author

Licenser commented Feb 3, 2021

I added a new (nicer) error for the "#{}" case 👍 good catch @mfelsche !

Signed-off-by: Heinz N. Gies <heinz@licenser.net>
@Licenser Licenser force-pushed the string-interpolation-new branch from 57be38d to 9982263 Compare February 3, 2021 12:31
@@ -0,0 +1,4 @@
Error:
1 | "#{}"
| ^^^ You have an interpolation without content.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😻

Error:
4 | end;
5 |
6 | boom(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥

@Licenser Licenser merged commit 12a5d07 into main Feb 3, 2021
@Licenser Licenser deleted the string-interpolation-new branch February 3, 2021 14:02
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

Successfully merging this pull request may close these issues.

Issues with 0.9 and earlier string interpolation
3 participants