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

zimfw does not allow to install github's modules #224

Open
bertuz opened this issue Sep 13, 2022 · 5 comments
Open

zimfw does not allow to install github's modules #224

bertuz opened this issue Sep 13, 2022 · 5 comments

Comments

@bertuz
Copy link

bertuz commented Sep 13, 2022

I use my own zim theme forked by ZIM's oblong, and in order to use it I used to add it to my modules and execute zimfw uninstall && zimfw install.

This used to work before installing dotly. Now, adding a github module the way is documented here does not work:

cat zimrc:

[...]
zmodule https://github.com/bertuz/oblong.git -n oblong
mbertamini@MacTeo ~ % zimfw uninstall && zimfw install
x /Users/mbertamini/.zimrc:8:oblong: /Users/mbertamini/.dotfiles/shell/zsh/.zim/modules/oblong not found
Failed to source /Users/mbertamini/.zimrc

I don't know if it's because the zim version dotly adopts, I've been using way too little time dotly to dig further more into this right now 😅. is it maybe because the way the submodules are set?

the workaround is copying the module myself, but I'd loose the chance of upgrading the module automatically

@gtrabanco
Copy link
Contributor

Yes, Not sure but maybe your dotfiles are older to the PR #192

Currently zimfw is installed in its own folder instead of use it as submodule. Try by uninstalling zimfw submodule, upgrade dotly and execute dot self install.

Uninstall submodule

submodule="modules/zimfw"
cd "$DOTFILES_PATH"
git submodule deinit -f -- "$submodule"
git rm -f "$submodule"
git commit -m "Removed submodule '$submodule'"
rm -rf ".git/modules/${submodule}"
echo "Submodule '${submodule}' uninstalled"

Upgrade Dotly

Make sure you commit a changes to a new branch if you have changes of your Dotly.

cd "$DOTLY_PATH"
git push --set-upstream origin main
git reset --hard HEAD
git fetch -ap
git pull main

Now it is time to execute:

dot self install

@bertuz
Copy link
Author

bertuz commented Sep 16, 2022

mmh 🤔 I think I didn't have it install as a submodule, but after dot-self install, I got it back working! Now zim installs it by cloning it, good!
But... I bumped into another similar issue: now when I run zimfw uninstall && zimfw install, zim installs .zim/modules/zsh-autosuggestions. so far so good. The problem is that it looks as a submodule that dotly doesn't handle good:

◼ .dotfiles / $ git status                                                                                                                               130
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
	modified:   shell/zsh/.zim/modules/zsh-autosuggestions (untracked content)

I don't know if I should git-ignore it or I should add it as a submodule and embrace it 🤔

◼ .dotfiles / $ git submodule                                                                                                                                              
 76ad4498c37ef61cddd59ec641936142c8de9df5 modules/dotly (v0.1-207-g76ad449)
fatal: no submodule mapping found in .gitmodules for path 'shell/zsh/.zim/modules/completion'

@gtrabanco
Copy link
Contributor

@rgomezcasas I solved this on my fork by installing zimfw with a recipe which is called in dot self install by modifying package library to enable installations from scripts package::install and registry::install (I add the libraries link at the bottom) and I install zim in its own folder as suggested with #192 (see the recipe here). Are you open to modify Dotly to handle packages in the same way as my fork?

Offtopic: With these libraries I also modify how update, dump and import works to be also in the "package manager" library.

@gtrabanco
Copy link
Contributor

mmh 🤔 I think I didn't have it install as a submodule, but after dot-self install, I got it back working! Now zim installs it by cloning it, good! But... I bumped into another similar issue: now when I run zimfw uninstall && zimfw install, zim installs .zim/modules/zsh-autosuggestions. so far so good. The problem is that it looks as a submodule that dotly doesn't handle good:

◼ .dotfiles / $ git status                                                                                                                               130
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
	modified:   shell/zsh/.zim/modules/zsh-autosuggestions (untracked content)

I don't know if I should git-ignore it or I should add it as a submodule and embrace it 🤔

◼ .dotfiles / $ git submodule                                                                                                                                              
 76ad4498c37ef61cddd59ec641936142c8de9df5 modules/dotly (v0.1-207-g76ad449)
fatal: no submodule mapping found in .gitmodules for path 'shell/zsh/.zim/modules/completion'

Add to .gitignore shell/zsh/.zim. Maybe this folder should be on a default .gitignore in the dotfiles_template

@bertuz
Copy link
Author

bertuz commented Sep 17, 2022

and I install zim in its own folder as suggested with #192

key-important making any zim module we install with zimfw compatible with dotly, otherwise we fill the repo with unwanted submodules to cope with each time we commit-push our dotfiles! Makes sense, thanks

@rgomezcasas I'd say this is a feature everybody needs 😉

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