Skip to content

1.0.1 bug fix for preprocessing extraction#1005

Merged
mvandervoord merged 2 commits intomasterfrom
bugfix/preprocessing_extraction
Jan 27, 2025
Merged

1.0.1 bug fix for preprocessing extraction#1005
mvandervoord merged 2 commits intomasterfrom
bugfix/preprocessing_extraction

Conversation

@mkarlesky
Copy link
Member

The best solution was both the simplest and most robust — comparing absolute file paths when deciding which sections of a preprocess file to extract.

  • Comment documentation clarified and expanded
  • Test cases expanded to better cover desired extraction and content to be ignored.

All tests pass and new prerelease is a avaialble.

Previously, extraction could in certain circumstances errouneously extract file contents belonging to included files having similar filenames to the target of extraction in preprocessor output line markers.

Solved by using Ruby’s File.expand_path() that ensures full absolute filepaths are considered in completion for matches.

Expanded and clarified comment documentation including link to relevant GCC preprocessor documentation.

Added test cases to clarify desired content extraction and content ignore behavior.
Opens and processes the preprocessed file output but provides the original source filepath to the extraction routine for proper filepath matching
@mvandervoord mvandervoord merged commit f565aa2 into master Jan 27, 2025
22 checks passed
@mvandervoord mvandervoord deleted the bugfix/preprocessing_extraction branch January 27, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants