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

"source" comment in generated code can produce files that don't compile #204

Open
orischwartz opened this issue Mar 24, 2020 · 0 comments
Open

Comments

@orischwartz
Copy link
Contributor

orischwartz commented Mar 24, 2020

This line

can lead to files that don't compile on windows because they'll have an illegal unicode escape.

For example, if you have a file called utils.soy and run SoyParseInfoGenerator on it, it generates code like this:

// This file was automatically generated by the Soy compiler. 
// Please don't edit this file by hand.
// source: C:\XXXXX\src\main\resources\soy\utils.soy
package xxx;

You can put a unicode escape anywhere in a java file, including comments. So trying to compile the above leads to:

UtilsSoyInfo.java:3: error: illegal unicode escape
// source: C:\XXXXX\src\main\resources\soy\utils.soy
                                            ^

1 error

Introduced via b0b39f9

This would affect any soy file with a path segment that starts with a u on Windows.

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

1 participant