angulardart / angular_components

The official Material Design components for AngularDart. Used at Google in production apps.
https://pub.dev/packages/angular_components
372 stars 122 forks source link

Use of protocol buffers #440

Open erikhugintech opened 5 years ago

erikhugintech commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

Timmmm commented 5 years ago

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).

pabloamg commented 4 years ago

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

nshahan commented 4 years ago

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 commented 4 years ago

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.