Breaking change 51035: Change HttpProfileRequestRef.id type from String to int

160 views
Skip to first unread message

Dan Chevalier

unread,
Jan 17, 2023, 2:37:58 PM1/17/23
to anno...@dartlang.org
See discussion on breaking change: https://github.com/dart-lang/sdk/issues/51035

# Intent
- Change `HttpProfileRequestRef` to use `String` for it's `id` type.
- Change  `ext.dart.io.getHttpProfileRequest` to use `String` for the passed `id` (instead of `int`).

# Justification
flutter/DevTools runs on web, so it only has access to 52 bit `int`.
Using `String` to pass the `id` will avoid overflowing the `id`.

# Impact
These RPC calls were originally created for use with Devtools. I haven't been able to find any other internal uses of the RPC.

I'm unsure of how to check if any external customers depend on these.

# Mitigation
- Anyone uses of the `ext.dart.io.getHttpProfile` or `ext.dart.io.getHttpProfileRequest` VmService calls
  - may need to change the types of ids that they pass or receive.
- Uses of `HttpProfileRequestRef` or `HttpProfileRequest`
  - may need to change type of ids being passed or reveived
 
# Changes
To see the specific proposed changes see: https://dart-review.googlesource.com/c/sdk/+/279122

--
Dan Chevalier

Dart DevTools Software Developer

Dan Chevalier

unread,
Jan 19, 2023, 2:16:01 PM1/19/23
to Dart Announcements, Dan Chevalier
While testing these changes I found that the SocketStatics.id type should be changed from `int` to `String` as well.
I am going to include that change in this breaking change as well.

Dan Chevalier

unread,
Feb 6, 2023, 10:57:02 AM2/6/23
to Dart Announcements, Dan Chevalier
The change has now been landed from https://dart-review.googlesource.com/c/sdk/+/280020
Reply all
Reply to author
Forward
0 new messages