Fork me on GitHub

In a similar direction: I have a bit of conceptual confusion about tools.deps relationship to leiningen. Say for example I just added ring as a dependency via my deps.edn. Now, ring also has dependencies, but as far as I can see, it's using defproject macros for that, so leiningen. But somehow that's all taken care of and works. How come? šŸ™ˆ


They are maven dependencies


Lein and tools.deps both can consume maven dependencies


So while ring defines it's dependencies using leins defproject, lein was used to generate a jar and pom from that, and that is published to a maven repository somewhere


And lein, tools.deps, maven, gradle, etc all can consume from maven repos


ah, thank you!


is there a function that does the opposite of select-keys? an "except-keys" or "without-keys"


apply dissoc did the trick

James Pratt13:11:10

Is it possible to play with this java library for which I have maven repository coordinates in the REPL?

James Pratt13:11:32

I seemed to have specified the dependency for my project correctly in deps.edn

;; <dependency>
;; <groupId></groupId>
;; <artifactId>google-ads</artifactId>
;; <version>22.0.0</version>
;; </dependency>

{:paths ["src"]
 :deps { {:mvn/version "22.0.0"}}}

James Pratt13:11:11

But not sure if I need a require in a namespace

James Pratt13:11:34

and not sure how to call code


Yes, dependencies on projects are defined at the project level (deps.edn) and dependencies on classes/namespaces at the namespace level. You need both. Dependencies on Java classes are declared with import, not require. You can check these docs for more information: ā€¢ How to declare a dependency on Java classes: ā€¢ How to actually do Java interop:

James Pratt13:11:05

thanks! Will explore further.


Happy to help if you have more specific questions šŸ™‚


For one-offs you can specify deps directly on the command-line: clj -Sdeps '{:deps { {:mvn/version "22.0.0"}}}'

James Pratt12:11:07

Before I try to authenticate with oauth2 to use this client library I need to work out how to spin up a server with a url for the callback and https. I'm going to look into deploying to heroku which would seem to be the easiest way to get a server up and running.


hi, I have a Compojure route (GET "/" [] (content-type (resource-response "index.html" {:root "public"}) "text/html")` but the browser downloads the file instead of displaying it -- I thought setting the content type would fix this (as in but I still have the same problem


I must be making a basic mistake here?


also I'm already adding site-defaults from ring-defaults, so I thought I didn't need content-type anyway?


this seems related to the open PR -- but this is pretty basic right? I wonder how people normally do this.


well I don't know what I did, but now somehow it works with the same code...some kind of inconsistent state somewhere?


yeah something is weird, because now it doesn't work again.


Can you inspect the http response headers in the browser and see if there's something odd, notably in with the content-type?

Falak Shair19:11:16

Hi, I am unable to connect repl in the atom (packages:proto-repl & ink), and why these packages are deprecated. Is there any other way/package to connect repl.


Atom is essentially dead. There's a community project called Pulsar to continue it on.


Join #CPUTQ6PV5 and ask there about it. I don't have links, sorry.


I switched from Atom to VS Code a while back because of that. Calva for VS Code is great.

Falak Shair20:11:29

@U04V70XH6 I am switching too. Thanks:+1:

Falak Shair20:11:06

@U04V70XH6 Would you recommend other useful extensions in VS code?


I use Calva and Joyride. Plus the Atlassian extension for work (Jira and BitBucket). I'm not at my desk right now but can look at other extensions later.


OK, pulled up my laptop: Portal -- don't know how I forgot that one! GitHub Pull Requests and Issues, vscode-pdf, YAML. My VS Code / Calva / Portal setup is mostly in this repo: and my CLI/`deps.edn` aliases and REPL-starting code is in this repo:

šŸ‘ 1