-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
Adds runStatusUnused() to analyse and show only the unused dependencies in the project.
Adds runStatusMissing() to analyse and show only the missing dependencies in the project.
Adds runStatusOld() to analyse and list the out-of-date dependencies in the project.
@sdboyer some feedback on this for progress and improvements? |
Question, how do these flags intersect with |
@shurcooL I don't think I had json output in mind when this PR was written. But now I see we should consider json and other relevant supported output formats for each of the different status modes. In case of [
{
"project": "github.com/fsnotify/fsnotify",
"version": "v1.11.1"
"revision": "fd9ec7deca8bf46ecd2a795baaacf2b3a9be1197",
"latest": "4da3e2cfbabc9f751898f250b49f2439785783a1"
},
{
"project": "github.com/pkg/errors",
...
}
] This should go to the spec doc: https://docs.google.com/document/d/1Qwa3jDKDh45t5qAGjRpeu3ZsAbkukIYDDmYJdMxH2uY/edit |
@@ -422,6 +437,135 @@ outer: | |||
return nil | |||
} | |||
|
|||
// runStatusUnused analyses the project for unused dependencies that are present | |||
// in manifest but not imported in the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/in manifest/in the manifest/
Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks! |
NOTE: This is just an experiment to discuss about the behavior of status and it's running modes.
This PR adds the following modes to
status
command:-unused
- show unused dependencies-missing
- show missing dependencies-old
- show out-of-date dependenciesThere are a lot of repeated code in this PR in
status.go
file. They would be refactored once we discuss and decide how we want things to be in status.Following are the output of status with the new modes. Need feedback on how can they be improved and their proper implementation.
-unused
When there are unused dependencies:
When there are no unused dependencies:
-missing
When there are missing dependencies:
When there are no missing dependencies:
-old
When there are out-of-date dependencies:
This really needs a better table view output.
When all the dependencies are up-to-date:
This mode considers transitive dependencies too. Should this update availability check be only for direct dependencies or for all the dependencies?
Q:
-modified
is another mode that can be implemented to show what changed. But I'm not sure what are the things that should be considered for modified. Some inputs would be great.