nyoom.nvim icon indicating copy to clipboard operation
nyoom.nvim copied to clipboard

Avoid hard links in install_nyoom()

Open harry-xm opened this issue 2 years ago • 2 comments

nyoom upgrade fails because of unstaged changes, and git pull --autostash rewrites stashed files which broke the hard links.

https://github.com/nyoom-engineering/nyoom.nvim/blob/e331b56070031fdf6cbf57fd3cf44e7ad8ab4334/bin/nyoom#L23-L25

harry-xm avatar Jan 18 '23 01:01 harry-xm

This something I've wanted to do for a while but its requires a few other changes

The ideal solution would be to just add ~/.config/nyoom to runtime path, which we do now, then copy over the config/modules/packages files and remove them from git altogether. That works for config.fnl and packages.fnl since both of those files are just require'd normally and handled at runtime

The issue is modules.fnl is inline required because needs to include each of the init.fnl modules for each package. The issue is include doesn't work with relative paths like require does (~/.config/nyoom isn't in its path) and so its pretty buggy

The ideal solution would be to replace nyoom's package manager (which I'll do, soon) with something like pact or lazy, then handle package management at runtime instead of compile time. That gets rid of the include statements, and as a nice byproduct cleans up a lot of the complexity in both nyoom sync and the nyoom! macro, while also giving us more control over how packages are handled.

shaunsingh avatar Jan 18 '23 21:01 shaunsingh

I think the hard links are doing more harm than good. Perhaps we should remove it before a full revamp of the package manager?

harry-xm avatar Mar 25 '23 08:03 harry-xm