Thabk you for your answer :) that was interesting ! But well after two years, you don't want to reconsider it ? With go mod, the treeshaking is pretty good and even if we are talking about few lines of code, it is still less code to maintain :)
And besides it won't increase the size of the binary Kinds regards, Augustin Le lun. 18 mai 2020 à 18:34, Goutham Veeramachaneni <[email protected]> a écrit : > Hi, > > Yeah, one main reason is to avoid an entire huge dependency when you just > need a small subset of the functionality. Funnily enough when we first did > it, we had just a few lines of code, so it didn't make sense to import the > dependency for ~20 lines of code > <https://github.com/prometheus/prometheus/pull/3285/files> :) See some > more context here: > https://github.com/prometheus/prometheus/issues/3242#issuecomment-334439064 > > > But overtime, we've added a little more functionality, but overall, the > amount of functionality we need is quite small to import that big package. > > Thanks, > Goutham. > > On Mon, May 18, 2020 at 5:25 PM Augustin Husson <[email protected]> > wrote: > >> Hello, >> >> After changing some code in prometheus-community/promql-langserver, I >> figure out it was using some method coming from testutils/testing.go. And >> after looking at it, I was wondering why did you need these methods. >> >> I mean it is a bit strange that prometheus has to implement for themself >> a sort of framework for the unit test. So I guess there is a good reason >> for that just would like to know which one if it's ok for you :). >> >> I'm just asking because the methods coming from this particular file >> could be replaced by the one coming from the repository stretchr/testify >> <https://github.com/stretchr/testify>. Specially with the package assert. >> >> What do you think ? Is it completely stupid ^^ ? >> >> Wish you the best. >> Kinds regards, >> Augustin. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Prometheus Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/prometheus-developers/b4a70bf6-528f-44ba-92e9-62dead8eaac7%40googlegroups.com >> <https://groups.google.com/d/msgid/prometheus-developers/b4a70bf6-528f-44ba-92e9-62dead8eaac7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/CAOJizGcBs0O2vY58CrLOEGpjWc9u2mqVytyaZfNzeb9kKS5moQ%40mail.gmail.com.

