Fix #1351: expand include file paths in input loops - #1427
Open
mchamberland wants to merge 2 commits into
Open
Conversation
Apply egsExpandPath() when opening include file paths in addContentFromFile() and inline include file handling, matching behaviour of other egs++ file-path inputs. Document syntax in PIRS-898. Co-authored-by: Cursor <cursoragent@cursor.com>
…ar) substitution. Defer inlining when an include path contains loop variables, then open files via egsExpandPath once each iteration is expanded. Add a pegsless egs_app example input and ausgab include fragments for manual testing. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
include fileinlining when the path contains input-loop variables ($(name)), then open each file after loop substitution viaegsExpandPath()(builds on Expand environment variables in include files #934 / PR Fix #934: expand environment variables in include file paths #1425).egs_apppegsless example inputslab_include_loop.egsinpwith ausgab include fragments underinclude_loop_test/for manual testing.Fixes nrc-cnrc/EGSnrc#1351.
Test plan
libegsppandegs_appfrom$EGS_HOME-p):cd $EGS_HOME/egs_app && ./egs_app -i slab_include_loopProcessing input loop, pegsless cross sections, and bothdoseandtracksausgab objectsfailed to add content from include file .../$(obj).incMade with Cursor