Fork me on GitHub
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: 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


Hi @U7PQH43PS! You might want to have a look at 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


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)


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?


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?


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.


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...


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


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..


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


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 😄


Nice 👌


oh, totally forgot with all the VS Code talk 😅

Daw-Ran Liou16:10:53

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


@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.


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

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

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.


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


It almost went flawlessly hadn't I accidentally committed some small change I made while testing: 😄