Releases: Helcaraxan/gomod
v0.7.1
v0.7.0
v0.7.0
Bug fixes
- Not all test-only dependent packages were adequately marked as such. This has been addressed and
any packages only imported when building tests are now appropriately recognised as such.
New features
- If no query is specified for
gomod graph
then it will return the full dependency graph by
default. - Nodes in the generated DOT graphs are now coloured based on their (parent) module's name.
Test-only dependencies are distinguishable by a lighter colour-palette than core dependencies.
Similary edges reflecting test-only dependencies are now marked with a distinct colour just as
indirect module dependencies are reflected by dashed lines instead of continous ones.
Breaking changes
- The query syntax for paths has been modified in favour of using glob-based matching. As a result
thefoo/...
prefix-matching is no longer recognised. Instead the more flexiblefoo/**
can be
used which also allows for middle-of-path wildcards such asfoo/**/bar/*
.
v0.6.2
v0.6.2
Bug fixes
- Removed panic on non-test path queries at package-level.
v0.6.1
Quick patch release to fix a panic
when combining --annotate
and --packages
as flags.
v0.6.0
After not being able to work much on gomod
during 2020 this new release contains a slew of major changes and improvements. Some of the key points:
- An entire rewrite of the internal graph logic to support both module and package-level dependencies.
- A significant reduction in the complexity of the CLI interface with less flags and
gomod
no longer trying to wrap thedot
binary in order to focus down on what the tool does best: building and querying your project's dependency graph. - A completely different approach to trimming down the full dependency based on graph queries to get the exact piece of the graph that you need.
Read the release-notes as well as the updated README and --help
messages for the gomod graph
command to get all the crunchy details.
v0.5.0
0.5.0
High-level overview
- A significant number of types, methods and functions have been renamed in preparation for a
futurev1.0.0
release. These renames aim to create a more coherent interface for the
functionalities exposed by thedepgraph
package.
New features
- The
depgraph.DepGraph
type now exposes aRemoveDependency
method allowing to remove a given
module including any edges starting or ending at this module. - The new
lib/modules
package exposes methods to retrieve various levels of module information. - The
depgraph.DepAnalysis
type now also contains information about the update backlog time of
a module's dependencies. This reflects the timespan between the timestamp of the used version of a
dependency and the timestamp of the newest available update.
Breaking changes
- Package split: the
depgraph.Module
anddepgraph.ModuleError
types have been extracted to a
separatelib/modules
package in preparation for future work that will expand the configurability
of information loading to support new features. - Type renames:
depgraph.Node
has been renamed todepgraph.Dependency
after the pre-existing type of that
name has been removed in thev0.4.0
release.depgraph.NodeReference
has been renamed todepgraph.DependencyReference
.depgraph.NodeMap
has been renamed todepgraph.DependencyMap
and the associated
NewNodeMap()
function has accordingly been renamed toNewDependencyMap()
.
- The
depgraph.DepGraph
type's methods have changed:Main()
has been removed in favour of direct access to a field with the same name.Nodes()
has been removed in favour of direct access to a field namedDependencies
.Node()
has been renamed toGetDependency()
.AddNode()
has been renamed toAddDependency
and now only returns a*Dependency
instead of
also abool
. The returnedvalue
isnil
if the module passed as parameter could not be
added.
- The
depgraph.DependencyFilter
type'sDependency
field has been renamed toModule
. - The
depgraph.NewDepGraph()
function now also takes the path where the contained module lives. - The
depgraph.GetDepGraph()
function now also takes a relative or absolute path to the directory
where the targeted Go module lives.
0.4.0 - Graph layout and formatting improvements
High-level overview
- The presence of the
.dot
tool is now only required when specifying the-V | --visual
flag to
gomod graph
. - Support for node clustering in generated
.dot
files. - More fine-grained control over graph generation via the new
--style
flag ofgomod graph
.
New features
- Generated
.dot
graphs are now using box nodes rather than the default ellipse style to reduce
the size of the generated image files and improve readability. - Specifying formatting options for image generation via
gomod graph
or the underlying library
functions is now done via a dedicated configuration type. - The
printer.PrintToDot
function can now generate improved layouts for dependency graphs via the
use of node clustering, tightly packing modules that share common reverse dependencies together.
This can result in significant improvements for larger depdendency graphs (e.g. the PNG image of
the full dependency graph for the kubernetes project
has 42% less pixels and has a ~7x smaller binary size).
Breaking changes
-
The
depgraph.DepGraph
and it's associated methods have been reworked to facilitate
reproducibility through determinism, meaning their signatures have changed. Both aNodeReference
andNodeMap
type have been introduced. -
The
depgraph.GetDepGraph()
method no longer takes a boolean to indicate what output should be
forwarded from the invocations of underlying tools. Instead this is inferred from the level
configured on thelogrus.Logger
instance argument that it takes.logrus.WarnLevel
and below
are considered the same as--quiet
,logrus.DebugLevel
and above are equivalent to--verbose
. -
Output behaviour for the invocation of underlying tools has slightly changed:
- By default only their
stderr
will be forwarded to the terminal output. - If the
-q | --quiet
flag is passed neither theirstderr
, not theirstdout
will be
forwarded. - If the
-v | --verbose
flag is passed bothstderr
andstdout
will be forwarded.
In any case the full output of these invocations can be found in the debug logs.
- By default only their
-
The
Visual
field of theprinter.PrinterConfig
type has been replaced byStyle
which is a
pointer to a nestedprinter.StyleOptions
type. Theprinter.Print
method will generate an
image if and only ifStyle
has a non-nil
value.
0.3.1 - Printing fix
- Fixed graph printing which was broken between
0.2.1
and0.3.0
. - Fixed printing of non-versioned (local) hidden
replace
statements.
0.3.0 - Highlight hidden replace statements
- Added the
gomod reveal
command to find and highlight hiddenreplaces
in (indirect) module dependencies. - Added the
analyze
alias forgomod analyse
.
0.2.1 - Reduce 'dot' requirement
- Only require the
dot
tool when running thegomod graph
command. - New developments in the project now have to go through CI before being merged.