Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Use of protocol buffers #440

Open
erikhugintech opened this issue Sep 28, 2019 · 9 comments
Open

Use of protocol buffers #440

erikhugintech opened this issue Sep 28, 2019 · 9 comments

Comments

@erikhugintech
Copy link

MaterialDatePicker uses protobuf to define a Date and a DateRange class. The protobuf dependency is currently locked to an older version, and prevents use of recent fixes in protobuf. Dependency overrides won't work, as the generated .pb.dart files fail to compile while depending on protobuf 0.14

Is there a rationale behind embedding conversion to protobuf formatted classes in angular_components? Looks to me like this shouldn't really be in angular_components at all?

@nshahan
Copy link
Contributor

nshahan commented Sep 29, 2019

Currently there isn't any way to integrate the proto file generation into the build_runner build system. I chose to distribute the generated files to allow for users to more easily depend on this package without needing to install the protobuf compiler and generate them themselves out of band from the standard dart build. I still don't think there is a very good alternative.

Thanks for pointing out the new version. I'll start the process to get the generated files updated.

@erikhugintech
Copy link
Author

But why is it angular_component's responsibility to support protobuf at all? Wouldn't it make more sense to remove everything related to protobuf, and let whoever wants protobuf support add it on the outside?

@nshahan
Copy link
Contributor

nshahan commented Sep 30, 2019

These components are an open source version of the material widgets used in applications at Google. Our intention for this project was to keep them in sync and avoid diverging the source.

@supermuka
Copy link

I'm having the same problem:

C:\dart-sdk\bin\pub.bat upgrade
Resolving dependencies...
Because angular_components >=0.13.0 depends on protobuf ^0.13.6 and auge_web depends on protobuf ^1.0.0, angular_components >=0.13.0 is forbidden.
So, because auge_web depends on angular_components ^0.14.0-alpha, version solving failed.
Process finished with exit code 1

Would there be any workaround to use protobuf 1.0.0 and angular_components together until this problem is fixed and released?

@bgetsug
Copy link

bgetsug commented Oct 29, 2019

@supermuka feel free to use my fork referenced in PR (#443): https://github.com/s2nventures/angular_components

@Timmmm
Copy link

Timmmm commented Nov 18, 2019

This is pretty annoying. Could you split MaterialDatePicker into a separate library? I doubt most people use it, and this feels like it will be an ongoing problem (bit of a flaw in Dart's dependency management if you ask me).

Timmmm added a commit to Timmmm/angular_components that referenced this issue Nov 18, 2019
Update protobuf to 1.0.1 and regenerate and dartfmt .pb.dart files.

Fixes angulardart#440 ("Once and for all!" "But..." "ONCE AND FOR ALL!")
@pabloamg
Copy link

pabloamg commented Mar 24, 2020

@nshahan The build failed and the PR (#443) was never closed, in general angular_components seems to be abandoned, does anybody know why?

@nshahan
Copy link
Contributor

nshahan commented Mar 24, 2020

The build failed and the PR (#443) was never closed

There are issues with the build at the moment on the latest dev releases of the SDK. I left the PR open to signal that this is still an issue that will need to be resolved when the next sync does happen.

in general angular_components seems to be abandoned, does anybody know why?

The project is still active development internally but the goal right now is to produce a more automated sync to github strategy that doesn't require as much manual intervention from engineers.

@edyu
Copy link

edyu commented May 23, 2020

I ran this into exact same problem for the last couple of days so a sync that would fix the version problem in the mean time would be appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
7 participants