Heisenbug: The true story of undefined behavior, Part 2

CommentNode’s position problem

In the previous part, we’ve discussed the problem that was presented in RedBaron. Today I want to show you my old work, my old little investigation about another strange bug(or feature?) in Baron.
Baron is a part of RedBaron library, literally, RedBaron relies on Baron Full Syntax Tree which it’s giving for next manipulations.
Baron had a problem with CommentNode’s position in the FST tree.
This bug broke RedBaron’s nodes recognition.

Below I’ll tell you a story about it and start from examples.
Let’s roll sleeves up and get down to business.

Continue reading “Heisenbug: The true story of undefined behavior, Part 2”

Heisenbug: The true story of undefined behavior, Part 2

Heisenbug: the true story of undefined behavior, part 1

One day I was developing a program to work with a python source code. A kind of analyzer for the static code analysis. I found a library Redbaron and wanted conduct some research to understand its capabilities.No so fast cowboy I wrote a lot of python code in Pycharm created by the JetBrains. After my tests via pytest I’ve got the first bug. I’ve got the same problem like in #119 (Really, Is it a problem of IDE by the JetBrains?).

After debugging, I found some solutions, patches, and hacks.

Next, I’m telling you, dear reader, a story about a difference between hacks, patches, and solutions.

And Yeah, It hasn’t been a problem of IDE. Continue reading “Heisenbug: the true story of undefined behavior, part 1”

Heisenbug: the true story of undefined behavior, part 1