liquidz / antq

Point out your outdated dependencies.
Other
403 stars 25 forks source link

Upgrade package to a wrong version #160

Closed introom closed 2 years ago

introom commented 2 years ago

Given

{:extra-deps {
                ;; see https://github.com/gfredericks/debug-repl
                com.gfredericks/debug-repl {:mvn/version "0.0.12"}}
  }

antq claims the altest version is 0.3.1-p1, however on clojars, that latest is 0.0.12.

https://clojars.org/com.gfredericks/debug-repl.

:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

|    :file |                      :name | :current |  :latest |
|----------+----------------------------+----------+----------|
| deps.edn | com.gfredericks/debug-repl |   0.0.12 | 0.3.1-p1 |

Available diffs:
- https://github.com/gfredericks/debug-repl/compare/debug-repl-0.0.12...head

Do you want to upgrade com.gfredericks/debug-repl '0.0.12' to '0.3.1-p1' in deps.edn (y/n):
liquidz commented 2 years ago

@introom This is an debug-repl's versioning issue. antq sort versions with version-clj and version-clj sort versions by semantic versioning. As semantic versioning, it is abvious 0.3.x is newer than 0.0.x.

introom commented 2 years ago

Yup. Didn't check the all versions page first: https://clojars.org/com.gfredericks/debug-repl/versions.

Indeed 0.3.1-p was there.

Is it possible to inform antq that some packge is fixed at a version?

My use case is: Use -force option to update all the packge versions. So a setting on fixing a specific version really helps here.

liquidz commented 2 years ago

@introom How about to exclude the specific version as follows?

--exclude=com.gfredericks/debug-repl@0.3.1-p

cf. https://github.com/liquidz/antq#--excludeartifact_nameversion

introom commented 2 years ago

Yup. I am aware of that. But that piece of information should better be possible to stored inside the exact deps.edn file.

liquidz commented 2 years ago

Yup. I am aware of that. But that piece of information should better be possible to stored inside the exact deps.edn file.

At first, it should be another issue since it is different from the original one.

antq supports not only deps.edn but also project.clj, pom.xml and so on. And the current option is a unified exclusion method.

If we provide a way to exclude versions in deps.edn, it shoud be the deps.edn specific way. If we also want to provide a way to exclude version in project.clj, it should be different from the way of deps.edn.

So I don't want to provide several different ways for the same setting.

If I do, I would consider a way to prepare a file like antq.edn that can manage settings as an external file.

introom commented 2 years ago

Got it. Thanks for the detailed reply.