Skip to content

Commit

Permalink
Merge branch 'master' into scanner-macros
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbaddog authored Nov 26, 2024
2 parents 95f6dab + f1723d8 commit ff8c116
Show file tree
Hide file tree
Showing 42 changed files with 342 additions and 355 deletions.
13 changes: 12 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
detect and upgrade legacy type-hint syntax.
- Removed "SCons.Util.sctyping.py", as the functionality can now be substituted
via top-level `from __future__ import annotations`.
- Implemented type hints for Nodes.

From William Deegan:
- Update ninja tool to use ninja.BIN_DIR to find pypi packaged ninja binary.
python ninja package version 1.11.1.2 changed the location and previous
logic no longer worked.
- Added TestSCons.NINJA_BINARY to TestSCons to centralize logic to find ninja binary
- Refactored SCons.Tool.ninja -> SCons.Tool.ninja_tool, and added alias so
env.Tool('ninja') will still work. This avoids conflicting with the pypi module ninja.

From Alex James:
- On Darwin, PermissionErrors are now handled while trying to access
Expand All @@ -95,7 +104,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
From Keith F Prussing:
- Added support for tracking beamer themes in the LaTeX scanner.

From rico-chet:
From Alex Thiessen:
- Many grammatical and spelling fixes in the documentation.

From Mats Wichmann:
Expand Down Expand Up @@ -153,6 +162,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- The C scanner now does (limited) macro replacement on the values in
CPPDEFINES, to improve results of conditional source file inclusion
(issue #4523).
- Make sure unknown variables from a Variables file are recognized
as such (issue #4645)


RELEASE 4.8.1 - Tue, 03 Sep 2024 17:22:20 -0700
Expand Down
14 changes: 14 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ FIXES
- The C scanner now does (limited) macro replacement on the values in
CPPDEFINES, to improve results of conditional source file inclusion
(issue #4523).

- Make sure unknown variables from a Variables file are recognized
as such (issue #4645)

- Update ninja tool to use ninja.BIN_DIR to find pypi packaged ninja binary.
python ninja package version 1.11.1.2 changed the location and previous
logic no longer worked.

IMPROVEMENTS
------------
Expand Down Expand Up @@ -195,6 +202,13 @@ DEVELOPMENT
- Removed "SCons.Util.sctyping.py", as the functionality can now be substituted
via top-level `from __future__ import annotations`.

- Implemented type hints for Nodes.

- Added TestSCons.NINJA_BINARY to TestSCons to centralize logic to find ninja binary

- Refactored SCons.Tool.ninja -> SCons.Tool.ninja_tool, and added alias so env.Tool('ninja')
will still work. This avoids conflicting with the pypi module ninja.

Thanks to the following contributors listed below for their contributions to this release.
==========================================================================================
.. code-block:: text
Expand Down
30 changes: 15 additions & 15 deletions SCons/Node/NodeTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,13 @@ def test_push_to_cache(self) -> None:
"""Test the base push_to_cache() method"""
n = SCons.Node.Node()
r = n.push_to_cache()
assert r is None, r
assert not r, r

def test_retrieve_from_cache(self) -> None:
"""Test the base retrieve_from_cache() method"""
n = SCons.Node.Node()
r = n.retrieve_from_cache()
assert r == 0, r
assert not r, r

def test_visited(self) -> None:
"""Test the base visited() method
Expand Down Expand Up @@ -711,30 +711,30 @@ def test_set_always_build(self) -> None:
node = SCons.Node.Node()
node.set_always_build()
assert node.always_build
node.set_always_build(3)
assert node.always_build == 3
node.set_always_build(3) # type: ignore[arg-type]
assert node.always_build

def test_set_noclean(self) -> None:
"""Test setting a Node's noclean value
"""
node = SCons.Node.Node()
node.set_noclean()
assert node.noclean == 1, node.noclean
node.set_noclean(7)
assert node.noclean == 1, node.noclean
node.set_noclean(0)
assert node.noclean == 0, node.noclean
node.set_noclean(None)
assert node.noclean == 0, node.noclean
assert node.noclean, node.noclean
node.set_noclean(7) # type: ignore[arg-type]
assert node.noclean, node.noclean
node.set_noclean(0) # type: ignore[arg-type]
assert not node.noclean, node.noclean
node.set_noclean(None) # type: ignore[arg-type]
assert not node.noclean, node.noclean

def test_set_precious(self) -> None:
"""Test setting a Node's precious value
"""
node = SCons.Node.Node()
node.set_precious()
assert node.precious
node.set_precious(7)
assert node.precious == 7
node.set_precious(7) # type: ignore[arg-type]
assert node.precious

def test_set_pseudo(self) -> None:
"""Test setting a Node's pseudo value
Expand All @@ -750,14 +750,14 @@ def test_exists(self) -> None:
"""
node = SCons.Node.Node()
e = node.exists()
assert e == 1, e
assert e, e

def test_exists_repo(self) -> None:
"""Test evaluating whether a Node exists locally or in a repository.
"""
node = SCons.Node.Node()
e = node.rexists()
assert e == 1, e
assert e, e

class MyNode(SCons.Node.Node):
def exists(self) -> str:
Expand Down
Loading

0 comments on commit ff8c116

Please sign in to comment.