Aha, reading the docs for the Go tzdata package more thoroughly sheds some light on the topic:

> Package tzdata provides an embedded copy of the timezone database. If this package is imported anywhere in the program, then if the time package cannot find tzdata files on the system, it will use this embedded information.
>
> This package should normally be imported by a program's main package, not by a library. ...
>
> This package will be automatically imported if you build with -tags timetzdata.

Since golang-github-go-playground-locales neither imports time/tzdata, nor specifies "-tags timetzdata" anywhere, it stands to reason that this FTBFS without the tzdata package available on the system.

All tests pass if "-tags timetzdata" is specified.

So, in keeping with Go's recommendation that time/tzdata should not be imported by a library, does it actually make sense to make this package Build-Depend on tzdata, when this can be as easily resolved as passing "tags timetzdata" to dh_auto_test? It seems like it's the responsibility of the app which _uses_ this library to import tzdata - not the responsibility of the library itself.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to