-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Dont reuse tempfiles when a target is built with an ActionList. #3801
Conversation
Actions lists with more than one action using ${TEMPFILE("TEMP FILE CONTENT")} should not use the same tempfile for different "TEMP FILE CONTENT". Therefore we cannot store the cmd_list in niether the target nor the source attributes since those are common for all actions. Reusing the same tempfile causes the same command to be invoked for all actions in the list. However, not resusing tempfiles will create unneeded tempfiles on strfunction invocation. This is better than producing incorrect results, but leaves the tempfile in a bad state.
…TEMPFILE-actionlist's SConsctruct in fixture dir
… target.attributes.tempfile_cmdlist[self.cmd] where self.cmd is the string in ${TEMPFILE('MY STRING')}
Hold off on review.. a few issues to sort. |
…tuple to hold it and using that as the key for tempfile_cmdlist
Ok.. that should do it, please review assuming appveyor and travis complet successfully. |
This seems like a more clever solution. Thanks for helping out with this! |
SCons/Platform/__init__.py
Outdated
if node is not None else None | ||
cmdlist = None | ||
|
||
if isinstance(self.cmd, list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isinstance
rather than is_List
? (consistency nit, nothing else). Other consistency nit is line 194 uses the = foo if bar else baz
form and this bit doesn't. Neither are important to fix, just noting.
Looks okay to my tired eyes. +1 |
This is a better fix than dropping saving the tempfile cmdlist which was proposed in PR #3553 which replaced PR #3140
Crediting Simon Tegelid with the fix as he's pointed out the issue and a way to fix it.
Contributor Checklist:
CHANGES.txt
(and read theREADME.rst
)