neil icon indicating copy to clipboard operation
neil copied to clipboard

neil dep upgrade changes git url

Open borkdude opened this issue 1 year ago • 4 comments

neil dep upgrade changes the git url, in the following cases:

{babashka/pods {#_#_:local/root "/Users/borkdude/Dropbox/dev/clojure/babashka/babashka.pods"
                            :git/url "https://github.com/babashka/babashka.pods"
                            :git/sha "47e55fe5e728578ff4dbf7d2a2caf00efea87b1e"}}

the git url is changed to github.com/babashka/pods

cognitect/test-runner
             {:git/url "https://github.com/cognitect-labs/test-runner"
              :git/sha "9d36f36ff541dac680a05010e4348c744333f191"}

the git url is changed to github.com/cognitect/test-runner

Suggestion: never change the git url

cc @teodorlu if you're bored :)

borkdude avatar Jul 30 '24 15:07 borkdude

Happy to take this one!

teodorlu avatar Jul 30 '24 20:07 teodorlu

I may be missing something—in my local testing, neil dep upgrade doesn't seem to change anything for the examples with pods and test-runner.

Any advice?

babashka pods

$ cat deps.edn
{:deps
 {babashka/pods {#_#_:local/root "/Users/borkdude/Dropbox/dev/clojure/babashka/babashka.pods"
                 :git/url "https://github.com/babashka/babashka.pods"
                 :git/sha "47e55fe5e728578ff4dbf7d2a2caf00efea87b1e"}}}
$ neil dep upgrade
$ cat deps.edn 
{:deps
 {babashka/pods {#_#_:local/root "/Users/borkdude/Dropbox/dev/clojure/babashka/babashka.pods"
                 :git/url "https://github.com/babashka/babashka.pods"
                 :git/sha "47e55fe5e728578ff4dbf7d2a2caf00efea87b1e"}}}
$ neil --version
neil 0.3.67
$ brew info neil
==> babashka/brew/neil: stable 0.3.67


Installed
/opt/homebrew/Cellar/neil/0.3.67 (7 files, 85.8KB) *
  Built from source on 2024-08-02 at 20:03:03
From: https://github.com/babashka/homebrew-brew/blob/HEAD/Formula/neil.rb
==> Dependencies
Required: borkdude/brew/babashka ✔
$ neil-dev dep upgrade
$ cat deps.edn 
{:deps
 {babashka/pods {#_#_:local/root "/Users/borkdude/Dropbox/dev/clojure/babashka/babashka.pods"
                 :git/url "https://github.com/babashka/babashka.pods"
                 :git/sha "47e55fe5e728578ff4dbf7d2a2caf00efea87b1e"}}}

cognitect test runner

$ cat deps.edn 
{:deps {cognitect/test-runner
        {:git/url "https://github.com/cognitect-labs/test-runner"
         :git/sha "9d36f36ff541dac680a05010e4348c744333f191"}}}
$ neil dep upgrade          
$ cat deps.edn
{:deps {cognitect/test-runner
        {:git/url "https://github.com/cognitect-labs/test-runner"
         :git/sha "9d36f36ff541dac680a05010e4348c744333f191"}}}
$ neil-dev dep upgrade
$ cat deps.edn        
{:deps {cognitect/test-runner
        {:git/url "https://github.com/cognitect-labs/test-runner"
         :git/sha "9d36f36ff541dac680a05010e4348c744333f191"}}}

teodorlu avatar Aug 04 '24 14:08 teodorlu

Perhaps this is because neil dep upgrade didn't actually upgrade anything in your last example? I ran neil dep upgrade on clj-kondo before pinning the test runner, so if you remove :neil/pinned true you should be able to replicate it.

borkdude avatar Aug 04 '24 15:08 borkdude

That was it.

  1. No upgrades -> no git URL changes
  2. Upgrades -> potential unwanted git URL changes.

Thanks!

teodorlu avatar Aug 04 '24 15:08 teodorlu