liquidz / antq

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

Upgrade does not respect :antq/exclude flags #199

Closed wardle closed 1 year ago

wardle commented 1 year ago

I have a project that uses Apache Lucene. Some users are still on java 8 (!), and so cannot use Lucene 9.x series, so I have an alias that allows Lucene 8.x to be used instead. I have added ^:antq/exclude which means they are not shown when I use antq to show outdated dependencies. However, during upgrade, the interactive prompt asks whether I want to upgrade 9.4.2 to 9.5.0 and if I answer 'y', then dependencies other than 9.4.2 are also upgraded - ie 8.11.2.

I think that there are two reasons why these deps should not be upgraded. Presumably deps should not be upgraded a) if there is a :antq/exclude flag and b) if the interactive UI asks to upgrade from a specific version to another when a dep isn't at that specific version.

My source code is here https://github.com/wardle/hermes - this issue is currrently reproducible at HEAD.

liquidz commented 1 year ago

@wardle Thanks for your reporting! Indeed. These deps should not be upgraded. I'll fix it.

wardle commented 1 year ago

Thank you. That is great. PS Sorry I appear to have created two issues due to network connectivity issues made it look as if the first didn't complete. I'll close the other one!

liquidz commented 1 year ago

@wardle I've updated only deps.edn upgrader to skip excluded deps for now. Could you try dev branch?

wardle commented 1 year ago

Yes that is fixed thank you.

To confirm: I have just tested again with a git checkout of c5f57d2752a3288ee8e1998085779a4362cb9e79 (main branch), and the excluded Lucene dependencies are silently upgraded, but you have fixed when I test with e735c12f51676eba88cf52ec1705b650c5c83f6d (on dev branch).

liquidz commented 1 year ago

@wardle Thanks! Just released v2.2.992.

wardle commented 1 year ago

Thank you very much.