Shopify/seafoam

"Guard not" is always shown, even if the guard is not negated

Closed this issue · 2 comments

For instance on this picture it should be Guard, else TranferToInterpreter, I verified with props that it's "negated": false,:
Screenshot from 2020-07-23 11-04-24

We can see the problem in fib-ruby.bgv:

% bundle exec bin/seafoam examples/fib-ruby.bgv:9:1248 props | grep negated
  "negated": true,
    "name_template": "FixedGuard(!={p#negated}) {p#reason/s}",
% bundle exec bin/seafoam examples/fib-ruby.bgv:9:2621 props | grep negated
  "negated": false,
    "name_template": "FixedGuard(!={p#negated}) {p#reason/s}",

Screenshot 2020-07-27 at 14 01 04

It looks like we're confusing a symbol and string property. The idea of using both was that we could use strings for properties that appear actually in the original graph, and symbols for synthetic properties we use to annotate the graph, but maybe that's confusing.

But to fix - we need to look for the string not the symbol, and we can use this graph as a test.

Fixed by #7.