mut/ref/own and borrow checking#1236
Conversation
# Conflicts: # crates/codegen/tests/fixtures/method_call.snap # crates/codegen/tests/fixtures/name_collisions.snap # crates/codegen/tests/fixtures/newtype_field_mut_method_call.snap # crates/codegen/tests/fixtures/newtype_word_mut_method_call.snap # crates/hir/src/analysis/ty/ty_check/stmt.rs # crates/mir/tests/fixtures/mixed_trait_type_effects.mir.snap # ingots/core/src/bytes.fe
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03d203f4ee
ℹ️ 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".
| for err in output.internal_errors { | ||
| tracing::debug!(target: "lsp", "MIR diagnostics internal error: {err}"); | ||
| } |
There was a problem hiding this comment.
Surface MIR internal errors as check failures
mir_diagnostics_for_ingot discards collect_mir_diagnostics(...).internal_errors after a debug log and returns only CompleteDiagnostics, so callers like fe check can report success even when MIR lowering failed (for example on MirLowerError::Unsupported) and later compilation paths will fail. Internal MIR errors need to be promoted to emitted diagnostics or treated as hard errors here to avoid false-negative checks.
Useful? React with 👍 / 👎.
| let mir_output = collect_mir_diagnostics(db, top_mod, MirDiagnosticsMode::CompilerParity); | ||
| if !mir_output.diagnostics.is_empty() { |
There was a problem hiding this comment.
Fail single-file check when MIR lowering has internal errors
In single-file mode, check_single_file only checks mir_output.diagnostics and ignores mir_output.internal_errors, so MIR lowering failures can be silently dropped and the command can continue as if the file is clean. This creates a mismatch where fe check passes but downstream compile/codegen still fails; the internal error list should be surfaced and counted as an error.
Useful? React with 👍 / 👎.
| [profile.test.package.sonatina-codegen] | ||
| opt-level = 3 | ||
| [profile.dev.package] | ||
| revm = { opt-level = 3 } |
There was a problem hiding this comment.
you can also increase the number of parallel jobs for fe test, right now I think I set it to 4 because 32 was destroying my computer
No description provided.