GNU bug report logs -
#34613
[PATCH] gnu: Add prometheus.
Previous Next
Reported by: Gábor Boskovits <boskovits <at> gmail.com>
Date: Fri, 22 Feb 2019 11:47:01 UTC
Severity: normal
Tags: moreinfo, patch
Done: zimoun <zimon.toutoune <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> > (Should we package the stuff there, and link the sources into the tree?)
>
> I think we generally do that yes. Pierre, Leo?
We used to, but since Go 1.10 there is a bug in the compiler which keeps tracks
of _all_ recursive dependencies in the resulting _static_ binary. This can
result in a ridiculously large closure size.
As for now, I'd recommend the following:
- If there are many dependencies (check the vendor/ folder), use it, it will be
easier and produce a package with an ideal closure size.
- If it's only a few dependencies, it's probably worth it to package all of them
independently.
> > I am willing to do the work, but I need some pointer, as I am not into go.
>
> I’m ignorant about Go, but hopefully Pierre, Leo, or someone else with
> experience with Go packaging can provide some guidance!
For a Go package with unvendored deps, I suggest you look at "demlo", it's
reasonably easy to understand. For vendored deps, look at go-ipfs.
The Go build system does most things right. A few pointers:
- Prometheus might use its own build system, e.g. with a Makefile. Then you'll
have to read the makefile to know what it's doing.
- In Go, it's possible to include multiple packages in the same repository. Our
Go build system does not handle this very well and it's not possible to use
multiple such packages as dependencies: you need to create a union. See
go-golang-org-x-crypto-union.
Let me know if you need more help, I can look into it.
Good luck!
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.