Fork me on GitHub
#rewrite-clj
<
2022-07-09
>
borkdude15:07:01

@lee I'm trying to fix the problem that @delaguardo mentioned above, but I see that :track-position has several spellings in this doc: https://github.com/clj-commons/rewrite-clj/blob/main/doc/01-user-guide.adoc#position-tracking :track-position ... :track-position? ... :track-positon ...

rfhayashi15:07:19

@U04V15CAJ Just in case you might not remember, I tried to fix that in https://github.com/borkdude/rewrite-edn/pull/11 but failed. Hope you can find a fix.

borkdude15:07:10

@U0HLDF4PL Yeah, I remember, thanks for bringing that up again. This time I tried to go a little deeper and discovered more issues with that...

borkdude15:07:33

So I'll have to go another round at this and yet go deeper... but luckily @lee offered to look at this as well.

👍 1
👋 1
borkdude15:07:42

At least we have a workaround

borkdude15:07:46

none of them work for me in my case, but this is probably a different problem :)

borkdude15:07:26

Is my assumption wrong that when I insert new nodes with track-position true, that those nodes will have an updated position as well?

borkdude15:07:48

I think I'll just work around this stuff by transforming to string and re-reading

borkdude15:07:30

or maybe document that one should do it like that

lread21:07:12

Oh boy, somebody is bad with typos!

lread21:07:22

Yeah, that's the idea a zipper with :track-position? enabled should mean a zipper that can return a position (and position-span if you are interested in that) that is correct after updates.

lread21:07:52

Thanks for noting the typos... I'll fix 'em soon.

borkdude21:07:21

@lee I'll look into position later, somehow the metadata was still nil for newly inserted nodes, but maybe that's expected

lread21:07:57

yeah... I'll have to refresh my memory.... metadata on node might not be updated for the position tracking zipper...

borkdude21:07:32

then there might still be hope, if I use position instead of meta

lread21:07:03

Ya, think so! Have a good zzzz!

lread22:07:33

Ya, position tracking zipper tracks location in zipper, not in nodes.

🙏 1
lread22:07:38

Also: typos fixed on master.

🙏 1