Fork me on GitHub
#cljdoc
<
2018-10-18
>
Daw-Ran Liou04:10:27

Hi all, I’m fairly new to clojure and would like some early feedback on the work I’m doing for issue#32. Here’s the commit: https://github.com/dawran6/cljdoc/commit/82bee5b41f460c82186c318f484e37a808608f10. Also I’d like to ask about how I can do better at my development process. Currently I have to do ./scripts/cljdoc run every time after making changes in the source code.

Daw-Ran Liou04:10:48

So far I’ve only added an interceptor that does nothing more than render a dummy 404 page

Jorin05:10:19

Hi @U7PQH43PS! You might want to have a look at https://github.com/cljdoc/cljdoc/blob/master/doc/running-cljdoc-locally.md Checkout the "REPL" workflow described at 2. When starting a REPL with clj you can interact with the program from there, start and stop the server, require and reload code and so on. Please ask, if you have any questions there

Jorin05:10:52

You can reload your changes in a namespace from the REPL using something like (use 'your.namespace :reload) or (use 'cljdoc.server.system :reload-all)

Jorin05:10:09

Depending on which editor you use, you might find some nice plugin to control the REPL directly from your editor 🙂

Daw-Ran Liou05:10:47

@U8ZN5EHGU appreciate your help! This is definitely something I’m looking for. I am using vscode with Calva plugin. It asks me to enter the port for nREPL in order to connect. Where can I find/assign the port?

Jorin06:10:14

I'm afraid the cljdoc setup doesn't have an nrepl running. It's a separate package. @U050TNB9F any thoughts on this? Do you develop without nrepl?

martinklepsch07:10:57

Hey 👋 I’m using cider which starts a server with nrepl by injecting nrepl. It briefly shows the CLI invocation so it should definitely be possible to run that standalone. I’ll ask in cider.

martinklepsch07:10:46

I think this might be sufficient:

clojure -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} cider/cider-nrepl {:mvn/version "0.18.0-SNAPSHOT"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
Giving it a test run now...

martinklepsch07:10:59

@U7PQH43PS I think this (mostly) works. I had to open the calva terminal before anything evaluated (even inline) but it's working 🙂

Jorin07:10:20

Thanks a lot @U050TNB9F! didn't think about simply passing the extra dependency directly to the cli :) can extend the docs with this.. But maybe it might also help wrapping this in a shell script for people to use. Alternatively could try what we can do with an alias in the deps.edn file..

martinklepsch07:10:26

Thank you for jumping in here and helping as well 🙌 🙂

martinklepsch07:10:52

and yeah, maybe an nrepl alias in the deps.edn would be a good idea. I'm not sure how often these deps update but I guess we'll find out 😄

Daw-Ran Liou16:10:00

Thanks @U8ZN5EHGU @U050TNB9F! Calva is working now 😄

Jorin16:10:59

Nice 👌

martinklepsch16:10:33

oh, totally forgot with all the VS Code talk 😅

Daw-Ran Liou16:10:53

No worries. I’m interested in that topic too lol

martinklepsch16:10:20

@U7PQH43PS your changes make sense 👍 Consider a more general namespace name like cljdoc.render.errors but that's details really

Daw-Ran Liou16:10:11

Cool thanks for getting back to me so quickly 🙂. My plan is to write the 404 page as close as possible to one of the mockups on the issue.

martinklepsch16:10:41

Ah, don't worry too much about getting it right the first time. Maybe just have a nice message and integrate the search that's on the front page. 90% of this issue should be just getting stuff in place so don't stress about nailing the mockups there 🙂

👍 4
martinklepsch16:10:47

Generally speaking, do whatever you think is best 😄

Daw-Ran Liou16:10:56

Thanks I’m learning a lot from this project. Looking forward to contributing more

parrot 8
🙌 8
martinklepsch15:10:09

Today's yak shave: Setup a deployment story for cljdoc that allows us to have additional buildsteps beyond zipping up the repo. In combination with the latest JS bundling work this has become necessary and eventually this was going to happen anyways. How does it work? For every CI build on cljdoc an additional workflow is ran to package up the application and publish it to a publicly readable S3 bucket. That archive can then be downloaded on the server and ran using a simple clojure invocation. https://github.com/cljdoc/cljdoc/pull/152

martinklepsch15:10:37

I'll likely merge this later today, hopefully without anyone noticing 🤞

martinklepsch16:10:40

It almost went flawlessly hadn't I accidentally committed some small change I made while testing: https://github.com/cljdoc/cljdoc/commit/62e1cc21ea758c7de062a4593bc986cce5dfb9bc 😄