Skip to content

Remove dart:mirrors from package:collection test/wrapper_test.dart - #1027

Merged
kevmoo merged 2 commits into
mainfrom
collection-remove-mirrors
Oct 21, 2026
Merged

kevmoo merged 2 commits into
mainfrom
collection-remove-mirrors

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 21, 2026

Copy link
Copy Markdown
Member

Removes the dart:mirrors dependency from wrapper_test.dart and replaces the reflection-based assertions with explicit behavioral tests. Also removes the @teston('vm') restriction, allowing the wrapper tests to run on Chrome/Wasm as well.

@kevmoo
kevmoo requested a review from a team as a code owner October 21, 2026 21:54
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

PR Health

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/collection/benchmark/legacy_quicksort.dart

This check can be disabled by tagging the PR with skip-license-check.

Unused Dependencies ✔️
Package Status
collection ✔️ All dependencies utilized correctly.

For details on how to fix these, see dependency_validator.

This check can be disabled by tagging the PR with skip-unused-dependencies-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
collection Breaking 1.19.1 1.20.0-wip 1.20.0-wip ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Coverage ✔️
File Coverage

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check (for example, for non-user-visible changes when the package version is already at -wip).

@kevmoo
kevmoo requested a review from natebosch October 21, 2026 22:10
@kevmoo
kevmoo merged commit 04da676 into main Oct 21, 2026
22 checks passed
@kevmoo
kevmoo deleted the collection-remove-mirrors branch October 21, 2026 22:32
test('delegates to underlying list', () {
var base = <int>[1, 2, 3];
var wrapper = DelegatingList<int>(base);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not testing Iterable members.
Consider moving the iterable testing into a helper function that takes an iterable and a list of expected valeus, and call it both from the DelegatingIterable test and from the delegating set and list tests. (And maybe for .keys and .values of a DelegatingMap.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Followed up in #1028, sharing generic testIterable and testReadOnlySet helpers across DelegatingIterable, DelegatingList, DelegatingSet, DelegatingQueue, DelegatingMap (.keys/.values), MapKeySet, and MapValueSet.

kevmoo added a commit to kevmoo/kevmoo_skills that referenced this pull request Oct 29, 2026
…#169)

Hardens the Dart code-review rubric against primary-constructor false
positives and reflection/test-refactor blind spots, locks Deep-review
and cold-read subagents to read-only file access, and keeps standalone
personal fork worktrees anchored on `origin`.

- **Dart 3.14+ & test-refactor rubric coverage**: Stamps
primary-constructor dismissal guidance in `skills/pr-review/RUBRIC.md`
and adds checks for `dart:mirrors` -> `package:analyzer` drift-test
migrations
([google/protobuf.dart#1104](google/protobuf.dart#1104)),
wrapper subtype contract helpers
([dart-lang/core#1027](dart-lang/core#1027)),
`flutter test --platform=chrome` entrypoint bundling vs.
`@TestOn('vm')`, and `setUp` fixture variable shadowing
([dart-lang/shelf#547](dart-lang/shelf#547)).
- **Strict read-only subagents**: Requires tool-restricted read-only
subagents with no shell execution in `skills/pr-review/SKILL.md`
(`Review Mode: Deep`) and `skills/cold-read/SKILL.md` so subagents never
re-run `dart test`, poll tasks, or shell out to `python3`/`wc`.
- **Personal fork base-branch resolution**: Updates
`skills/new-worktree/SKILL.md` to prefer `origin` on standalone
`~/github/<owner>/<repo>` checkouts (unless
`remote.upstream.gh-resolved` is `base`) while preserving `upstream`
preference on `~/github/<repo>` contribution checkouts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants