New code for some memory elements in new patch

Not sure what else has changed so far but this is what I found that was breaking part of my scripts.

Security status changed from
<hint='Security status'>0.5</hint>
to
<hint=\"Security status\"><color=#ffffff00>0.5</color></hint>

This is used to default to a choice on shouldHideWhenNeutralInLocal bool when not specified.

I’ll see if I can temp fix it on my end.

1 Like

This is the now invalid parseuserinterface way of extracting security status.

<hint='Security status'>0.5</hint>

                getSecurityStatusPercentFromUINodeText =
                    getSubstringBetweenXmlTagsAfterMarker "hint='Security status'"
                        >> Maybe.andThen (String.trim >> String.toFloat)
                        >> Maybe.map ((*) 100 >> round)

Using "hint=\"Security status\"><color=" seems to fix it.

<hint=\"Security status\"><color=#ffffff00>0.5</color></hint>

                getSecurityStatusPercentFromUINodeText =
                    getSubstringBetweenXmlTagsAfterMarker "hint=\"Security status\"><color="
                        >> Maybe.andThen (String.trim >> String.toFloat)
                        >> Maybe.map ((*) 100 >> round)
1 Like

Thanks for sharing!
I integrated it in the Sanderling repository here:

Some details on the development process

As can be seen in the diff view of the linked commit, it also adds a test case for the scenario from the first post. When testing a function that should work on such small input values, it is convenient to use this unit testing framework.
By running these automated tests, we get fast feedback on our parsing implementation. Using this testing method, we get test results less than 5 seconds after changing the parsing code.
For example, if applied only the testing part of the linked commit, those tests would fail with an output like this:

elm-test-rs 0.6.1
-----------------

Total time spent in the elm compiler: 0.39237058s

Running 27 tests. To reproduce these results later, run:
elm-test-rs --seed 1480975004 --fuzz 100 (TODO: pass files to reporter)

↓ Parse memory reading
↓ Parse security status from UI node text
✗ <hint="Security status"><color=#ffffff00>0.5</color></hint>

    Nothing
    ╷
    │ Expect.equal
    ╵
    Just 50

TEST RUN FAILED

Duration: 56 ms
Passed:   26
Failed:   1
Running duration (since Node.js start): 265 ms

Using these tests allows fast testing of any new parsing code.