Add backend API checks on CI#776
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3e7da03f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Check that the technology is not misused across the tasks (OpenMP allow usage of OpenMP API, but not TBB/std::thread, etc.)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 936f45623a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #776 +/- ##
==========================================
- Coverage 93.96% 93.82% -0.15%
==========================================
Files 15 15
Lines 514 486 -28
Branches 183 182 -1
==========================================
- Hits 483 456 -27
+ Partials 31 30 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return "".join(result) | ||
|
|
||
|
|
||
| def get_backend(path: Path) -> str | None: |
There was a problem hiding this comment.
tasks/<task>/common/** is not checked, so forbidden backend APIs can be hidden in shared helpers.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7d2e0730d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| without_comments = strip_comments(text) | ||
| without_literals = strip_literals(without_comments) | ||
| lines = { | ||
| False: without_comments.splitlines(), |
There was a problem hiding this comment.
Strip literals before include/pragma scans
Because patterns with strip_literals=False are run against without_comments, raw string contents are still scanned for line-anchored directives. In a seq/mpi/tbb/etc. task that keeps sample code or generated text in a raw string containing a line like #pragma omp parallel or #include <mpi.h>, this job reports a forbidden backend API even though the preprocessor never sees that directive; I reproduced this with a tasks/foo/seq/src/a.cpp raw string containing #pragma omp parallel. Use the literal-stripped text for these directive scans as well, or otherwise skip raw-string bodies while preserving real preprocessor lines.
Useful? React with 👍 / 👎.
Check that the technology is not misused across the tasks (OpenMP allow usage of OpenMP API, but not TBB/std::thread, etc.)