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.

ListOf with empty separator causes a crash

See original GitHub issue

This is not important but anyway. ListOf<elem, ""> causes a crash. Be careful when trying this with local storage in online 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
alexwarthcommented, Dec 18, 2017

Fixed!

0reactions
pdubroycommented, Nov 3, 2017

Yes, sorry, should have been more clear. I know that we already have the static check as discussed above. I was suggesting an additional runtime check to catch things that the static check can’t.

IMO we should leave the static check in there, because it’s nice to detect mistakes early, but we should also implement a dynamic check that (say) throws an “bad kleene-* exception” when the expression under a Kleene-* succeeds w/o consuming any input. The message for this exception would explain that there is a problem in the grammar. What do you think?

(The place where I’d add this dynamic check is pexprs.Iter.prototype.eval, when this.minNumMatches === 0.)

Yep, that sounds great. I wondered if it might be that easy, but I worried that there was something I was overlooking.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Separate outputs empty separator error for each row ... - GitHub
The minimum fix for this issue would be to simply put the error message once and don't go into every single row, which...
Read more >
str.split(' ') giving me "ValueError: empty separator" for a ...
The original error was due to the empty seperator '', which I forgot to put a blank in it. After you modified the...
Read more >
ValueError: empty separator in Python | bobbyhadz
The Python "ValueError: empty separator" occurs when we pass an empty string to the str.split() method. To solve the error, use the list()...
Read more >
str.split(): allow removing empty strings (when sep is not None)
If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.
Read more >
Bug 1580262 - startup crash in [@ nsImapUrl - Bugzilla@Mozilla
Just realised something as I was writing this: nsImapIncomingServer::PossibleImapMailbox() only ever calls nsImapUrl::UnescapeSlashes() if the IMAP separator is ...
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