This is an archive of the discontinued LLVM Phabricator instance.

[clang][doc] Do not keep a copy of ClangCommandLineReference.rst in tree
ClosedPublic

Authored by serge-sans-paille on Sep 6 2022, 5:25 AM.

Details

Summary

This file is auto-generated, it's a bit confusing for the maintainers to have it
in tree while it shouldn't be modified *and* already have a rule to be
generated.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2022, 5:25 AM
serge-sans-paille requested review of this revision.Sep 6 2022, 5:25 AM

@aaron.ballman this is just a patch to start a discussion: We already have the cmake rule to generate this file, so removing it from tree actually doesn't break compilation. So I'm wondering why and if we should keep it checked in? Removing it would make it less likely for simple minded people like me to edit it (without reading the header warning)

@aaron.ballman this is just a patch to start a discussion: We already have the cmake rule to generate this file, so removing it from tree actually doesn't break compilation. So I'm wondering why and if we should keep it checked in? Removing it would make it less likely for simple minded people like me to edit it (without reading the header warning)

I think it's a good idea to remove it from the tree. We already removed the attribute and diagnostic references, both of which are generated files as well. When I remove the command line reference locally and do a non-cmake-based build (the old make html-style of doing local builds) and I get very reasonable behavior:

F:\source\llvm-project\clang\docs>make html
Running Sphinx v5.0.1
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 6 source files that are out of date
updating environment: 0 added, 10 changed, 1 removed
reading sources... [100%] index
F:\source\llvm-project\clang\docs\index.rst:16: WARNING: toctree contains reference to nonexisting document 'ClangCommandLineReference'
F:\source\llvm-project\clang\docs\index.rst:16: WARNING: toctree contains reference to nonexisting document 'AttributeReference'
F:\source\llvm-project\clang\docs\index.rst:16: WARNING: toctree contains reference to nonexisting document 'DiagnosticsReference'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 3 warnings.

The HTML pages are in _build\html.

Build finished. The HTML pages are in _build/html.

Those three links are broken in the local docs, but that's fine.

That's sounds like an "OK" to me, right?

aaron.ballman accepted this revision.Sep 6 2022, 9:57 AM

That's sounds like an "OK" to me, right?

Yeah, this LGTM, thank you!

This revision is now accepted and ready to land.Sep 6 2022, 9:57 AM