PointyCastle / pointycastle

Moved into the Bouncy Castle project: https://github.com/bcgit/pc-dart
MIT License
270 stars 76 forks source link

Consider making reflectable a dev_dependency #99

Open sethladd opened 8 years ago

sethladd commented 8 years ago

If reflectable isn't required at runtime, can you move it to a dev_dependency?

We use pointycastle in Flutter (btw, thanks for the library! :) but PC pulls in reflectable which pulls in analyzer pinned to a very specific version.

Moving reflectable to a dev_dependency (assuming that works) frees up Flutter to move to a newer version of analyzer.

Thanks very much!

sethladd commented 8 years ago

cc @hixie

stevenroose commented 8 years ago

@sethladd Sadle, reflectable is required at runtime: https://github.com/PointyCastle/pointycastle/blob/master/lib/src/registry/registry.dart#L7

The Registry class is used to easily construct combined and hybrid algorithms.

cc @eernstg, perhaps reflectable can loosen the specific version requirement?

eernstg commented 8 years ago

It sounds like you haven't upgraded to use reflectable version 0.5.3. Reflectable has had a tight analyzer version constraint for months (analyzer: 0.27.1), but we recently found a way to address the underlying problem, and this enabled reflectable 0.5.3 to use the much more flexible constraint analyzer: ^0.27.2.

Hixie commented 8 years ago

We do now use the version with the less tight constraint. Our bigger problem though is that we'd like to drop our runtime dependency on the analyzer package entirely, as part of our efforts to reduce our dependency footprint.

eernstg commented 8 years ago

That's an understandable goal! ;-) But it shouldn't have much to do with code that is generated by the reflectable transformer: The generated code does not need to depend on the analyzer.

The transformer itself depends on the analyzer (crucially, so you cannot expect to remove that dependency), but that would affect the footprint of the build process, not the resulting application.

Hixie commented 8 years ago

@stevenroose earlier was saying that the reflectable package is required at runtime, though, no?

eernstg commented 8 years ago

Yes, 'reflectable.dart' is required at run time, but it does not depend on the analyzer.

The library 'reflectable.dart' is in fact adjusted to import 'src/reflectable_transformer_based.dart' rather than 'src/reflectable_mirror_based.dart', such that it does not cause a dependency on 'dart:mirrors' and such that it will be able to use the generated mirrors instead.

Hixie commented 8 years ago

Ah, ok. I thought reflectable depended on analyzer. My bad.