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

bug: changing plugin author name doesn't re-pull the repo #331

Closed
3 tasks done
Avishayy opened this issue Jan 6, 2023 · 3 comments · Fixed by #350
Closed
3 tasks done

bug: changing plugin author name doesn't re-pull the repo #331

Avishayy opened this issue Jan 6, 2023 · 3 comments · Fixed by #350
Labels
bug Something isn't working

Comments

@Avishayy
Copy link

Avishayy commented Jan 6, 2023

Did you check docs and existing issues?

  • I have read all the lazy.nvim docs
  • I have searched the existing issues of lazy.nvim
  • I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)

v0.8.1 brew@Ventura

Operating system/version

macOS Ventura 13.1

Describe the bug

I was forking a plugin to add a feature. Rather than adding the dev config I was lazy so I changed the author name in the plugin file and tried to update, but to no avail.

From this:

-- lua/plugins/treesiter.lua
return {
  {
    "nvim-treesitter/nvim-treesitter-context",
    event = "BufReadPre",
    config = true,
  },
 -- ...
}

to this:

-- lua/plugins/treesiter.lua
return {
  {
    -- can also set any giberrish author name, it doesn't matter
    "avishayy/nvim-treesitter-context",
    event = "BufReadPre",
    config = true,
  },
 -- ...
}

Lazy won't pick up on the fact that the plugin is now changed (update / build do nothing different, they use the cached repo). I worked around it by deleting the plugin lines, deleting the plugin with Lazy and then adding the lines with the new author.

Steps To Reproduce

  1. Change author in repo path to anything you'd like
  2. Try to update
  3. Nothing changes

Expected Behavior

Actual update, if new author has repo, pull and build it. If new author doesn't exist, an error as usual.

Repro

I don't know how to provide a repro for the manual renaming part, sorry. (But I did provide the relevant code bits in the description)
@Avishayy Avishayy added the bug Something isn't working label Jan 6, 2023
@Avishayy Avishayy changed the title bug: changing plugin author name bug: changing plugin author name doesn't re-pull the repo Jan 6, 2023
@folke
Copy link
Owner

folke commented Jan 6, 2023

That is correct. A plugin dir is not based on the author name. You can remove the plugin and re-install it from the ui with <x> and <i>`. I won't add any special handling for this.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
@folke folke reopened this Jan 8, 2023
@folke
Copy link
Owner

folke commented Jan 8, 2023

I've now added functionality that detects origin changes and will fix it during an update.

@Avishayy
Copy link
Author

Avishayy commented Jan 8, 2023

Cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants