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

.../vim-plugins/update.py sometimes changes hash and nothing else #157609

Closed
malob opened this issue Jan 31, 2022 · 7 comments
Closed

.../vim-plugins/update.py sometimes changes hash and nothing else #157609

malob opened this issue Jan 31, 2022 · 7 comments
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: vim

Comments

@malob
Copy link
Member

malob commented Jan 31, 2022

Describe the bug

Today when I ran update.py as part of #157581 and #157604, the sha256 hash for vim-colorschemes was changed, but there was no update to the rev and version (which makes sense since the current rev in generated.nix is up to date).

Steps To Reproduce

Steps to reproduce the behavior:

  1. In the nixpkgs repo run GITHUB_API_TOKEN=[token] ./pkgs/misc/vim-plugins/update.py --no-commit
  2. Run git diff and observe that the sha256 hash for vim-colorschemes was changed.
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index 09fe8819a5d..de95c8d969a 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -7680,7 +7680,7 @@ final: prev:
       owner = "flazz";
       repo = "vim-colorschemes";
       rev = "fd8f122cef604330c96a6a6e434682dbdfb878c9";
-      sha256 = "1cg8q7w0vgl73aw1b9zz0zh5vw5d2pm8pm54fhfzva4azg56f416";
+      sha256 = "0kpsf6j20fgblc8vhqn7ymr52v2d1h52vc7rbxmxfwdm80nvv3g5";
     };
     meta.homepage = "https://github.com/flazz/vim-colorschemes/";
   };

Expected behavior

The hash should not change if the source has not changed.

Notify maintainers

@jonringer @softinio @teto @Flakebi

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

nix run nixpkgs#nix-info -- -m
 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.3.0, macOS 12.2`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.5.1`
 - channels(root): `"nixpkgs-21.11pre326821.509d236edf0"`
 - nixpkgs: `/Users/malo/.config/nixpkgs/nixpkgs.nix`
@malob
Copy link
Member Author

malob commented Jan 31, 2022

Perhaps this should be closed in favor of #151350 (which I just found) or vice-versa.

@teto
Copy link
Member

teto commented Jan 31, 2022

does it produce the same hash if you launch it several times ? try removing the cache in ~/.cache/vim-plugin-cache.json

@zowoq
Copy link
Contributor

zowoq commented Feb 1, 2022

Probably this as the script is running on darwin:

❯ git clone https://github.com/flazz/vim-colorschemes.git
Cloning into 'vim-colorschemes'...
remote: Enumerating objects: 1828, done.
remote: Total 1828 (delta 0), reused 0 (delta 0), pack-reused 1828
Receiving objects: 100% (1828/1828), 1.93 MiB | 5.79 MiB/s, done.
Resolving deltas: 100% (615/615), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'colors/darkBlue.vim'
  'colors/darkblue.vim'

Nix does hack around so it can be cached it but that doesn't help here as the script is regenerated the hash from the upstream repo.

Current hash on linux:

❯ fd darkblue $(nix-build -A vimPlugins.vim-colorschemes.src)
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkBlue.vim
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkblue.vim
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkblue2.vim

Current hash on darwin:

❯ fd darkblue $(nix-build -A vimPlugins.vim-colorschemes.src)
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkBlue.vim
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkblue.vim~nix~case~hack~1
/nix/store/2r0hrjgnhb8nyf5zh0gn8xwyqxazrg9f-source/colors/darkblue2.vim

Updated hash on darwin:

❯ fd darkblue $(nix-build -A vimPlugins.vim-colorschemes.src)
/nix/store/5h2x6n1y8h11y4gsa51lx1ri5sns2xpr-source/colors/darkblue.vim
/nix/store/5h2x6n1y8h11y4gsa51lx1ri5sns2xpr-source/colors/darkblue2.vim

@malob
Copy link
Member Author

malob commented Feb 1, 2022

@teto, running it several times in a row always produces the diff above (i.e., the hash doesn't bounce back and forth between the two).

env GITHUB_API_TOKEN=[token] ./pkgs/misc/vim-plugins/update.py --no-commit
977 plugins were checked
updated /Users/malo/Code/nixpkgs/pkgs/misc/vim-plugins/generated.nixgit diff | cat
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index 09fe8819a5d..de95c8d969a 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -7680,7 +7680,7 @@ final: prev:
       owner = "flazz";
       repo = "vim-colorschemes";
       rev = "fd8f122cef604330c96a6a6e434682dbdfb878c9";
-      sha256 = "1cg8q7w0vgl73aw1b9zz0zh5vw5d2pm8pm54fhfzva4azg56f416";
+      sha256 = "0kpsf6j20fgblc8vhqn7ymr52v2d1h52vc7rbxmxfwdm80nvv3g5";
     };
     meta.homepage = "https://github.com/flazz/vim-colorschemes/";
   };env GITHUB_API_TOKEN=[token] ./pkgs/misc/vim-plugins/update.py --no-commit
warning: Git tree '/Users/malo/.config/nixpkgs' is dirty
977 plugins were checked
updated /Users/malo/Code/nixpkgs/pkgs/misc/vim-plugins/generated.nixgit diff | cat
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index 09fe8819a5d..de95c8d969a 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -7680,7 +7680,7 @@ final: prev:
       owner = "flazz";
       repo = "vim-colorschemes";
       rev = "fd8f122cef604330c96a6a6e434682dbdfb878c9";
-      sha256 = "1cg8q7w0vgl73aw1b9zz0zh5vw5d2pm8pm54fhfzva4azg56f416";
+      sha256 = "0kpsf6j20fgblc8vhqn7ymr52v2d1h52vc7rbxmxfwdm80nvv3g5";
     };
     meta.homepage = "https://github.com/flazz/vim-colorschemes/";
   };

Removing ~/.cache/vim-plugin-cache.json doesn't seem to make a difference.

rm ~/.cache/vim-plugin-cache.json git rhard
HEAD is now at 5f586a1db04 vimPlugins.galaxyline-nvim: Switch to actively developed forkenv GITHUB_API_TOKEN=[token] ./pkgs/misc/vim-plugins/update.py --no-commit
[...]
977 plugins were checked
updated /Users/malo/Code/nixpkgs/pkgs/misc/vim-plugins/generated.nixgit diff | cat
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index 09fe8819a5d..de95c8d969a 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -7680,7 +7680,7 @@ final: prev:
       owner = "flazz";
       repo = "vim-colorschemes";
       rev = "fd8f122cef604330c96a6a6e434682dbdfb878c9";
-      sha256 = "1cg8q7w0vgl73aw1b9zz0zh5vw5d2pm8pm54fhfzva4azg56f416";
+      sha256 = "0kpsf6j20fgblc8vhqn7ymr52v2d1h52vc7rbxmxfwdm80nvv3g5";
     };
     meta.homepage = "https://github.com/flazz/vim-colorschemes/";
   };

@malob
Copy link
Member Author

malob commented Feb 1, 2022

@zowoq, that seems to be it!

There's an issue on the upstream repo (flazz/vim-colorschemes#186) as well as a PR to fix the issue (flazz/vim-colorschemes#181).

Unfortunately the owner of the repo hasn't been active for over a year, so waiting for the PR to land probably isn't a viable solution :(

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 31, 2022
@teto
Copy link
Member

teto commented Aug 22, 2022

can we close ?

@malob
Copy link
Member Author

malob commented Aug 22, 2022

Yup!

@malob malob closed this as completed Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: vim
Projects
None yet
Development

No branches or pull requests

3 participants