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

Aliases with :replace-deps do not report updates #44

Closed
practicalli-johnny opened this issue Dec 6, 2020 · 3 comments
Closed

Aliases with :replace-deps do not report updates #44

practicalli-johnny opened this issue Dec 6, 2020 · 3 comments

Comments

@practicalli-johnny
Copy link
Contributor

practicalli-johnny commented Dec 6, 2020

Description :octocat:

Aliases that include a dependency via the :replace-deps key are not checked for newer versions. Tested with the 0.9.2 version of antq

The :replace-deps key is often used for defining tooling aliases that do not need to use the dependencies from the main project.

Reproduction guide 🪲

Add an alias to the user level configuration that adds the antq library via the :replace-deps key, using a version less than the current, e.g. 0.9.1

  :project/outdated
  {:replace-deps {antq/antq {:mvn/version "0.9.1"}}
   :main-opts  ["-m" "antq.core"]}

Run the clojure command with the alias

clojure -M:project/outdated

Observed behaviour: 👀 💔
antq reports no library updates available, even though 0.9.2 is available.

Expected behaviour: ❤️ 😄
Updating the alias to use :extra-deps and run the command again. This will report a new version of antq/antq is available

  :project/outdated
  {:extra-deps {antq/antq {:mvn/version "0.9.1"}}
   :main-opts  ["-m" "antq.core"]}
|    :file |                       :name | :version | :latest-version |
|----------+-----------------------------+----------+-----------------|
| deps.edn |                   antq/antq |    0.9.1 |           0.9.2 |

System Info 💻

  • Clojure CLI tools: "1.10.1.727"
  • Java: openjdk version "1.8.0_275"
  • OS: Ubuntu linux 20.10
@liquidz
Copy link
Owner

liquidz commented Dec 6, 2020

@jr0cket Thanks for your reporting!

Here may be the cause.
https://github.com/liquidz/antq/blob/0.9.2/src/antq/dep/clojure.clj#L38
Adding :replace-deps should work, but I have no time for now.
So I'll try tonight.

@practicalli-johnny
Copy link
Contributor Author

Oh, it is very simple to add, so I created a PR after testing it on my every growing https://github.com/practicalli/clojure-deps-edn configuration.

I added a :hack/antq alias to test it locally, using a local root config

  :hack/antq
  {:replace-deps
   {antq/antq {:local/root "/home/practicalli/projects/clojure/community-tools/antq"}}
   :main-opts ["-m" "antq.core"]}

liquidz added a commit that referenced this issue Dec 7, 2020
@liquidz liquidz closed this as completed in a869221 Dec 7, 2020
@liquidz
Copy link
Owner

liquidz commented Dec 7, 2020

@jr0cket Just released v0.9.3

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