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

Add connect-dart plugin #1638

Merged
merged 6 commits into from
Dec 20, 2024
Merged

Add connect-dart plugin #1638

merged 6 commits into from
Dec 20, 2024

Conversation

srikrsna-buf
Copy link
Member

Add connect-dart plugin

FROM dart:3.5.4-sdk AS build

WORKDIR /build
RUN curl -fsSL https://github.com/connectrpc/connect-dart/archive/refs/tags/v0.1.0.tar.gz --compressed -o connect-dart.tar.gz \
Copy link
Member Author

Choose a reason for hiding this comment

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

We are not downloading from pub.dev like the base types plugin because dart is unable to resolve dependencies because of the relative dev dependency. This is a fairly common practice.

@@ -0,0 +1,3 @@
source:
dart_flutter:
name: connectrpc
Copy link
Member

Choose a reason for hiding this comment

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

Double-checking, I presume we will be publishing to pub.dev?

Copy link
Member

Choose a reason for hiding this comment

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

In other words, is this the correct place to look for new releases instead of just github?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in a166d0d

Copy link
Member Author

Choose a reason for hiding this comment

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

There was an issue with pub.dev see #1638 (comment)

@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.4
FROM dart:3.5.4-sdk AS build
Copy link
Member

@mfridman mfridman Dec 19, 2024

Choose a reason for hiding this comment

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

What is the best way to know which dart version we should support?

Asking because there's an upstream issue where the directive is still at 2.x

google/protobuf.dart#936

Part of the reason we haven't updated this yet, e.g.,

https://github.com/bufbuild/plugins/blob/main/plugins/protocolbuffers/dart/v21.1.2/Dockerfile#L2

Copy link
Member Author

Choose a reason for hiding this comment

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

pubspec.yaml files have the dart sdk range specified, as long as it satisfies that we should be able to upgrade

Copy link
Member

Choose a reason for hiding this comment

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

Okay great, then we should be able to update the latest base types to the latest dart 3 version. That way we can keep both dart plugins on the same version.

srikrsna-buf and others added 2 commits December 19, 2024 23:40
Signed-off-by: Sri Krishna Paritala <[email protected]>
Copy link
Member

@mfridman mfridman left a comment

Choose a reason for hiding this comment

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

lgtm. Just one nit on using git clone instead of curl the .zip for consistency

Signed-off-by: Sri Krishna Paritala <[email protected]>
@srikrsna-buf srikrsna-buf merged commit de03869 into main Dec 20, 2024
4 checks passed
@srikrsna-buf srikrsna-buf deleted the sk/connect-dart branch December 20, 2024 03:51
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.

2 participants