Repository navigation
Dont reuse tempfiles when a target is built with an ActionList. - #3801
Merged
Merged
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')}
Contributor
Author
|
Hold off on review.. a few issues to sort. |
…tuple to hold it and using that as the key for tempfile_cmdlist
Contributor
Author
|
Ok.. that should do it, please review assuming appveyor and travis complet successfully. |
Contributor
|
This seems like a more clever solution. Thanks for helping out with this! |
mwichmann
reviewed
Sep 21, 2020
mwichmann
reviewed
Sep 21, 2020
| if node is not None else None | ||
| cmdlist = None | ||
|
|
||
| if isinstance(self.cmd, list): |
Collaborator
There was a problem hiding this comment.
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.
Collaborator
|
Looks okay to my tired eyes. +1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)