Improve the way ignored files are managed#11617
Conversation
.gitignore
Outdated
| /manual/tools/htmlgen | ||
| /manual/tools/htmlquote | ||
| /manual/tools/latexscan.ml | ||
| /manual/tools/dvi2txt |
There was a problem hiding this comment.
The only remaining tools in manual/tools are: transf and texquote2. Thus:
/manual/tools/transf.ml
/manual/tools/texquote2
/manual/tools/transf
should be enough.
There was a problem hiding this comment.
I presume that the *.dSYM pattern which was in manual/tools/.gitignore doesn't matter (the pattern at the top of the file is *.out.dSYM, but I don't know what this pattern is for - it's slightly suspicious that we don't appear to clean these files ever)
.gitignore
Outdated
| /manual/src/infoman/ocaml.hocaml.kwd | ||
| /manual/src/library/*.tex | ||
| /manual/src/library/*.htex | ||
| /manual/src/library/arithstatus.mli |
There was a problem hiding this comment.
The arithstatus.ml file is a very old import from the csv ignore file which is no longer relevant.
dra27
left a comment
There was a problem hiding this comment.
There's an unintended consequence that because manual/src/textman now contains no files, git of course deletes the directory so the build of the manual is failing in CI! I know we used to leave dummy files in order to keep git creating directories, but I think we've moved away from doing that (compilerlibs/Makefile.compiler-libs, etc.) - $(MKDIR) textman added to the text: recipe in manual/src/Makefile should fix it.
.gitignore
Outdated
| @@ -228,7 +301,6 @@ META | |||
| /tools/primreq | |||
| /tools/primreq.opt | |||
| /tools/ocamldumpobj | |||
There was a problem hiding this comment.
I think we found tools/ocamldumpobj isn't built anymore, either?
.gitignore
Outdated
| /manual/tools/htmlgen | ||
| /manual/tools/htmlquote | ||
| /manual/tools/latexscan.ml | ||
| /manual/tools/dvi2txt |
There was a problem hiding this comment.
I presume that the *.dSYM pattern which was in manual/tools/.gitignore doesn't matter (the pattern at the top of the file is *.out.dSYM, but I don't know what this pattern is for - it's slightly suspicious that we don't appear to clean these files ever)
|
Florian Angeletti (2022/10/12 01:37 -0700):
@Octachron commented on this pull request.
> /manual/src/warnings-help.etex
+/manual/tests/cross-reference-checker
+/manual/tools/transf.ml
+/manual/tools/texquote2
+/manual/tools/transf
+/manual/tools/htmlgen
+/manual/tools/htmlquote
+/manual/tools/latexscan.ml
+/manual/tools/dvi2txt
The only remaining tools in `manual/tools` are: transf and texquote2. Thus:
```
/manual/tools/transf.ml
/manual/tools/texquote2
/manual/tools/transf
```
should be enough.
Fixed, thanks!
|
|
Florian Angeletti (2022/10/12 01:52 -0700):
The `arithstatus.ml` file is a very old import from the csv ignore
file which is no longer relevant.
Addressed, thanks.
|
|
David Allsopp (2022/10/12 02:03 -0700):
@dra27 commented on this pull request.
There's an unintended consequence that because `manual/src/textman`
now contains no files, git of course deletes the directory so the
build of the manual is failing in CI!
Oops, sorry, wasn't careful enough.
I know we used to leave dummy files in order to keep git creating
directories, but I think we've moved away from doing that
Which was a good idea, yes.
(`compilerlibs/Makefile.compiler-libs`, etc.) - `$(MKDIR) textman`
added to the `text:` recipe in `manual/src/Makefile` should fix it.
Done, in a slightly different way, thanks.
Also, one question for you @Octachron, please. In `manual/src/Makefile`,
one reads:
```
all:
$(MAKE) html
$(MAKE) text
$(MAKE) info
$(MAKE) manual
$(MAKE) index
$(MAKE) manual
```
Is it intended that the different formats of the manual are built in
such a sequential way? Could we replace this code by the more concise
```
all: html text info manual index
$(MAKE) manual
```
Or something similar, to save recursive invocations of make which seem
unnecessary and also gain in parallelism?
> @@ -228,7 +301,6 @@ META
/tools/primreq
/tools/primreq.opt
/tools/ocamldumpobj
I think we found `tools/ocamldumpobj` isn't built anymore, either?
Yes indeed, it was you who ofund that out, many thanks, I amended.
> /manual/src/warnings-help.etex
+/manual/tests/cross-reference-checker
+/manual/tools/transf.ml
+/manual/tools/texquote2
+/manual/tools/transf
+/manual/tools/htmlgen
+/manual/tools/htmlquote
+/manual/tools/latexscan.ml
+/manual/tools/dvi2txt
I presume that the `*.dSYM` pattern which was in
`manual/tools/.gitignore` doesn't matter (the pattern at the top of
the file is `*.out.dSYM`, but I don't know what this pattern is for -
it's slightly suspicious that we don't appear to clean these files
ever)
I thought the pattern in the root file was subsuming that one but I was
wrong, sorry about that.
My guess was that those `.dSYM` files were created on MacOS but you are
right that if they indeed are, it would make sense to remove them at
least during make distclean. So I'd say, either they are no longer
created and we should stop ignoring them, or they still are and we
should clean them in addition to ignoring them.
@damiendoligez or @garrigue, perhaps you know?
|
|
Concerning the |
|
Florian Angeletti (2022/10/12 05:15 -0700):
Concerning the `all` target in the manual, the `index` target has a
hidden dependency on the `manual` target
OK.
but otherwise the other targets can be parallelized.
Implemented in this PR, because it didn't feel worht a dedicated one, if
that's okay.
|
6b1d5b9 to
87e9030
Compare
The file in question is both supposed to be ignored (as all the .cmi files) and still present in the repository. This commit renames it so that there is no file left in this situation.
These tools do no longer exist
As a consequence of the previous commit, these directories became empty and hence get removed by git. They must therefore be created during the build and removed during cleanup.
|
CI okay. I have withdrawn theparallelization attempt because it can not be made Basically, the obstacle is that several recipes create files with Anyway: this PR should now be ready for review and hopefuly even |
Autoconf 2.71 saves an existing configure script to configure~ before generating a new one. Althogh tools/autogen could delete configure~, it may be helpful to not remove it so that it's possible to compare the two versions of the script and make sure no unintended change gets in. So this commit adds configure~ to .gitignore and makes sure it gets deleted during make clean.
|
I just added a commit to this PR to deal with the configure~ file created The file is kept to make it eaiser to see the differences between the |
|
Cool! Thaks!
|
Improve the way ignored files are managed (cherry picked from commit 7eefbf8)
Improve the way ignored files are managed (cherry picked from commit 7eefbf8)
Improve the way ignored files are managed (cherry picked from commit 7eefbf8)
This is a follow-up to #11346, whose idea is to avoid having files
that are both listed in
.gitignoreand still presentin the repository.At the moment, there is one file in this situation in the repository,
namely
tests/no-alias-deps/b.cmi. Thus this PR starts with a commit thatrenames it to
tests/no-alias-deps/b.cmi.inand which is borrowed from#11346.
The present PR continues with a bit of cleanup in the root
.gitignoreand finishes by merging the remaining
.gitignorefiles present insubdirectories into the root one, which subsumes what has been done
in #11346.
However, #11346 contains a CI test to make sure the property of no ignored
file committed is verified, which is not part of this PR.
Natural reviewers would be @dra27 and @Octachron, who may wnat to
check that all the ignored patterns for the manual are still necessary.