question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validation error when referencing existing variables such as defined strings in set<string>

See original GitHub issue

I get validation errors when referencing defined strings such as in a set<string>. For example if I had a Example.thrift file

const string MIME_TYPE_GIF = "image/gif";
const string MIME_TYPE_JPEG = "image/jpeg";

const set<string> MIME_TYPES = [
  MIME_TYPE_GIF,
  MIME_TYPE_JPEG
];

I would get the error

Validation Error:

Message: Expected type string but found type MIME_TYPE_GIF

5 |   MIME_TYPE_GIF,

However setting actual strings in the set<string> works fine.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kevin-greene-ckcommented, Feb 27, 2019

@hayes Yeah, I’ve got a fix working for this and will have it up in the next day or two. Thanks.

1reaction
kevin-greene-ckcommented, Feb 13, 2019

A fix for this is coming. A little backed up, looking at a week or two before it makes a release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java String Limit - Stack Overflow
I am new to java (previously only worked with sql) and I am attempting to set a length limit for my string variable....
Read more >
Handling text — strings in JavaScript - Learn web development
If your program is raising such errors, then go back and check all your strings to make sure you have no missing quote...
Read more >
Type Constraints - Configuration Language | Terraform
Learn how to use type constraints to validate user inputs to modules and resources. ... a collection of values where each is identified...
Read more >
Object variable or With block variable not set - Visual Basic
An invalid object variable is being referenced. This error can occur for several reasons: A variable was declared without specifying a type.
Read more >
A tour of the Dart language
Dart supports top-level functions (such as main() ), as well as functions tied ... The variable called name contains a reference to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found