Skip to content

Do not reuse tempfiles - #3553

Closed
simontegelid wants to merge 1 commit into
SCons:masterfrom
simontegelid:dont_reuse_tempfiles
Closed

simontegelid wants to merge 1 commit into
SCons:masterfrom
simontegelid:dont_reuse_tempfiles

Conversation

@simontegelid

@simontegelid simontegelid commented Feb 12, 2020 •

Copy link
Copy Markdown
Contributor

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 neither 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.

Accidentally closed PR #3140, but there is some relevant discussion in there.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated master/src/CHANGES.txt directory (and read the README.txt in that directory)
  • I have updated the appropriate documentation

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.
@bdbaddog

Copy link
Copy Markdown
Contributor

@simontegelid - I'm replacing this pull request with an alternate fix #3801

Please take a look at that PR and maybe try on your build and let me know if you see any issues with the fix.

@bdbaddog bdbaddog closed this Sep 21, 2020
@mwichmann mwichmann added the TEMPFILE Long-command-line handling with TEMPFILE label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TEMPFILE Long-command-line handling with TEMPFILE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants