Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

[Experimental] status: add an offline mode #1498

Closed
wants to merge 1 commit into from

Conversation

darkowlzz
Copy link
Collaborator

@darkowlzz darkowlzz commented Jan 1, 2018

What does this do / why do we need it?

This change divides the huge runStatusAll() function into small
functions with specific re-usable blocks. The new re-usability enabled
addition of an offline status mode which generates the same status only
from the manifest and lock file, without any upstream project
knowledge. This offline status is completely compatible with the existing
-json, -dot and -f flags.

$ dep status -offline
PROJECT                         CONSTRAINT                                 VERSION                                    REVISION  LATEST  PKGS USED
github.com/Masterminds/semver   branch parse-constraints-with-dash-in-pre  branch parse-constraints-with-dash-in-pre  a93e51b           1
github.com/Masterminds/vcs      ^1.11.0                                    v1.11.1                                    3084677           1
github.com/armon/go-radix       *                                          branch master                              4239b77           1
github.com/boltdb/bolt          ^1.0.0                                     v1.3.1                                     2f1ce7a           1
github.com/go-yaml/yaml         branch v2                                  branch v2                                  cd8b52f           1
github.com/golang/protobuf      branch master                              branch master                              5afd06f           1
github.com/jmank88/nuts         ^0.2.0                                     v0.2.0                                     a1e02c7           1
github.com/nightlyone/lockfile  *                                          branch master                              e83dc5e           1
github.com/pelletier/go-toml    branch master                              branch master                              b8b5e76           1
github.com/pkg/errors           ^0.8.0                                     v0.8.0                                     645ef00           1
github.com/sdboyer/constext     *                                          branch master                              836a144           1
golang.org/x/net                *                                          branch master                              66aacef           1
golang.org/x/sync               *                                          branch master                              f52d181           1
golang.org/x/sys                *                                          branch master                              bb24a47           1

WHY: This would enable granular testing of each fields in status for various combination of inputs using the getCompleteStatus() and its returned bsMap (BasicStatus Map). That would be in a follow-up PR.

NOTE: This PR started with the intention to make status output fields more testable, but as a side effect of the changes, adding an offline mode was easy and helped in better organization of code. Offline mode can be removed if it is misleading for the users, just an experiment.

What should your reviewer look out for in this PR?

Names of the new functions and their descriptions.
Is "offline" a good term for this? Maybe something better?

Do you need help or clarification on anything?

Any more possible division of code to create more re-usable and testable functions around runStatusAll().

Which issue(s) does this PR fix?

None.

@darkowlzz darkowlzz changed the title [Experimental] status: add a quick mode [Experimental] status: add an offline mode Jan 2, 2018
@darkowlzz darkowlzz mentioned this pull request Feb 5, 2018
This change divides the huge `runStatusAll()` function into small
functions with specific re-usable blocks. The new re-usability enabled
addition of an offline status mode which generates the same status only
from the manifest and lock file only, without any upstream project
knowledge. This offline status is completely compatible with the existing
`-json`, `-dot` and `-f` flags.
@mvdan
Copy link
Member

mvdan commented Sep 4, 2020

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!

@mvdan mvdan closed this Sep 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants