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

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

Closed
kimmoahola opened this issue Nov 16, 2022 · 5 comments
Closed

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

kimmoahola opened this issue Nov 16, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@kimmoahola
Copy link

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
Copy link
Owner

liquidz commented Nov 16, 2022

@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.

@liquidz liquidz added the bug Something isn't working label Nov 16, 2022
@kimmoahola
Copy link
Author

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
Copy link
Owner

liquidz commented Nov 16, 2022

@kimmoahola

Please consider to also add support for that in antq.

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

@kimmoahola
Copy link
Author

Yes of course: #190

@liquidz
Copy link
Owner

liquidz commented Nov 19, 2022

Closed by #191

@liquidz liquidz closed this as completed Nov 19, 2022
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

No branches or pull requests

2 participants