Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-35792: Check config existence before making it a dependency. #110

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/lsst/sconsUtils/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ def __call__(self, env, config):
action="doxygen %s" % pipes.quote(outConfigNode.abspath))
for path in self.outputPaths:
env.Clean(doc, path)
env.Depends(doc, config)
self.results.extend(config)
if os.path.exists(config):
env.Depends(doc, config)
self.results.extend(config)
Copy link
Member

@kfindeisen kfindeisen Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to understand this change for DM-35793, and I've managed to get very confused.

At first glance, this looks like a shadowing problem (config refers to two different objects over the lifetime of the function), but on second thought the original code makes a lot more sense.

At this point, config is a Command object that, if the doxygen.conf.in file is missing, has a target (doxygen.conf) but no source. So it seems strange that calling env.Depends on this object would introduce a dependency on doxygen.conf.in when the object appears to have been constructed to not know about it. Instead, the new code looks like it avoids creating doxygen.conf entirely, which I assume is still needed to get the right dependencies (tag files), base.inc setttings, etc.

Am I missing something?

self.results.extend(doc)
return self.results

Expand Down