-
Notifications
You must be signed in to change notification settings - Fork 419
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
Avoid ambiguity warning for bundled modules #25415
Conversation
Adjusts getExistingFileInModuleSearchPath to avoid issuing an ambiguity warning for CHPL_LOCALE_MODEL=gpu where it is intentional that modules/internal/localeModels/gpu/ChapelGpuSupport.chpl is used instead of the fallback modules/internal/ChapelGpuSupport.chpl --- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
--- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
--- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
--- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
--- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
--- Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
dirPath.push_back('/'); | ||
|
||
// now, check that 'dirPath' is a prefix or equal to 'path' | ||
return dirPath.size() <= path.size() && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use llvm::sys::path::starts_with
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to add a TODO comment but I am short on time at the moment and so I'm going to merge this without it.
Follow-up to PR #25125.
Adjusts getExistingFileInModuleSearchPath to avoid issuing an ambiguity warning for CHPL_LOCALE_MODEL=gpu where it is intentional that
is used instead of the fallback
It does that by fixing getExistingFileInModuleSearchPath to avoid the warning if both are bundled modules. However, for this to work in a straightforward manner, I needed also to improve some of the related code, which was not handling cases such as "." being a module search path (because it was using prefix checks rather than something file-path aware).
Reviewed by @dlongnecke-cray - thanks!