-
- Downloads
cmd/dist: remove deptab and cleanlist in favor of gentab
dist's deptab is a list of changes to the automatically derived set of package dependencies. It's as old as dist itself, and the first version of deptab in CL 5620045 was quite complex. From the beginning, some of the entries in deptab have been for generated files that need to be added to the dependency set because they can't be discovered if they don't exist. gentab is also as old as dist itself, and lists the generated dependency files. The interaction between deptab and gentab is rather odd. gentab contains only base file names, not whole paths. To figure out what files to generate, dist takes a Cartesian product of deptab and gentab and calls the generator wherever the basename of a path in deptab matches an entry in gentab. This perhaps made sense at the time because some of the generated files appeared in more than one package in deptab. These days, deptab consists exclusively of generated files because dist can correctly derive all other dependencies, and all of the generated files have unique paths. This makes the Cartesian product approach needlessly complex (and so confusing!), and means that the only purpose served by deptab is to provide full paths for generated files. Furthermore, in the dist clean command, it also needed to expand the file names in gentab to complete paths, but it did so using a different list, cleanlist, and the same Cartesian product algorithm. This CL drops all of this complexity by putting full paths into gentab, which lets us delete deptab and cleanlist. Change-Id: Ie3993983734f6da3be453bb4c17a64e22dcf3e8f Reviewed-on: https://go-review.googlesource.com/c/go/+/501137 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by:Russ Cox <rsc@golang.org>
Loading
Please register or sign in to comment