Skip to content

Commit 3d536f6

Browse files
committed
Deprecate sconsign-per-directory mode
This was the default mode prior to SCons 1.0, has long been discouraged but not yet formally marked deprecated. Signed-off-by: Mats Wichmann <mats@linux.com>
1 parent 9d4a92d commit 3d536f6

File tree

5 files changed

+46
-20
lines changed

5 files changed

+46
-20
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
5959
Google style.
6060
- Additional small tweaks to Environment.py type hints, fold some overly
6161
long function signature lines, and some linting-insipired cleanups.
62+
- Deprecated using signature-file-per-directory (aka old-style SConsign)
63+
via the SConsignFile(name=None) call.
6264

6365

6466
RELEASE 4.10.1 - Sun, 16 Nov 2025 10:51:57 -0700

RELEASE.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ DEPRECATED FUNCTIONALITY
2525

2626
- Deprecated Python 3.7 & 3.8 support.
2727

28+
- Deprecated using signature-file-per-directory (aka old-style SConsign)
29+
via the SConsignFile(name=None) call.
30+
2831
CHANGED/ENHANCED EXISTING FUNCTIONALITY
2932
---------------------------------------
3033

SCons/Environment.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,16 +2861,26 @@ def Scanner(self, *args, **kw) -> SCons.Scanner.ScannerBase:
28612861
def SConsignFile(
28622862
self, name: str | None = "", dbm_module: ModuleType | None = None,
28632863
) -> None:
2864-
"""Specify the name of the signature database to use for this environment.
2864+
"""Specify the base name of the signature database.
28652865
2866-
For historical reasons, if *name* is ``None``, the database is
2867-
stored as one file per directory, rather than a single database
2868-
for the project.
2866+
If *name* is not specified, ``.sconsign`` is used as the base name.
2867+
The actual name *may* also include an indicator of the hash algorithm
2868+
used to calculate the signatures, and a suffix indicating the
2869+
storage format. If the hash algorithm is set via
2870+
:meth:`~SCons.Script.Main.SetOption`, that setting must occur
2871+
before this function is called.
28692872
2870-
If *dbm_module* is specified, it is the database module to use
2871-
(you need to pass the module object, not a string name).
2873+
If *dbm_module* is specified, it gives the database module to use.
2874+
The parameter must be an actual module object, not a string name.
28722875
The module must follow the Python Database API specification
2873-
described in PEP 249.
2876+
described in PEP 249. The defaut is :mod:`SCons.dblite`.
2877+
2878+
For historical reasons, if *name* is ``None``, the signatures are
2879+
stored as one file per directory, rather than in a single project-wide
2880+
database.
2881+
2882+
.. deprecated:: NEXT_RELEASE
2883+
The signature-file-per-directory mode is deprecated.
28742884
"""
28752885
if name is not None:
28762886
if not name:

SCons/Environment.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,10 +3247,16 @@ in a separate
32473247
file in each directory,
32483248
not in a single combined database file.
32493249
This is a backwards-compatibility measure to support
3250-
what was the default behavior
3250+
the behavior that was the default
32513251
prior to &SCons; 0.97 (i.e. before 2008).
3252-
Use of this mode is discouraged and may be
3253-
deprecated in a future &SCons; release.
3252+
Use of this mode is deprecated and should
3253+
not be used in new projects.
3254+
</para>
3255+
3256+
<para>
3257+
<emphasis>Deprecated since version NEXT_RELEASE</emphasis>:
3258+
the signature-file-per-directory mode is deprecated
3259+
and will be removed in a future release.
32543260
</para>
32553261

32563262
<para>

doc/man/sconsign.xml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!--
43
SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
54
SPDX-License-Identifier: MIT
5+
SPDX-FileType: DOCUMENTATION
6+
7+
This file is processed by the bin/SConsDoc.py module.
68
-->
79

810
<!DOCTYPE reference [
@@ -57,26 +59,24 @@ individual dependency entries are printed in the following format:</para>
5759

5860
<screen>
5961
depfile: content-signature timestamp length
60-
implicit-dependency-1: content-signature timestamp length
61-
implicit-dependency-2: content-signature timestamp length
62+
implicit-dependency-1: content-signature timestamp size
63+
implicit-dependency-2: content-signature timestamp size
6264
...
6365
build-signature [action-string]
6466
</screen>
6567

6668
<para>
6769
<emphasis role="bold">content-signature</emphasis>
68-
is the hash of the file's contents (<firstterm>csig</firstterm>)
69-
and <emphasis role="bold">build-signature</emphasis>
70+
(displayed as <firstterm>csig</firstterm> in verbose mode)
71+
is the hash of the file's contents.
72+
<emphasis role="bold">build-signature</emphasis>
7073
is the hash of the command line or other build action
71-
used to build a target (<firstterm>bactsig</firstterm>).
74+
used to build a target.
7275
If provided,
7376
<emphasis role="bold">action-string</emphasis>
7477
is the unexpanded string action or the function called.
7578
<emphasis role="bold">None</emphasis>
76-
is printed in place of any missing timestamp,
77-
<emphasis role="bold">csig</emphasis>,
78-
or <emphasis role="bold">bactsig</emphasis>
79-
values for any entry or any of its dependencies.
79+
is printed in place of any missing timestamp or signature.
8080
If the entry has no implicit dependencies,
8181
or no build action,
8282
the corresponding lines are omitted.
@@ -126,6 +126,11 @@ arguments, the name
126126
is assumed by default.
127127
</para>
128128

129+
<para>
130+
<emphasis>Deprecated since version NEXT_RELEASE</emphasis>:
131+
The old-style signature-file-per-directory mode is deprecated.
132+
</para>
133+
129134
</refsect1>
130135

131136
<refsect1 id='options'>

0 commit comments

Comments
 (0)