rewrite-clj

borkdude 2022-07-09T15:39:01.712599Z

@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 ...

2022-07-11T15:09:19.935109Z

@borkdude 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.

borkdude 2022-07-11T15:10:10.695819Z

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

borkdude 2022-07-11T15:10:33.214769Z

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
borkdude 2022-07-11T15:10:42.165679Z

At least we have a workaround

borkdude 2022-07-09T15:39:46.726889Z

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

borkdude 2022-07-09T15:41:26.795489Z

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

borkdude 2022-07-09T15:45:48.297779Z

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

borkdude 2022-07-09T15:46:30.131339Z

or maybe document that one should do it like that

lread 2022-07-09T21:39:12.634319Z

Oh boy, somebody is bad with typos!

lread 2022-07-09T21:44:22.650779Z

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.

lread 2022-07-09T21:44:52.394799Z

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

borkdude 2022-07-09T21:51:21.947379Z

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

lread 2022-07-09T21:54:57.558539Z

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

borkdude 2022-07-09T21:55:32.232109Z

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

borkdude 2022-07-09T21:55:36.639969Z

💤

lread 2022-07-09T21:56:03.713449Z

Ya, think so! Have a good zzzz!

lread 2022-07-09T22:23:33.544389Z

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

🙏 1
lread 2022-07-09T22:24:38.815749Z

Also: typos fixed on master.

🙏 1