Skip to content

Conversation

@osa1
Copy link
Member

@osa1 osa1 commented Feb 5, 2025

Unmodifiable...View types were deprecated in favor of asModifiableViews members introduced in SDK 3.3.0.

These types are now removed, so the protobuf package tests can't be built with the most recent SDK.

Bump the SDK dependency to 3.3.0 (the version introduced asModifiableView) and replace the removed type with asModifiableView in the test.

Fix new warnings with 3.3.0 in protoc_plugin tests and generated code.

Remove legacy tests in protoc_plugin as we no longer support unsound versions of Dart.

This PR also makes some small changes to make CI happy:

  • Fix analyzer issues in protobuf.

  • api_benchmark is getting bitrot, make analyzer issues in api_benchmark non-fatal so that we can run other CI jobs when it fails.

GitHub CI config is re-generated with the most recent mono_repo.

Closes #936.

osa1 added 4 commits February 5, 2025 10:46
`Unmodifiable...View` types were deprecated in favor of
`asModifiableView`s members introduced in SDK 3.3.0.

These types are now removed, so the protobuf package tests can't be
built with the most recent SDK.

Bump the SDK dependency to 3.3.0 (the version introduced
`asModifiableView`) and replace the removed type with `asModifiableView`
in the test.
@github-actions
Copy link

github-actions bot commented Feb 5, 2025

Package publishing

Package Version Status Publish tag (post-merge)
package:protobuf 4.0.0-dev ready to publish protobuf-v4.0.0-dev
package:protoc_plugin 22.0.0-dev ready to publish protoc_plugin-v22.0.0-dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@osa1 osa1 requested a review from devoncarew February 5, 2025 10:30
@osa1 osa1 changed the title Replace removed dart:typed_data type in test code Bump SDK dependency to 3.3.0, replace removed dart:typed_data type in test code Feb 5, 2025
@osa1 osa1 marked this pull request as draft February 5, 2025 10:58
@osa1 osa1 marked this pull request as ready for review February 5, 2025 11:10
Copy link
Contributor

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -1,4 +1,4 @@
# Created with package:mono_repo v6.5.7
# Created with package:mono_repo v6.6.2
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also move away from using this mono_repo generated workflow file - in favor of some simple hand-written ones - if that's preferable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's fine, I don't have any problems with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

#957 moves to using simple, hand-written workflow files per-package instead of a generated mono_repo one.

- format
- command: ./../tool/setup.sh
- command: ./compile_protos.sh
- analyze: --fatal-infos
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to removing this package

// supported SDK version.
// ignore: deprecated_member_use
testWithList(UnmodifiableUint8ListView(Uint8List.fromList(inputBuffer)));
testWithList(Uint8List.fromList(inputBuffer).asUnmodifiableView());
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

// source: ${descriptor.name}
//
// @dart = 2.12
// @dart = 3.3
Copy link
Contributor

Choose a reason for hiding this comment

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

Fantastic!

@osa1 osa1 merged commit 06accdd into master Feb 5, 2025
17 checks passed
@osa1 osa1 deleted the fix_build branch February 5, 2025 17:32
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.

Update the language directive to 3.0

3 participants