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

Consider adding a new reporter or a flag to make viewing changes easier #240

Closed
p-himik opened this issue Nov 23, 2023 · 8 comments
Closed

Comments

@p-himik
Copy link

p-himik commented Nov 23, 2023

With the table reporter and changes enabled, the changes URLs are listed below the table. It makes it inconvenient to go back and forth between the table and the changes, always searching for the right line.

Perhaps a new reporter or a flag could be added to make the changes URLs appear beside the corresponding entries in the report table, right on the same row.

liquidz added a commit that referenced this issue Dec 1, 2023
@liquidz
Copy link
Owner

liquidz commented Dec 1, 2023

@p-himik Thanks for your suggestion.

Originally, it was planned to display it on the same row.
But when actually displayed, the table became hard to read due to the length of the URLs, so I've changed it to the current form.

Therefore, it is easy to display it on the same row depending on the option.
I made a feature/changes-in-table branch and added --changes-in-table option for trial.
Could you try this branch?

@p-himik
Copy link
Author

p-himik commented Dec 2, 2023

Seems perfect, thanks!

An alternative that I should've mentioned earlier would to be use a custom format and display the output not as a table but rather a series of user-formatted messages. However, the problem there is that --error-format seems to escape newlines:

$ clj -M:outdated --error-format="File: {{file}}\nName: {{latest-name}}\nVersion: {{version}} -> {{latest-version}}\nChanges: {{changes-url}}"
File: deps.edn\nName: \nVersion: 7e9af7776efbbc891ac5c82b40d44fff084b0191 -> 1cbbd2a04c1c3496fe01e7a35fb3a180b399aaf9\rChanges: https://github.com/liquidz/antq/compare/7e9af7776efbbc891ac5c82b40d44fff084b0191...1cbbd2a04c1c3496fe01e7a35fb3a180b399aaf9
File: deps.edn\nName: \nVersion: 1.8.1 -> 1.9.1\rChanges: https://github.com/day8/re-frame-10x/blob/1.9.1/CHANGELOG.md
File: deps.edn\nName: \nVersion: 2.0.4 -> 2.0.5\rChanges: https://github.com/zonkyio/embedded-postgres/compare/v2.0.4...v2.0.5
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 1.4.11 -> 1.4.14\rChanges: 
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 6.34.0 -> 7.0.0\rChanges: https://github.com/getsentry/sentry-java/blob/7.0.0/CHANGELOG.md
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 6.34.0 -> 7.0.0\rChanges: https://github.com/getsentry/sentry-java/blob/7.0.0/CHANGELOG.md

If newlines were respected, I would be able to put every artifact into its own block and every detail within that block into its own line.

liquidz added a commit that referenced this issue Dec 2, 2023
@liquidz
Copy link
Owner

liquidz commented Dec 2, 2023

@p-himik Ah, as a tool, newlines are handled correctly, so it seems that the string received by tools.cli has already been escaped.

clojure -Tantq outdated :error-format '"File: {{file}}\nLatest: {{latest-version}}"'

I've fixed in the same branch. Could you try?

@p-himik
Copy link
Author

p-himik commented Dec 2, 2023

Sweet, that works! Thanks!

If anyone else is reading this, this is the format that I found to be quite readable while also condense enough:

"File:    {{file}}\nName:    {{name}} -> {{latest-name}}\nVersion: {{version}} -> {{latest-version}}\nChanges: {{changes-url}}\n"

A sample of the results:

File:    deps.edn
Name:    day8.re-frame/re-frame-10x -> 
Version: 1.8.1 -> 1.9.1
Changes: https://github.com/day8/re-frame-10x/blob/1.9.1/CHANGELOG.md

File:    deps.edn
Name:    io.zonky.test/embedded-postgres -> 
Version: 2.0.4 -> 2.0.5
Changes: https://github.com/zonkyio/embedded-postgres/compare/v2.0.4...v2.0.5

File:    lib/edge.app.logging/deps.edn
Name:    ch.qos.logback/logback-classic -> 
Version: 1.4.11 -> 1.4.14
Changes: 

Not sure whether there's a better way to handle latest-name to avoid those extra ->, but they don't really bother me.

(No clue why logback-classic doesn't have the changes URL - surely a different issue, and I don't know enough about how Antq works in the first place).

@liquidz
Copy link
Owner

liquidz commented Dec 10, 2023

@p-himik Thanks for your confirmation!
I'll prepare for release.

logback-classic's pom.xml does not have SCM section.

antq refers the SCM section to detect the source repository URL, so antq cannot show the changes URL for logback-classic for now.

liquidz added a commit that referenced this issue Dec 10, 2023
liquidz added a commit that referenced this issue Dec 10, 2023
@liquidz
Copy link
Owner

liquidz commented Jan 1, 2024

@p-himik Sorry, I've been unwell.

Not sure whether there's a better way to handle latest-name to avoid those extra ->, but they don't really bother me.

Now dev branch uses Mustache as a template engine for trial, and we can specify error-format as follows.

"File:    {{file}}\nName:    {{name}}{{#latest-name}} -> {{.}}{{/latest-name}}\nVersion: {{version}}{{#latest-version}} -> {{.}}{{/latest-version}}\nChanges: {{changes-url}}\n"

@p-himik
Copy link
Author

p-himik commented Jan 1, 2024

Oh, cool, thanks!

Hope you feel better.

@liquidz
Copy link
Owner

liquidz commented Jan 2, 2024

@p-himik Just released v2.8.1165 :)

@liquidz liquidz closed this as completed Jan 2, 2024
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