Why did bonsai 0.15.1 -> bonsai 0.16.0 drop `[%here]`?

Bonsai 0.15.1 uses [%here] quite a bit, which in my limited understanding is basically like LINE and FILE in C, i.e. useful for debugging to point to source location.

Bonsai 0.16.0 seems to have completely dropped usage of this.

Any intuition what is going on? [context: porting a bunch of bonsai 0.15.1 code to bonsai 0.16.0]

1 Like

Hello! Good question!

It is safe to remove [%here] when migrating from 0.15 to 0.16.

You are correct that the location’s intent is debugging information, but came at the cost of needing clients to provide it as a parameter in almost all bonsai functions. In 0.16, let%sub provides the source code location to bonsai, without needing clients to do it.

On a meta note: I think bonsai should be louder on API changes; there’ll also be more API changes in 0.17, so I think we should have a “here are all the API changes and here’s how to migrate your app” markdown on github.

Thanks for bringing this up + also happy to answer any follow up questions you may have!

3 Likes