Skip to content

Auto-update dependencies: output info in machine-readable format #758

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

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

jodersky
Copy link
Member

@jodersky jodersky commented Jan 16, 2020

Mill has a convenient task to check for the availability of newer versions of dependencies mill.scalalib.Dependency/updates.

Unfortunately this task only prints the output (in human readable form), but does not persist it in a machine-readable format. This makes it very difficult to reuse the output in other tasks, essentially requiring regex parsing of strings.

The changes proposed here change the updates task to expose the underlying data structures representing the upgrade path. An additional task, showUpdates is added, implementing the original, human readable, output of updates.

@jodersky jodersky force-pushed the serialize-dependencies branch from 856d62b to 2215d22 Compare January 16, 2020 15:53
@jodersky jodersky changed the title Expose upgrade path of dependencies Auto-update dependencies: output machine-readable info Jan 24, 2020
@jodersky jodersky changed the title Auto-update dependencies: output machine-readable info Auto-update dependencies: output in in machine-readable format Jan 25, 2020
@jodersky jodersky requested a review from lefou January 25, 2020 09:27
@jodersky jodersky changed the title Auto-update dependencies: output in in machine-readable format Auto-update dependencies: output info in machine-readable format Jan 25, 2020
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea.

Could you please rebase your branch on latest master, which contains a fix for the failed travis-ci tests.

I added two comments with questions.

This avoids exposing non-serializable data structures.
This makes it easy to build other tasks that depend on the output of dependency updates
@jodersky jodersky force-pushed the serialize-dependencies branch from 2215d22 to 8e6bf2d Compare February 15, 2020 12:57
@jodersky jodersky requested a review from lefou February 15, 2020 13:52
@jodersky
Copy link
Member Author

@lefou, I addressed your comments

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'd like to have some documentation for the new command. See below.

@@ -18,6 +18,10 @@ object Dependency extends ExternalModule {
allowPreRelease)
}

def showUpdates(ev: Evaluator, allowPreRelease: Boolean = false) = T.command{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add some ScalaDoc to the new command. It would be great, if you could also update/add the comment of the changed updates command.

@lefou lefou merged commit 519e771 into com-lihaoyi:master Mar 31, 2020
@lefou lefou added this to the after 0.6.1 milestone Mar 31, 2020
@lefou
Copy link
Member

lefou commented Mar 31, 2020

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants