question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sort using mutation.parent property

See original GitHub issue

Currently sort_tables doesn’t ensure mutations occur after their parents. It probably should, but this behvaior is documented, so it’s not major.

This is a way that tables can be out of order that sort_tables does not fix, so we should probably address it, although we don’t have a use case that produces tables out of order in this way.

The only way I can think of to do this is to add a field to the mutation struct used for sorting that is “number of hops to the root”, computed by following mutation.parent indices until you hit a -1.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
hyanwongcommented, Dec 4, 2019

Ping @Chris1221 as an issue that could probably be tackled along with https://github.com/tskit-dev/tskit/issues/117 (I would find it useful if this issue were solved)

1reaction
jeromekellehercommented, Jul 10, 2018

Probably not for 0.6.1 I’d say — shall we create a 0.6.2 milestone and add it to that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Notifying parent when particular property of Struct is mutated ...
Any property changes of a struct would cause the struct itself being replaced by a new one (copied from it with the updated...
Read more >
How exactly do you update an array in the cache after a ...
Hi, after executing a query getItems, it returns an array of Items which consist of an _id and title, and this appears in...
Read more >
Virtual field orderBy doesn't sort correctly · Issue #2400 - GitHub
In server land I used to be able to add a new method to a "model class" ... errors: updateErrors } = await...
Read more >
Mutation isn't always bad in JavaScript - DEV Community ‍ ‍
Let's consider the following (bad) use of mutation: ... Finally, we mutate the parent's children property to add the current element to it....
Read more >
Vue Error: Avoid Mutating a Prop Directly - Michael Thiessen
Instead, use a data or computed property based on the prop's value. ... Changing the value in a child component won't change it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found