Repository navigation
Conversation
Rename the Rust list element `virtual_list()` / `VirtualList` to `list()` / `List`, the name TSX already uses (`<List>`). The old names stay as deprecated aliases so existing apps keep compiling. Agent: rust-maintainer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Second batch of the pre-0.9.0 naming alignment (after #4252): the Rust list element now has the same name as the TSX one.
virtual_list(count, row)list(count, row)<List>VirtualListListnsh_core::preludeandnsh_core::elementhad no otherList/listitem, so nothing collides. Internal names (ElKind::VirtualList,VirtualListEl, thevirtual_listmodule) are unchanged.Migration
Old names still compile with a deprecation warning (
#[deprecated(since = "0.9.0")]):If a local variable named
listis in scope (for examplelet list = element_ref();), it shadows the function; callnsh_core::element::list(..)there or rename the variable. Five call sites in this repo needed that.Docs updated in English and zh-CN (
website/),docs/dev, and thenshskill references.Testing
cargo check -p nsh-core -p nsh-base -p nsh-testing -p nsh-engine -p gallery-native -p tasks-rs --tests: 0 warnings, 0 errors (Linux).cargo test -p nsh-core --lib -- unit_scan list: 204 passed.cargo test -p nsh-engine --test engine rust_lists: 5 passed.cargo test -p nsh-base --test base scrollbar: 18 passed.nsh-platform-macostests (two test files changed); left to CI.Risk
Public Rust API rename, source-compatible via deprecated aliases. Apps with
#![deny(warnings)]will fail on the deprecation until they migrate. No behaviour change.How to revert
Revert this PR.
🤖 Noop (rust-maintainer) · Opus 5.5 acting for @huacnlee
🤖 Generated with Claude Code