Skip to content

Improve the way ignored files are managed#11617

Merged
shindere merged 8 commits intoocaml:trunkfrom
shindere:gitignore
Oct 14, 2022
Merged

Improve the way ignored files are managed#11617
shindere merged 8 commits intoocaml:trunkfrom
shindere:gitignore

Conversation

@shindere
Copy link
Copy Markdown
Contributor

This is a follow-up to #11346, whose idea is to avoid having files
that are both listed in .gitignore and 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 that
renames it to tests/no-alias-deps/b.cmi.in and which is borrowed from
#11346.

The present PR continues with a bit of cleanup in the root .gitignore
and finishes by merging the remaining .gitignore files present in
subdirectories 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.

.gitignore Outdated
/manual/tools/htmlgen
/manual/tools/htmlquote
/manual/tools/latexscan.ml
/manual/tools/dvi2txt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arithstatus.ml file is a very old import from the csv ignore file which is no longer relevant.

Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Oct 12, 2022 via email

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Oct 12, 2022 via email

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Oct 12, 2022 via email

@Octachron
Copy link
Copy Markdown
Member

Concerning the all target in the manual, the index target has a hidden dependency on the manual target but otherwise the other targets can be parallelized.

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Oct 12, 2022 via email

@shindere shindere force-pushed the gitignore branch 3 times, most recently from 6b1d5b9 to 87e9030 Compare October 13, 2022 12:39
dra27 and others added 5 commits October 13, 2022 14:46
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.
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.
@shindere
Copy link
Copy Markdown
Contributor Author

CI okay.

I have withdrawn theparallelization attempt because it can not be made
work easily and it's out of the scope of this PR anyway.

Basically, the obstacle is that several recipes create files with
similar names so there is a filename collision which would need to be
fixed.

Anyway: this PR should now be ready for review and hopefuly even
for approval and merge. :-)

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.
@shindere
Copy link
Copy Markdown
Contributor Author

I just added a commit to this PR to deal with the configure~ file created
by autoconf 2.71.

The file is kept to make it eaiser to see the differences between the
former configure script and the just generated one, ignored to avoid
noise in git status and deleted during make clean.

Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shindere
Copy link
Copy Markdown
Contributor Author

shindere commented Oct 14, 2022 via email

@shindere shindere merged commit 7eefbf8 into ocaml:trunk Oct 14, 2022
@shindere shindere deleted the gitignore branch October 14, 2022 12:13
dra27 pushed a commit to dra27/ocaml that referenced this pull request Dec 21, 2023
Improve the way ignored files are managed

(cherry picked from commit 7eefbf8)
dra27 pushed a commit to dra27/ocaml that referenced this pull request Dec 21, 2023
Improve the way ignored files are managed

(cherry picked from commit 7eefbf8)
ejgallego pushed a commit to ejgallego/ocaml that referenced this pull request Nov 5, 2025
Improve the way ignored files are managed

(cherry picked from commit 7eefbf8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants