Could you file a JIRA ticket?
-----Ursprüngliche Nachricht-----
From: Horia Coman
Sent: Saturday, March 19, 2016 1:27 PM
To: [email protected]
Subject: Re: Dart issue with $ in string constants
Hey Jens,
Thanks for getting back to me.
It's straightforward to manifest. Assume one has a working Thrift and a
working Dart installation.
$ echo 'const string example = "hello$"' > example.thrift
$ thrift --gen dart example.thrift
$ dart gen-dart/example/lib/src/example_constants.dart
'example/lib/src/example_constants.dart': error: line 10 pos 40: illegal
character after $ in string interpolation
static final String example = 'hello$';
^
If i modify the string by hand to be a raw string (s/'hello$'/r'/hello$'/)
the problem goes away.
Thanks for helping,
Horia
On Sat, Mar 19, 2016 at 11:55 AM, Jens Geyer <[email protected]> wrote:
Hello Horia,
Does this look like a bug or just something wired I'm doing?
Maybe, since nobody is perfect. But hard to say from the information
given. It's always a good idea to describe the problem with some details
added. In particular, a small reproducible test case would be great, e.g.
a
sample Thrift IDL file and the steps necessary to reproduce the "snag" you
are facing. Could you provide that information here?
Have fun,
JensG
-----Ursprüngliche Nachricht----- From: Horia Coman
Sent: Saturday, March 19, 2016 12:43 PM
To: [email protected]
Subject: Dart issue with $ in string constants
Hello Thrift folks,
I'm using the head version of Thrift for its Dart support.
I've encountered a snag with string constants which contain $.
The Dart generated files contain regular strings with that $. However,
that's a special character in Dart strings, because it's used in string
interpolation. Hence I get an error and a suggestion to switch to raw
strings.
Does this look like a bug or just something wired I'm doing?
Posting here cause that's what the site instructed before going in Jira.
Cheers,
Horia