With this ticket I bring into RT the discussion that began on list starting at:In this post I summarize that discussion, present current documentation relevant to the problem and describe one policy question which needs to be resolved before a solution can be implemented. I. Discussion of Problem Steve Hay initiated the discussion in the context of working on core on Win32: ##### "I just noticed that after doing a "nmake distclean" there are still many files left lying around that shouldn't be. Exactly which ones is shown by running "git clean -dfx" afterwards: That should output nothing, but instead cleaned up all the files below! "distclean certainly used to work at some time in the (recent?) past." ##### Subsequent posts confirmed that this problem is *not* limited to Win32 and has existed for some time. Some have suggested that 'make distclean' be made an alias for 'git clean -dfx', but others have pointed out that you cannot and should not assume that one is always working within a git checkout. 'make distclean' presumably DTRT for Perl 5 core developers before we switched to git as our revision control system. It should not have been allowed to fall into disrepair. [My editorial comments: There is no guarantee that git will be the last revision control system Perl will ever use, so we shouldn't tie ourselves too closely to it. TMTOWTDI encourages this and prudence recommends this. 'git clean -dfx' may DTRT for *many* Perl 5 core developers *much* of the time, the mere fact that we are having this discussion indicates that it does not DTRT for all core developers all of the time.] II. Documentation of Current Functionality A. 'make distclean' 'make distclean' is documented in INSTALL under the heading "Starting all over again": ##### If you wish to rebuild perl from the same build directory, you should clean it out with the command 'make distclean' or 'make realclean'[.] The only difference between the two is that 'make distclean' also removes your old config.sh and Policy.sh files. [Some paragraph reformatting -- jk.] ##### B. 'git clean -dfx' From 'man git-clean' for Git 1.9.l: ##### Cleans the working tree by recursively removing files that are not under version control, starting from the current directory. Normally, only files unknown to Git are removed, but if the -x option is specified, ignored files are also removed. This can, for example, be useful to remove all build products. ##### Here is what I believe to be the most relevant parts of the documentation of the three options: ##### -d: Remove untracked directories in addition to untracked files. -f: If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to run unless given -f, -n or -i. -x: This allows removing all untracked files, including build products. This can be used (possibly in conjunction with git reset) to create a pristine working directory to test a clean build. ##### C. Attachments Attached are three files derived from a perl built on Linux x86_64 in blead. 'git clean -dfx' was run before a fetch from origin and rebase, then perl was configured only with '-des -Dusedevel', then perl was built and tested. * Output from 'git clean -dfx' after from-scratch build: git.clean.dfx.txt * Output from 'make distclean' after from-scratch build: make.distclean.txt * Output from 'git clean -dfx' after 'make distclean' has been run: activated.after.make.distclean.git.clean.dfx.txt Examination of the latter suggests that almost all of the files and directories which 'make distclean' is failing to remove and which we would presumably expect it to remove are found under 'lib/'. III. Policy Issues A. Scope of Defect Are we in agreement that, given an otherwise pristine working directory, 'make distclean' should remove the same directories and files as 'git clean -dfx'? In other words, after running 'make distclean' should a file like attachment activated.after.make.distclean.git.clean.dfx.txt be empty? B. Scope of 'make distclean' relative to 'git clean -dfx' 'make distclean' does not rely on the revision control system for the list of files to be removed. It relies on MANIFEST, Makefile and its predecessors, etc. As such, it is not documented to remove any files the user may have in the working directory which are not under revision control or are not build artifacts. Suppose I had in my working directory a little shell script to configure a DEBUGGING build. ##### $ cat mydebugconfigure.sh #/bin/sh ./Configure -des -Dusedevel -DDEBUGGING ##### 'make distclean' would presumably *not* remove that shell script as it is neither under revision control nor a build artifact. 'git clean', however, treats the working directory primarily as a git checkout and -- particularly with '-dfx' -- aims to get that checkout back to a pristine state from git's point of view. git's point of view is not necessarily perl's or the developer's point of view. 'git clean -dfx' would nuke that shell script wrapping around Configure. Once we have corrected the defect in III.A. above, are we happy with the fact that 'make distclean' and 'git clean -dfx' have somewhat different objectives and hence achieve different results? IV. Summary Once we've resolved III.A. and III.B., patches welcome! Thank you very much. Jim Keenan -- James E Keenan (firstname.lastname@example.org)
Removing lib/Attribute/ Removing lib/AutoLoader.pm Removing lib/AutoSplit.pm Removing lib/B/Debug.pm Removing lib/CPAN/ Removing lib/Carp.pm Removing lib/Carp/ Removing lib/Config/Perl/ Removing lib/Devel/ Removing lib/Digest.pm Removing lib/Digest/ Removing lib/Dumpvalue.pm Removing lib/Env.pm Removing lib/Exporter.pm Removing lib/Exporter/ Removing lib/ExtUtils/CBuilder.pm Removing lib/ExtUtils/CBuilder/ Removing lib/ExtUtils/Command.pm Removing lib/ExtUtils/Constant.pm Removing lib/ExtUtils/Constant/ Removing lib/ExtUtils/Install.pm Removing lib/ExtUtils/Installed.pm Removing lib/ExtUtils/Miniperl.pm Removing lib/ExtUtils/Packlist.pm Removing lib/Fatal.pm Removing lib/File/Fetch.pm Removing lib/File/Find.pm Removing lib/File/Path.pm Removing lib/File/Temp.pm Removing lib/FileCache.pm Removing lib/Filter/ Removing lib/Getopt/Long.pm Removing lib/HTTP/ Removing lib/I18N/ Removing lib/IO/ Removing lib/IPC/ Removing lib/Locale/ Removing lib/Math/ Removing lib/Memoize.pm Removing lib/Memoize/ Removing lib/Module/ Removing lib/NEXT.pm Removing lib/Net/Ping.pm Removing lib/Params/ Removing lib/Parse/ Removing lib/Perl/ Removing lib/PerlIO/ Removing lib/Pod/Escapes.pm Removing lib/Pod/Simple.pm Removing lib/Pod/Simple.pod Removing lib/Pod/Simple/ Removing lib/Safe.pm Removing lib/Search/ Removing lib/SelfLoader.pm Removing lib/Term/ Removing lib/Test.pm Removing lib/Test/ Removing lib/Text/ Removing lib/Thread/ Removing lib/Tie/File.pm Removing lib/Tie/Memoize.pm Removing lib/Tie/RefHash.pm Removing lib/Time/Local.pm Removing lib/autodie.pm Removing lib/autodie/ Removing lib/autouse.pm Removing lib/base.pm Removing lib/bigint.pm Removing lib/bignum.pm Removing lib/bigrat.pm Removing lib/constant.pm Removing lib/encoding/ Removing lib/experimental.pm Removing lib/fields.pm Removing lib/if.pm Removing lib/parent.pm Removing lib/perlfaq.pm Removing lib/perlfaq.pod Removing lib/perlfaq1.pod Removing lib/perlfaq2.pod Removing lib/perlfaq3.pod Removing lib/perlfaq4.pod Removing lib/perlfaq5.pod Removing lib/perlfaq6.pod Removing lib/perlfaq7.pod Removing lib/perlfaq8.pod Removing lib/perlfaq9.pod Removing lib/perlglossary.pod Removing lib/version.pm Removing lib/version.pod Removing lib/version/ Removing tclean veryclean _verycleaner Removing tclean' or 'veryclean' targets are run.
Message body is not shown because it is too large.
Message body is not shown because it is too large.