Skip to content

Commit e88fb39

Browse files
committed
Some tweaks to project description docs
The CONTRIBUTING page and the documentation overview page are updated with additional infomration and some rewording. Signed-off-by: Mats Wichmann <[email protected]>
1 parent 2e44dda commit e88fb39

File tree

2 files changed

+77
-19
lines changed

2 files changed

+77
-19
lines changed

CONTRIBUTING.rst

+22-15
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@ Introduction
66

77
Thanks for taking the time to contribute to SCons!
88

9-
This will give a brief overview of the development process,
9+
This is a brief overview of the development process,
1010
and about the SCons tree (right here, if you're reading this
11-
in Github, or in a cloned repository).
11+
in Github, or in a repository clone).
1212

1313
There are lots of places we could use help - please don't
1414
think we're only interested in contributions to code.
1515

1616
If you're going to contribute, we'd love to get to know you
17-
a bit and understand and what problems you're looking to solve,
17+
a bit and understand what problems you're looking to solve,
1818
or what you are intending to improve, whether that's documentation,
1919
code, examples, tutorials, etc. A great way to introduce yourself is to
2020
to hop onto the `SCons Discord Server <https://discord.gg/bXVpWAy>`_
21-
to chat. You don't have to be a regular Discord user,
22-
there is a web interface.
21+
to chat. You don't have to use the Discord app,
22+
as there is a web interface (does require an account).
23+
You can also use the
24+
`SCons Users Mailing List <https://pairlist4.pair.net/mailman/listinfo/scons-users>`_.
2325

2426
Resources
2527
=========
@@ -38,15 +40,20 @@ Reporting Bugs
3840

3941
One of the easiest ways to contribute is by filing bugs.
4042
The SCons project welcomes bug reports and feature requests,
41-
but we *do* have a preference for having talked about them first -
42-
we request you send an email to the
43-
`SCons Users Mailing List <https://pairlist4.pair.net/mailman/listinfo/scons-users>`_
44-
or hop on the Discord channel (see link above), and if so
45-
instructed, then proceed to an issue report.
43+
but unless they're really trivial (like doc typos),
44+
we *do* have a preference for having talked about them first.
45+
This step helps identify possible collaborators and reviewers,
46+
and pre-screens issues that may already have solutions,
47+
be in progress, or perhaps are the result of a misunderstanding.
48+
You can either ask on the Discord channel (see link above),
49+
or send am email to the mailing list.
50+
You can also use
51+
`GitHub Discussions <https://github.com/SCons/scons/discussions>`_.
52+
If so instructed, please proceed to an issue report.
4653

4754
You can explore the list of existing bugs on GitHub.
4855
Sometimes there's work in progress which may include temporary
49-
workarounds for the problem you've run into::
56+
workarounds for the problem you are running into::
5057

5158
https://github.com/SCons/scons/issues
5259

@@ -58,12 +65,12 @@ This tree contains a lot more than just the SCons engine itself.
5865
Some of it has to do with packaging it in a couple
5966
of forms: a Python-installable package (source distribution
6067
and installable wheel file, which get uploaded to the Python
61-
Package Index), a portable zip (or tar) distribution
68+
Package Index, PyPI), a portable zip (or tar) distribution
6269
called "scons-local", and a full source bundle. You usually
6370
don't need to worry about the packaging parts when working
6471
on a source or doc contribution - unless you're adding an entirely
65-
new file, then the packaging bits may need to know about it. The
66-
project maintainers can usually help with that part.
72+
new file, then the packaging bits may need to know about it.
73+
The project maintainers can help with that part.
6774
There are also tests and tools in the tree.
6875

6976
The *full* development cycle is not just to test code changes directly,
@@ -111,7 +118,7 @@ on the documentation process at the Documentation Toolchain page:
111118
https://github.com/SCons/scons/blob/master/doc/overview.rst
112119

113120

114-
You can execute SCons directly from this repository. For Linux or UNIX::
121+
You can execute SCons directly from this repository. For Linux/UNIX/MacOS::
115122

116123
$ python scripts/scons.py [arguments]
117124

doc/overview.rst

