You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON serialization/parsing works fine for line coverage, however for branch coverage the structure we have is that of an array that is the key pointing to values. Sadly, that breaks when dumping and parsing from JSON:
Which needs to be solved via either regexp based parsing or evaling strings (currently on my branch) which is medium fine as we read our own output but doesn't sound quite great.
This particula scenario does work when using YAML though:
However, YAML support was removed way back in 0.5.0. I haven't been around then so I don't know about the errors caused there and if that's still relevant.
Right now there is a third problem, namely we parse symbolizing keys which creates tons of symbols just to transform them to strings again for evaling/parsing.
Anyhow, it's a problem. Possible solutions with different levels of "solving it":
stop symbolizing keys (minimum requirement)
evaluate storing YAML again instead of JSON
store a format that is further away from the original coverage data but that is easier to parse again
For reference, we stopped symbolizing all keys. I'm unsure what to do regarding YAML vs JSON and the tip to store them as arrays instead of evaling them.
I guess/think that all of the storage/noramlization is up for some work as way too many parts just do JSON.parse(JSON.dump(thing)) which is overhead we should be able to reduce through some normalization.
(Albeit in the end it could end up as being slower with smaller normalization as JSON might be C-backed while our normlaization won't be ;) )
JSON serialization/parsing works fine for line coverage, however for branch coverage the structure we have is that of an array that is the key pointing to values. Sadly, that breaks when dumping and parsing from JSON:
Which needs to be solved via either regexp based parsing or evaling strings (currently on my branch) which is medium fine as we read our own output but doesn't sound quite great.
This particula scenario does work when using YAML though:
However, YAML support was removed way back in 0.5.0. I haven't been around then so I don't know about the errors caused there and if that's still relevant.
Right now there is a third problem, namely we parse symbolizing keys which creates tons of symbols just to transform them to strings again for evaling/parsing.
Anyhow, it's a problem. Possible solutions with different levels of "solving it":
@colszowka input especially on the YAML thing rather welcome :)
#781
The text was updated successfully, but these errors were encountered: