Skip to content
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

revert upgrade to protobuf-es 2 #368

Merged
merged 9 commits into from
Jan 2, 2025
Merged

revert upgrade to protobuf-es 2 #368

merged 9 commits into from
Jan 2, 2025

Conversation

nbsp
Copy link
Member

@nbsp nbsp commented Dec 29, 2024

This reverts commit f204721, which introduces various bugs with version mismatches between protobuf-es 1.x and 2.x. see livekit/agents-js#232

would appreciate as many eyes on this as possible, to:

  • make sure i didn't revert any newly added changes as well
  • audit all uses of ! (i think it's safe to use when necessary, due to optional/required, but worth checking)
  • comprehend the jank

still not done with room.ts because it is big and messy

Copy link

changeset-bot bot commented Dec 29, 2024

⚠️ No Changeset found

Latest commit: 7594068

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

} from './proto/audio_frame_pb.js';

export class AudioSource {
/** @internal */
info: AudioSourceInfo;
info?: AudioSourceInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

in what situation would this be missing?

Copy link
Member Author

Choose a reason for hiding this comment

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

unsure, but in general i prefer to use ? over ! if the former works. could be swayed to replace it with an exclamation point later in the file

Copy link
Contributor

Choose a reason for hiding this comment

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

if we expect an AudioSource to always have a AudioSourceInfo (which I think we do as it's required in the FFI protocol), I think we should reflect that on the user facing API.

import type { Track } from './track.js';

export class AudioStream implements AsyncIterableIterator<AudioFrame> {
/** @internal */
info: AudioStreamInfo;
info?: AudioStreamInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

same question as above

@@ -61,40 +58,40 @@ import type { ChatMessage } from './types.js';

export abstract class Participant {
/** @internal */
info: ParticipantInfo;
info?: ParticipantInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

same question

packages/livekit-rtc/tsconfig.json Outdated Show resolved Hide resolved
@nbsp nbsp requested a review from lukasIO December 29, 2024 18:34
Copy link
Contributor

@lukasIO lukasIO left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -46,17 +46,17 @@
}
},
"dependencies": {
"@bufbuild/protobuf": "^2.2.0",
"@bufbuild/protobuf": "^1.4.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"@bufbuild/protobuf": "^1.4.2",
"@bufbuild/protobuf": "^1.10.0",

"@napi-rs/cli": "^2.18.0",
"@types/node": "^20.9.2",
"prettier": "^3.0.3",
"tsup": "^8.3.5",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"@bufbuild/protoc-gen-es": "^1.4.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"@bufbuild/protoc-gen-es": "^1.4.2"
"@bufbuild/protoc-gen-es": "^1.10.0"

Copy link
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

🥳

@nbsp nbsp merged commit 3711977 into main Jan 2, 2025
13 checks passed
@nbsp nbsp deleted the nbsp/revert/f204721 branch January 2, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants