kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
606 stars 39 forks source link

DrawerUI is broken on windows #93

Closed JustBarnt closed 2 months ago

JustBarnt commented 4 months ago

The creation for the DrawerUI is broken. Creation of the node id is done by using os.clock() which on Windows returns the same exact timestamp of nvim formatted like X.xxx where as on unix it returns X.xxxxxxx on windows the timestamps are the exact same as Unix

Edit: Update. Did some research appears that both are accurate but clock works differently based on what OS you are using. So using os.clock() to try to create a unqiue id for those nui nodes it not a good idea.

kndndrj commented 2 months ago

hey @JustBarnt, I'm sorry to say that, but everything is broken on Windows 😅

The support is still planned, but I don't know when I'll have enough time.

JustBarnt commented 2 months ago

Well the DrawUI was the only thing I noticed and after my PR the only other issue I seemed to have was it not being able to find my saved notes after I ended a session

kndndrj commented 2 months ago

Oh, really? That's surprising. I thought a bunch of stuff would break because there are more than a few hardcoded unix-style paths.

JustBarnt commented 2 months ago

I mean at least for me. Once I forked and fixed the fixing of the GUID instead of using os.clock it worked for what I was using except for my notes being remembered.

If you'd be interested you could let me know where some of those Unix hardcoded areas are and I could look into making the windows and Unix friendly!

kndndrj commented 2 months ago

Cool! The related PR has been merged and all uses of os.clock have been changed to utils.random_string, so this should be sufficient.

If it still doesn't work for some reason, feel free to reopen this issue or create a new one.

Thanks!