liquidz / antq

Point out your outdated dependencies.
Other
395 stars 22 forks source link

Packages are "Upgraded" when they are actually ignored #189

Closed kimmoahola closed 1 year ago

kimmoahola commented 1 year ago

My deps.edn looks like this:

:deps {...

org.slf4j/jcl-over-slf4j ^:outdated/ignore {:mvn/version "1.7.36"}
lambdaisland/kaocha-cloverage {:mvn/version "1.0.75"}

:aliases {
  :outdated {:replace-deps {com.github.liquidz/antq {:mvn/version "2.1.939"}}
             :main-opts ["-m" "antq.core" "--upgrade" "--force" "--skip=pom" "--skip=github-action"]}
}

When I run clojure -M:outdated

The output is

|    :file |                          :name | :current |  :latest |
|----------+--------------------------------+----------+----------|
| deps.edn |        com.github.liquidz/antq |  2.1.939 |  2.1.946 |
|          |  lambdaisland/kaocha-cloverage |   1.0.75 |   1.1.89 |
|          |       org.slf4j/jcl-over-slf4j |   1.7.36 |    2.0.3 |

Available changes:
- https://github.com/liquidz/antq/blob/2.1.946/CHANGELOG.adoc
- https://github.com/lambdaisland/kaocha-cloverage/blob/v1.1.89/CHANGELOG.md
Upgraded org.slf4j/jcl-over-slf4j '1.7.36' to '2.0.3' in deps.edn.
Upgraded com.github.liquidz/antq '2.1.939' to '2.1.946' in deps.edn.
Upgraded lambdaisland/kaocha-cloverage '1.0.75' to '1.1.89' in deps.edn.

And in the deps.edn file the all except jcl-over-slf4j is updated (just like I expected) but that output displays jcl-over-slf4j package (which is not what I expected).

I don't know if that ^:outdated/ignore meta is actually supported way to ignore upgrades to packages but it works. Just the output of antq does not match what's actually upgraded.

liquidz commented 1 year ago

@kimmoahola Thanks for your reporting! It is a bug in upgrader, and jcl-over-slf4j should be upgraded.

In antq, :outdated/ignore metadata is not handled. https://github.com/liquidz/antq/search?q=ignore To ignore specific deps, you should use --exclude option like --exclude=org.slf4j/jcl-over-slf4j. https://github.com/liquidz/antq#--excludeartifact_nameversion

Anyway, I'll fix the upgrader bug.

kimmoahola commented 1 year ago

I think that kind of ^:ignore is handy. I think it's good to mark 'ignore' directly to the package definition. It's easy to spot there when I have 30 packages in a project.

And also I add a comment to the line for a reason why the package is ignored.

Previously I used depot and it has that kind of meta to ignore stuff: https://github.com/Olical/depot#controlling-which-part-of-the-file-are-checked

Please consider to also add support for that in antq.

Thanks!

liquidz commented 1 year ago

@kimmoahola

Please consider to also add support for that in antq.

OK :) Could you cut a new issue for the feature request?

kimmoahola commented 1 year ago

Yes of course: https://github.com/liquidz/antq/issues/190

liquidz commented 1 year ago

Closed by #191