Open iand675 opened 2 years ago
Unfortunately that only works if the package explicitly exports it.
Unfortunately that only works if the package explicitly exports it.
Curious what's the problem with this?
Looks like we could leave in other-module
and it wont be public (haddock document)?
e.g. https://github.com/tekul/jose-jwt/blob/master/jose-jwt.cabal#L47
~nvm. it doesn't work unless there is {-# OPTIONS_HADDOCK prune #-}
in the module.~
Didn't know what I did wrong but looks like using other-module
can hide the module from public.
e.g.
So wonder if there are other reasons you'd like to avoid explicitly exports it
?
I think maybe the aim of this wasn't explained well enough when I created this issue.
The goal is this:
For libraries that we write instrumentation for (Yesod, persistent, etc.), it would be nice to know what version of things like yesod-core
that we are running against when debugging an issue in production. As far as I can tell, those libraries would have to be altered to export their Paths_
module so that we would have access to that information. In the long-term, it would be really nice to have the hs-opentelemetry
suite of packages become stable enough and trusted enough that these libraries feel comfortable integrating directly or making changes to make us happy, but in the meantime it's a little challenging to get at this information.
Aha.. I see what's meaning now. Thanks!
I learned there is cabal command to list all installed packages. Not sure if it could be short term hacky solution.
You can simply use something like this:
{-# LANGUAGE CPP #-}
yesodVersionString :: String
yesodVersionString = VERSION_yesod
One option is to get from generated
Paths_
module.It has type Version