Skip to content

Fix the second Value() example in the manpage - #4918

Merged
bdbaddog merged 2 commits into
SCons:masterfrom
rawsun007:doc-value-example
Oct 11, 2026
Merged

bdbaddog merged 2 commits into
SCons:masterfrom
rawsun007:doc-value-example

Conversation

@rawsun007

Copy link
Copy Markdown
Contributor

Fixes #4499.

The second Value() example never ran its builder, for two reasons. Value(output) wraps the existing Value Node in a new Value Node instead of using it, so the builder would have written into a throwaway Node. And nothing depended on the target: the default target . only reaches filesystem Nodes, so a Value target on its own is never built. This change passes the Nodes directly and adds a second builder that writes the updated Value to output.txt, following the pattern in test/Value/Value.py. It also removes the TODO comment.

I copied the example block out of Environment.xml into an SConstruct and ran it with scripts/scons.py. output.txt contains after, a second run is up to date, and changing 'after' rebuilds it. bin/docs-validate.py passes.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

No test was added, because this change only touches a manpage example. test/Value/Value.py already covers the same builder pattern.

Written by Claude Code (Claude Opus 5.5) under my account, as the Assisted-by: trailer says. It is a fix for the issue above, not something found by a code audit.

🤖 Generated with Claude Code

The example passed Value(output) and Value(input) to the builder, which
wraps each Node in a new Value instead of using it, and nothing depended
on the target, so the builder never ran. Use the Nodes directly and
write the updated Value to a file. Fixes SCons#4499.

Assisted-by: Claude Opus 5.5
Signed-off-by: Roshan Ramani <roshanramani.dev@gmail.com>
@mwichmann

Copy link
Copy Markdown
Collaborator

Thanks for pitching in. We have a fairly elaborate system for describing, and then running and capturing output from examples, with the idea they won't sit there broken - in the User Guide. That's not used in the manpage so there's a risk examples either don't work from the start, or "rot" so they stop working. Tried to validate some manual, thus the comment I left on that example. If it passes review, it will be nice to have that one working.

@bdbaddog
bdbaddog merged commit 7140f65 into SCons:master Oct 11, 2026
1 check was pending
@mwichmann mwichmann added this to the NextRelease milestone Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Second Value node example in manpage doesn't work

3 participants