Comments (7)
So after setting up the environment #64 it seems like I can't get the basic functionality to start working with the library. It seems like any functionality from http-client
is hidden and I can't access it the usual way.
Example:
> (manager, config) <- connectKubernetes
> (MimeResult response status) <- dispatchMime manager config $ CoreV1.listNamespace $ Accept MimeJSON
> responseStatus status
<interactive>:32:1: error:
Variable not in scope:
responseStatus
:: http-client-0.5.14:Network.HTTP.Client.Types.Response
bytestring-0.10.8.2:Data.ByteString.Lazy.Internal.ByteString
-> t
Per this cabal FAQ it seems the proposed solution was to add http-client
into the package.yaml
, but it did not help at all.
Maybe it's some easy solution I'm missing because it's been some time since working with Haskell.
from haskell.
I have written couple of examples in #61. Hopefully we'll grow them soon, we can use this issue to track that.
It seems like any functionality from http-client is hidden and I can't access it the usual way.
Cabal treats all transitive dependencies as hidden packages, so you cannot import things from them. To import them, you'd have to add them as a direct dependencies of your package. In this case, add http-client
to package.yaml
and import Network.HTTP.Client
from haskell.
Thank you for the examples, seems like I can get started with those. For the hidden package problem - this is exactly what I've done and it still is not possible for me to import the module:
> stack ghci
Main KubernetesWrapper> import Network.HTTP.Client.Types
<no location info>: error:
Could not load module ‘Network.HTTP.Client.Types’
it is a hidden module in the package ‘http-client-0.5.14’
I've already tried stack clean
, deleting the project and setting it up again and specifying the version to http-client-0.5.14
in the package.yaml
under dependencies.
EDIT: Ok, it seems I got it working, but I do not really understand why. The package.yaml
where it did not work looked like this.
dependencies:
- base >= 4.7 && < 5
- http-client == 0.5.14
# kubernetes stuff
- kubernetes-client >= 0.1.0.1 && < 2
- kubernetes-client-core >= 0.1.0.1 && < 2
- connection >= 0.2.8 && < 3
- containers
- x509-validation
- stm >= 2.5.0.0 && < 3
# amqp stuff
- amqp-worker >= 0.3.2 && < 0.4.0
- text >= 1.2.3.1 && < 1.3.0.0
- exceptions >= 0.10.3 && < 0.11.0
- aeson >= 1.4.5.0 && < 1.5.0.0
library:
source-dirs: src
And after adding the http-client as an additional dependency (what do the previous dependencies then mean?) to the library it worked:
library:
source-dirs: src
dependencies:
- http-client == 0.5.14
Seems slightly counterintuitive, but at least it works for now.
from haskell.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
from haskell.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
from haskell.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
from haskell.
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen
.
Mark the issue as fresh with/remove-lifecycle rotten
.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from haskell.
Related Issues (20)
- client update may be broken HOT 7
- Update to newer versions of GHC
- Should we make a release? HOT 10
- Proposal: Default to openssl HOT 18
- InternalException - certificate unknown with `mkKubeClientConfig` HOT 4
- Clean up outside collaborators HOT 2
- Incorrectly generated query strings (that rely on + not being urlencoded) HOT 21
- in-cluster config builder does not work properly in an ipv6 cluster HOT 14
- Sometimes k8s gives back Null and the client dies HOT 2
- Update to newer LTS? HOT 8
- Issue with (-&-) optional argument operator and Command optional argument for exec HOT 18
- Issue with kubernetes-client dependency on time on Hackage HOT 9
- does not compile HOT 3
- Strategic JSON patch no longer supported? HOT 3
- Wrong return type in deleteNamespacedPersistentVolumeClaim HOT 6
- ssl error when specify master address as IP address in config file HOT 15
- kubernetes-client seems broken in both stack and nix-env. Any tips on installation? HOT 2
- Version on hackage is old HOT 6
- Possible alternative to configQueryExtraUnreserved option? HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell.