thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Horia Coman <horia...@gmail.com>
Subject Re: Dart issue with $ in string constants
Date Sat, 19 Mar 2016 12:27:45 GMT
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 <jensgeyer@hotmail.com> 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: user@thrift.apache.org
> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message