+55-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ These entities can be used in the MAN page and the User manual.
104104
Note that the four type tags themselves (``<tool>``, ``<builder>``,
105105
``<cvar>`` and ``<function>``) can only be used in documentation
106106
sources in the ``SCons`` directory; the build will not scan for these
107-
in the ``doc`` directory.
107+
tags in files in the ``doc`` directory.
108108

109-
When you add an XML file in the ``SCons/Tools`` folder, e.g. for
110-
a tool named ``foobar``, you can use the two entities
109+
When you add tool documentation using the ``<tool>`` tag,
110+
let's say for a tool named ``foobar``, you can use the two
111+
automatically generated entities
111112

112113
*t-foobar*
113114
which prints the name of the Tool, and
@@ -118,6 +119,10 @@ a tool named ``foobar``, you can use the two entities
118119
The link will be to the appropriate Appendix in the User Guide,
119120
or to the proper section in the manpage.
120121

122+
The ``<builder>`` tag similarly generates entities with the *b-* prefix,
123+
the ``<function>`` tag generates entities with the *f-* prefix,
124+
and the ``<cvar>`` tag generates entities with the *cv-* prefix.
125+
121126
In the case of Functions, there may be pairs of these, depending
122127
on the value of the signature attribute: this attribute tells
123128
whether only the global function form, or only the environment
@@ -201,6 +206,47 @@ to write it all in text, as in *See the manpage section
201206
"Builder Objects"* than to leave a dangling reference in one
202207
of the docs.
203208

209+
Context
210+
=======
211+
While it is very convenient to document related
212+
things together in one xml file, and this is encouraged
213+
as it helps writers keep things in sync,
214+
be aware the information recorded inside the four special tags
215+
will not be presented together in the output documents.
216+
For example, when documenting a Tool in
217+
``SCons/Tool/newtool.xml`` using the ``<tool>`` tag,
218+
and noting that the tool ``<uses>`` or ``<sets>``
219+
certain construction variables,
220+
those construction variables can be documented
221+
right there as well using ``<cvar>`` tags.
222+
When processed with ``SConsDoc`` module,
223+
this will generate xml from the
224+
``<tool>`` tag into the ``tools.{gen,mod}`` files,
225+
and xml from the ``<cvar>`` tag into
226+
the ``variables.{gen,mod}`` files;
227+
those files are then included each into their own
228+
section, so the entries may end up separated by
229+
hundreds of lines in the final output.
230+
The special entries will also be sorted in their
231+
own sections, which might cause two entries using the
232+
same tag in the same source file to be separated.
233+
All this to say: do not write your doc text
234+
with the idea that the locality you see in the xml source file
235+
will be preserved when consumed in a web browser,
236+
manpage viewer, PDF file, etc. Provide sufficient context
237+
so entries can stand on their own.
238+
239+
Another quirk is that ``SConsDoc``
240+
will take all occurrences of a special tag and
241+
combine those contents into a single entry in the generated file.
242+
As such, normally there should be only one definition of
243+
each element project-wide. This particularly comes up in tool definitions,
244+
as several tools may refer to the same construction variable.
245+
It is suggested to pick one file to write the documentation in,
246+
and then in the other tool documents referencing it,
247+
place a comment indicating which file the variable is documented in -
248+
this will keep future editors from having to hunt too far for it.
249+
204250
SCons Examples
205251
==============
206252

@@ -224,7 +270,7 @@ Before this script starts to generate any output, it checks whether the
224270
names of all defined examples are unique. Another important prerequisite
225271
is that for every example all the single ``scons_output`` blocks need
226272
to have a ``suffix`` attribute defined. These suffixes also have to be
227-
unique, within each example.
273+
unique, within each example, as this controls the ordering.
228274

229275
All example output files (``*.xml``) get written to the folder
230276
``doc/generated/examples``, together with all files defined via the
@@ -235,6 +281,11 @@ changes in the outputs after editing the docs:
235281
::
236282
git diff doc/generated/examples
237283

284+
Some of the changes in example text are phony: despite best
285+
efforts to eliminate system-specifics, sometimes they leak through.
286+
There is at least one example that gets the pathname to the
287+
build directory of the machine the example is generated on.
288+
238289
Note that these output files are not actually needed for editing the
239290
documents. When loading the User manual into an XML editor, you will
240291
always see the example's definition. Only when you create some output,

0 commit comments

Comments
 (0)