plow-technologies / inferno

A statically-typed functional scripting language
MIT License
4 stars 1 forks source link

`inferno-vc` shouldn't use `Manager` internals #101

Open ngua opened 7 months ago

ngua commented 7 months ago

mkVCClientEnv in inferno-vc currently uses the internals of Manager (from http-client) to modify request headers and body:

https://github.com/plow-technologies/inferno/blob/f229ad953f937cf000f878698683436e872beab6/inferno-vc/src/Inferno/VersionControl/Client.hs#L19-L43

I don't think we should rely on the internal implementation of Manager like this; the current docs for that Network.HTTP.Client.Internal state

No API stability is guaranteed for this module

which is generally the case for modules marked as internal.

We could probably just use a middleware to achieve the same thing. Or, if that's not possible, this code should document why it's necessary to use internal modules from another library