Skip to content
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

cfe_locate_implementation_file doesn't test prefixes that match within entire path #2493

Closed
skliper opened this issue Jan 8, 2024 · 0 comments · Fixed by #2494
Closed

cfe_locate_implementation_file doesn't test prefixes that match within entire path #2493

skliper opened this issue Jan 8, 2024 · 0 comments · Fixed by #2494
Assignees

Comments

@skliper
Copy link
Contributor

skliper commented Jan 8, 2024

Is your feature request related to a problem? Please describe.
Prefix exclusion dependence on entire path is unexpected, since much of it is out of scope of the defs directory:

# A target-specific prefixed filename gets priority over a direct filename match
# But do not include this variant if the prefix is already part of the basedir
foreach (PREFIX ${LOCATEIMPL_ARG_PREFIX})
if (NOT "${BASEDIR}" MATCHES "/${PREFIX}/")
list(APPEND IMPL_SEARCH_PATH "${BASEDIR}${PREFIX}_${FILE_NAME}")
endif()
endforeach()

Describe the solution you'd like
Only match within relative directory

Describe alternatives you've considered
Could just remove the test, an extra check for matching (even if there's already a subdir) shouldn't hurt

Additional context
nasa/cFS#709

Requester Info
Jacob Hageman - NASA/GSFC

Ping @embeddedpenguin

@skliper skliper self-assigned this Jan 8, 2024
dzbaker added a commit that referenced this issue Jan 18, 2024
Fix #2493, Relative prefix exclusion for cfe implementation file search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant