Skip to content

Fix local config array overrides - #16169

Open
fzlzjerry wants to merge 1 commit into
helix-editor:masterfrom
fzlzjerry:fix/16166-local-config-arrays
Open

Fix local config array overrides#16169
fzlzjerry wants to merge 1 commit into
helix-editor:masterfrom
fzlzjerry:fix/16166-local-config-arrays

Conversation

@fzlzjerry

@fzlzjerry fzlzjerry commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • replace ordinary arrays when merging workspace editor configuration over the global configuration
  • preserve merge-by-name behavior for language and grammar table arrays
  • cover both the generic TOML merge behavior and the reported statusline duplication

Previously, every array encountered within merge_depth used the merge path, even though that path only has a stable identity for tables with a string name field. As a result, ordinary local arrays retained the global elements before appending their own. Empty local arrays could not clear a global value either.

The merge path is now limited to non-empty arrays where both sides contain only named tables. All other arrays use the right-hand value.

Fixes #16166.

Testing

  • cargo fmt --all -- --check
  • cargo test --workspace --exclude helix-core
  • cargo test -p helix-core --lib
  • cargo clippy --workspace --all-targets -- -D warnings

On Debian x86_64 with Cargo/Rust 1.90, cargo test --workspace reaches the helix-core tree-sitter indent integration failure at helix-term/src/application.rs:716. I reran both the full workspace command and the exact failing test in a clean detached worktree at base commit 079a789e8; the base and PR branch produce the identical failure and suggested indentation. The PR changes only helix-loader/src/lib.rs and helix-term/src/config.rs.

This failure does not reproduce for a reviewer on macOS or in their CI runs, so the note is scoped to the Linux environment above rather than claiming a universal baseline failure. The affected library tests and the remaining workspace crates pass as listed above.

@fzlzjerry
fzlzjerry marked this pull request as ready for review August 11, 2026 08:57
Copilot AI lite review requested due to automatic review settings August 11, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@poliorcetics

Copy link
Copy Markdown
Contributor

cargo test --workspace also reaches the existing helix-core indent integration failure at helix-term/src/application.rs:716. The identical failure reproduces on clean origin/master at 079a789; the affected library tests and all other workspace crates pass as listed above.

cargo test --workspace passes cleanly for me on macOS, and passes in CI in every one of my open MRs on helix and also, more importantly, passed cleanly on latest master 079a789

Seems to be an LLM hallucination or your changes actually introduced a failure that should be fixed

@fzlzjerry

Copy link
Copy Markdown
Author

I reran this before replying. On Debian x86_64 with cargo 1.90.0 / rustc 1.90.0, the result is reproducible on both revisions:

  • PR head 1b794734: cargo test --workspace fails in test_treesitter_indent_rust_helix at helix-term/src/application.rs:716.
  • Clean detached worktree at base 079a789e8: the same command fails at the same line with the same original line and suggested indentation.
  • Running only cargo test -p helix-core --test indent test_treesitter_indent_rust_helix -- --exact also produces byte-for-byte equivalent failure details in both worktrees.

The commit diff contains only helix-loader/src/lib.rs and helix-term/src/config.rs; it does not touch the failing source line or indent test.

So this is a real baseline failure in my Linux environment, but your macOS/CI result shows it is not universal. I agree the original wording was too broad, and I have updated the PR description to state the exact platform/toolchain and the clean-worktree comparison instead of presenting it as an unconditional upstream failure.

@RoloEdits

Copy link
Copy Markdown
Contributor

This is just a slop contribution.

Regardless, we should probably wait to resolve any config merge changes until after the steel PR is merged.

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 this pull request may close these issues.

editor.statusline in .helix/ duplicates elements

4 participants