Repository navigation
[pubspec_parse] Add platforms field to Pubspec - #2566
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for the platforms field in the Pubspec class of the pubspec_parse package. This includes adding the field to the model, updating the generated JSON serialization logic, updating the package version and changelog to 1.7.0-wip, and adding corresponding unit tests for parsing and serialization. There are no review comments, and I have no additional feedback to provide.
# Conflicts: # pkgs/pubspec_parse/CHANGELOG.md
kevmoo
approved these changes
Oct 19, 2026
kevmoo
requested review from
a team,
kevmoo,
liamappelbe and
srawlins
as code owners
October 19, 2026 17:39
scheglov
reviewed
Oct 19, 2026
| /// `web` and `windows`. Values are currently always `null`. | ||
| /// | ||
| /// See https://dart.dev/tools/pub/pubspec#platforms. | ||
| final Map<String, dynamic>? platforms; |
Contributor
There was a problem hiding this comment.
Use Object? instead of dynamic, so that you have to check what value you have, instead of blindly asking anything.
scheglov
approved these changes
Oct 19, 2026
copybara-service Bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Oct 20, 2026
tools (https://github.com/dart-lang/tools/compare/f6c7a2d..4d7715a): 4d7715ac Mon Oct 19 16:09:30 2026 -0700 Kevin Moore Replace `@dart-lang/dart-bat` with `@dart-lang/dart-ecosystem-team` in `CODEOWNERS` (dart-lang/tools#2697) a22c558c Tue Oct 20 06:56:10 2026 +0900 YeungKC [markdown] Check the first character before inline syntax regexes (dart-lang/tools#2695) c57bde49 Mon Oct 19 14:40:39 2026 -0700 dart-ecosystem-bot[bot] [boring] Update BoringSSL to 64188f17 (dart-lang/tools#2692) 7a4ea6f8 Tue Oct 20 00:09:47 2026 +0300 Hasan Armoush [pubspec_parse] Expose version constraint on PathDependency (dart-lang/tools#2581) 85e03753 Mon Oct 19 22:41:32 2026 +0200 Lukas Klingsbo [pubspec_parse] Add hooks field to Pubspec (dart-lang/tools#2568) 13139ec6 Mon Oct 19 22:28:47 2026 +0200 Lukas Klingsbo [pubspec_parse] Add false_secrets field to Pubspec (dart-lang/tools#2567) 462d92bf Mon Oct 19 21:56:25 2026 +0200 Lukas Klingsbo [pubspec_parse] Add platforms field to Pubspec (dart-lang/tools#2566) TEST=ci Change-Id: I106b05a08a7395f72e01a86a952abd41f4630831 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/566840 Commit-Queue: Kevin Moore <kevmoo@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
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.
Adds the
platformsfield toPubspec, see https://dart.dev/tools/pub/pubspec#platforms.The field is parsed as a
Map<String, dynamic>?, mirroring how thefluttersection is exposed, since the pubspec format declares platforms as a map withnullvalues (android:,ios:, and so on). It is included inPubspec.toJsonand covered by parsing, error, lenient, and round-trip tests.Follow-up to #2565. Each new field is in its own PR to keep them easy to review.