Currently the encoding of graphs looks something like
tg.graph({
"nodes": [
{
"kind": "file",
"contents": tg.blob("foo.txt"),
"dependencies": {
"bar.txt": {
"index": 1,
"kind": "file"
},
}
},
{
"kind": "file",
"contents": tg.blob("bar.txt"),
"dependencies": {
"foo.txt": {
"index": 0,
"kind": "file"
},
}
},
]
})
It is desirable to make this more compact for internal graph pointers where the kind field can be deduced from the rest of the node data, to encode this simply as
tg.graph({
"nodes": [
{
"kind": "file",
"contents": tg.blob("foo.txt"),
"dependencies": {
"bar.txt": 1
}
},
{
"kind": "file",
"contents": tg.blob("bar.txt"),
"dependencies": {
"foo.txt": 0
}
},
]
})
Currently the encoding of graphs looks something like
It is desirable to make this more compact for internal graph pointers where the
kindfield can be deduced from the rest of the node data, to encode this simply as