You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR adds Rust and Zig WASM modules demonstrating recovered division errors and C++ exceptions, integrates them into builds and browser tests, expands C++ tooling, changes Zig data hashing, and makes upstream release-asset checks fail closed.
We reviewed changes in a83a08d...2db5674 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
The reason will be displayed to describe this comment to others. Learn more.
Array is implicitly decaying into a pointer
Array-to-pointer decay refers to the automatic conversion of an array to a pointer to its first element. This means that when an array is used in an expression that expects a pointer, the name of the array is converted to a
The reason will be displayed to describe this comment to others. Learn more.
Array is implicitly decaying into a pointer
Array-to-pointer decay refers to the automatic conversion of an array to a pointer to its first element. This means that when an array is used in an expression that expects a pointer, the name of the array is converted to a
The reason will be displayed to describe this comment to others. Learn more.
Array is implicitly decaying into a pointer
Array-to-pointer decay refers to the automatic conversion of an array to a pointer to its first element. This means that when an array is used in an expression that expects a pointer, the name of the array is converted to a
The reason will be displayed to describe this comment to others. Learn more.
inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead
The use of deprecated C++ headers such as signal.h and assert.h is considered an antipattern, as they are not part of the C++ standard library anymore and have been replaced by their C++ equivalents.
The reason will be displayed to describe this comment to others. Learn more.
inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead
The use of deprecated C++ headers such as signal.h and assert.h is considered an antipattern, as they are not part of the C++ standard library anymore and have been replaced by their C++ equivalents.
The reason will be displayed to describe this comment to others. Learn more.
inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead
The use of deprecated C++ headers such as signal.h and assert.h is considered an antipattern, as they are not part of the C++ standard library anymore and have been replaced by their C++ equivalents.
The reason will be displayed to describe this comment to others. Learn more.
inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead
The use of deprecated C++ headers such as signal.h and assert.h is considered an antipattern, as they are not part of the C++ standard library anymore and have been replaced by their C++ equivalents.
The reason will be displayed to describe this comment to others. Learn more.
Array is implicitly decaying into a pointer
Array-to-pointer decay refers to the automatic conversion of an array to a pointer to its first element. This means that when an array is used in an expression that expects a pointer, the name of the array is converted to a
Duplicated 3-pass clang-tidy logic between clang-tidy-check and clang-tidy-fix.
The two tasks are identical apart from --fix, doubling future maintenance/drift risk (e.g. the -fno-rtti issue above would need fixing in two places). Consider factoring the shared pass logic into a small script under utilities/ invoked with a --fix toggle by both tasks.
Based on learnings, "Do not create a scripts/ directory or loose scripts; put simple scripts in mise tasks and substantial tools under utilities/ with documentation."
Also applies to: 96-105
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.mise/config.zig.toml around lines 79 - 88, Factor the duplicated three-pass
clang-tidy logic from the clang-tidy-check and clang-tidy-fix mise tasks into a
documented utility under utilities/. Make the utility accept a --fix toggle and
apply it consistently to all passes, then update both tasks to invoke the shared
utility while preserving their current behavior and flags.
Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.mise/config.zig.toml:
- Around line 79-88: Update the wasm clang-tidy invocation in the run script so
`-fno-rtti` is applied only to C++ sources, not the `*.c` inputs. Split the `git
ls-files`/`xargs` processing for `services/ws-modules/zig-*/src/*.c` and
`*.cpp`, preserving the shared wasm flags while adding `-fno-rtti` only to the
C++ invocation.
In `@services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js`:
- Around line 38-127: Stop the poll loop when the worker completes or errors.
Add a shared stop flag checked at the start of poll(), and set it before
terminating and resolving/rejecting in worker.onmessage and worker.onerror;
preserve the existing completion result handling.
---
Nitpick comments:
In @.mise/config.zig.toml:
- Around line 79-88: Factor the duplicated three-pass clang-tidy logic from the
clang-tidy-check and clang-tidy-fix mise tasks into a documented utility under
utilities/. Make the utility accept a --fix toggle and apply it consistently to
all passes, then update both tasks to invoke the shared utility while preserving
their current behavior and flags.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
Push a commit to this branch (recommended)
Create a new PR with the fixes
ℹ️ Review info⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 05067704-9812-4d14-9748-81e4684da490
📥 Commits
Reviewing files that changed from the base of the PR and between a83a08d and 78e019a.
#!/bin/bashset -euo pipefail
python3 - <<'PY'from pathlib import Pathfor path, start, end in [ (Path('.mise/config.zig.toml'), 70, 110), (Path('config/clang-tidy.yaml'), 1, 160),]: print(f"\n== {path} ({start}-{end}) ==") with path.open() as f: for i, line in enumerate(f, 1): if start <= i <= end: print(f"{i:4d}: {line}", end="") elif i > end: breakprint("\n== matching zig module sources ==")for p in sorted(Path('services/ws-modules').glob('zig-*/src/*')): if p.suffix in {'.c', '.cpp'}: print(p)PY
Repository: edge-toolkit/core
Length of output: 4244
🌐 Web query:
Clang -fno-rtti C input unused argument warning warnings as errors driver
💡 Result:
In Clang, the "argument unused during compilation" message is a driver-level diagnostic controlled by the -Wunused-command-line-argument flag [1]. When you use -Werror, this warning is promoted to an error [2][1]. To manage or suppress this error, you can use the following methods: 1. Use -Qunused-arguments: This flag instructs the Clang driver to suppress warnings about unused command-line arguments entirely [3][4]. This is often the simplest approach if you want to silence these messages globally [2]. 2. Use -Wno-unused-command-line-argument: This explicitly disables the unused command-line argument diagnostic [2]. 3. Downgrade to a warning: If you are using -Werror globally but want to treat this specific diagnostic as a warning, you can pass -Wno-error=unused-command-line-argument [2]. This ensures the driver still reports the issue but does not halt the compilation [2]. 4. Selective suppression: For more granular control, the driver provides --start-no-unused-arguments and --end-no-unused-arguments, which can be wrapped around specific flags that are known to be unused in certain contexts (e.g., flags that only apply to linking but appear during compilation) [3][2]. Note that this diagnostic is intentionally designed to catch misspellings or incompatible flags, as Clang does not support all the command-line options found in other compilers like GCC [5]. Some flags may be annotated as TargetSpecific in newer Clang versions, which can elevate these warnings to errors automatically for certain targets [1].
Move -fno-rtti off the C inputs The wasm clang-tidy pass matches both *.c and *.cpp, but -fno-rtti is C++-only. With WarningsAsErrors: "*", the C invocation can fail on services/ws-modules/zig-data1/src/util.c. Split the glob or pass that flag only to *.cpp.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.mise/config.zig.toml around lines 79 - 88, Update the wasm clang-tidy
invocation in the run script so `-fno-rtti` is applied only to C++ sources, not
the `*.c` inputs. Split the `git ls-files`/`xargs` processing for
`services/ws-modules/zig-*/src/*.c` and `*.cpp`, preserving the shared wasm
flags while adding `-fno-rtti` only to the C++ invocation.
Once worker.onmessage sees done and resolves/rejects, nothing halts the poll loop: ctrl[0] stays 0, so poll() keeps rescheduling itself via setTimeout(poll, 0) indefinitely, busy-spinning the main thread until page teardown. Add a stop flag flipped on completion/error.
‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
reject(newError("zig-except1: run() returned "+e.data.ret));
}
}
};
worker.onerror=(e)=>{
running=false;
worker.terminate();
reject(e);
};
// The worker resolves its own wasm URL from import.meta.url; only the shared buffer crosses the boundary.
worker.postMessage({ sab });
poll();
});
}
🧰 Tools🪛 ast-grep (0.44.1)
[warning] 39-39: Avoid using the initial state variable in setState
Context: setTimeout(poll, 0)
Note: [CWE-710] Improper Adherence to Coding Standards. Security best practice.
(setstate-same-var)
[warning] 104-104: Avoid using the initial state variable in setState
Context: setTimeout(poll, 0)
Note: [CWE-710] Improper Adherence to Coding Standards. Security best practice.
(setstate-same-var)
🪛 GitHub Check: Codacy Static Code Analysis
[warning] 38-38: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L38
ES2015 arrow function expressions are forbidden.
[warning] 38-38: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L38
ES2015 block-scoped variables are forbidden.
[warning] 38-38: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L38
Function must end with a return statement, so that it doesn't return undefined
[warning] 38-38: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L38
Method poll has 80 lines of code (limit is 50)
[notice] 38-38: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L38
Method poll has a cyclomatic complexity of 16 (limit is 10)
[warning] 39-39: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L39
ES2017 'Atomics' class is forbidden.
[warning] 41-41: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L41
Return statement must return an explicit value, so that it doesn't evaluate to undefined
[warning] 44-44: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L44
ES2015 block-scoped variables are forbidden.
[warning] 44-44: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L44
ES2017 'Atomics' class is forbidden.
[warning] 45-45: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L45
ES2015 block-scoped variables are forbidden.
[warning] 45-45: services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js#L45
ES2017 'Atomics' class is forbidden.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@services/ws-modules/zig-except1/pkg/et_ws_zig_except1.js` around lines 38 -
127, Stop the poll loop when the worker completes or errors. Add a shared stop
flag checked at the start of poll(), and set it before terminating and
resolving/rejecting in worker.onmessage and worker.onerror; preserve the
existing completion result handling.
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
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 by CodeRabbit
New Features
Bug Fixes
Documentation