Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid hard links in install_nyoom() #112

Open
harry-xm opened this issue Jan 18, 2023 · 2 comments
Open

Avoid hard links in install_nyoom() #112

harry-xm opened this issue Jan 18, 2023 · 2 comments

Comments

@harry-xm
Copy link

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

nyoom.nvim/bin/nyoom

Lines 23 to 25 in e331b56

[ ! -f "${NYOOM_CONFIG}/config.fnl" ] && ln "${CONFIG_PATH}/fnl/config.fnl" "${NYOOM_CONFIG}/config.fnl"
[ ! -f "${NYOOM_CONFIG}/modules.fnl" ] && ln "${CONFIG_PATH}/fnl/modules.fnl" "${NYOOM_CONFIG}/modules.fnl"
[ ! -f "${NYOOM_CONFIG}/packages.fnl" ] && ln "${CONFIG_PATH}/fnl/packages.fnl" "${NYOOM_CONFIG}/packages.fnl"

@shaunsingh
Copy link
Collaborator

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.

@harry-xm
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants