-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update package:collection for the new strict_top_level_inference
lint
#735
base: main
Are you sure you want to change the base?
Conversation
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs.
Coverage
|
File | Coverage |
---|---|
pkgs/collection/lib/src/unmodifiable_wrappers.dart | 💔 75 % ⬇️ 3 % |
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
.
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 symbols |
---|
License Headers ✔️
// Copyright (c) 2024, 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.
From the new
That's from https://github.com/dart-lang/core/blob/main/pkgs/collection/lib/src/unmodifiable_wrappers.dart#L199: /// Throws an [UnsupportedError];
/// operations that change the map are disallowed.
set first(_) => _throw();
/// Throws an [UnsupportedError];
/// operations that change the map are disallowed.
set last(_) => _throw(); Here, I don't know what purpose The next set of issues:
are from https://github.com/dart-lang/core/blob/main/pkgs/collection/test/extensions_test.dart#L2228: Never unreachable([_, __, ___]) => fail('Unreachable'); Perhaps we should not include wildcard variables in the lint? cc @lrhn, @natebosch, @srawlins |
The setters should just be removed from the Other than that, we could exclude wildcards, but since the lint should only trigger if you don't inherit a type, I think the method should actually be explicit about its types. Or, more relevantly, since it's in the |
|
||
/// Throws an [UnsupportedError]; | ||
/// operations that change the map are disallowed. | ||
set first(_) => _throw(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this is breaking (statically) to remove these?
We might want to just deprecate them 🤷♂️ . But should at least verify we don't know of any usages (I would expect none though since nobody really uses this type directly in APIs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to deprecate first and check for any real usage asynchronously.
strict_top_level_inference
lint
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.