replit / prybar

Pry open those interpreters.
GNU General Public License v2.0
253 stars 52 forks source link

Use org.clojure/tools.namespace for Reloading/Refreshing Namespaces without Restarting the REPL #45

Closed finalfantasia closed 1 year ago

finalfantasia commented 4 years ago

This Pull Request:

amasad commented 4 years ago

nice!

finalfantasia commented 4 years ago

No worries, given the current pandemic situation, everybody (including myself, of course) has a lot more balls to juggle. 🙂

As for the tests, I made sure the Clojure tests were passing when I pushed those commits. However, based on my experience writing these expect tests, they tend to be a bit brittle and flakey. I attempted to run make test-image on my Mac today but ran into the following errors:

❯ make test-image
docker build . -t prybar
Sending build context to Docker daemon  4.416MB
Step 1/9 : FROM ubuntu:disco
 ---> c88ac1f841b7
Step 2/9 : COPY scripts/docker-install.sh /tmp/docker-install.sh
 ---> Using cache
 ---> 421b3e548cbc
Step 3/9 : RUN /tmp/docker-install.sh
 ---> Running in f04cde92a0b3
Ign:1 http://security.ubuntu.com/ubuntu disco-security InRelease
Err:2 http://security.ubuntu.com/ubuntu disco-security Release
  404  Not Found [IP: 91.189.91.38 80]
Ign:3 http://archive.ubuntu.com/ubuntu disco InRelease
Ign:4 http://archive.ubuntu.com/ubuntu disco-updates InRelease
Ign:5 http://archive.ubuntu.com/ubuntu disco-backports InRelease
Err:6 http://archive.ubuntu.com/ubuntu disco Release
  404  Not Found [IP: 91.189.88.152 80]
Err:7 http://archive.ubuntu.com/ubuntu disco-updates Release
  404  Not Found [IP: 91.189.88.152 80]
Err:8 http://archive.ubuntu.com/ubuntu disco-backports Release
  404  Not Found [IP: 91.189.88.152 80]
Reading package lists...
E: The repository 'http://security.ubuntu.com/ubuntu disco-security Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu disco Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu disco-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu disco-backports Release' does not have a Release file.
The command '/bin/sh -c /tmp/docker-install.sh' returned a non-zero code: 100
make: *** [image] Error 100

I went to check http://archive.ubuntu.com/ubuntu/dists/ and couldn't find disco anymore. I changed the code name for the Ubuntu release from disco to bionic in the FROM directives in both Dockerfile and Dockerfile.dev and then was able to build the container image but the Scala tests started failing... I figured that I should at least let you all know the issue with disco right now. I'll look into what's going on with the test failures later.

finalfantasia commented 4 years ago

It turns out updating the base container image to Ubuntu Bionic caused the version bump of OpenJDK from 11.0.5 to 11.0.6 and that caused some Scala tests to fail because these tests expect a specific OpenJDK version number (11.0.5) in the greeting message shown when the REPL starts.

amasad commented 4 years ago

Not to derail the conversation but I'm wondering if Nailgun would be simpler here and as effective https://github.com/facebook/nailgun

Just a thought

finalfantasia commented 4 years ago

Good day, and thank you for your patience - I had to step away from prybar & related things for a few days. Thanks for incorporating my feedback!

I'm still seeing errors when running make test-image; are you seeing them as well?

clojure:
...     run code
========== "clojure/run_code.exp" failed ==========
 expect: spawn id exp4 not open while executing "expect eof" (file "./tests/clojure/run_code.exp" line 7)

OK, commit a226ad6 should fix this test failure. Thank you for your time and patience. 🙂

finalfantasia commented 4 years ago

Not to derail the conversation but I'm wondering if Nailgun would be simpler here and as effective https://github.com/facebook/nailgun

Just a thought

This is an interesting project. I had never heard of it before until I saw it mentioned in /r/scala. There seems to be very little documentation as to how this works so I have to play around with it to see if it's a good fit for Clojure. 🙂

dan-stowell commented 4 years ago

Good afternoon again @finalfantasia ! You've probably noticed by now that we've been slow to merge community PRs on polygott. We've decided to focus on giving Repl.it a stable foundation instead of adding features and updating languages. Once we and our community feel comfortable with Repl.it's overall stability, we'll give this change another look. Thank you for contributing!

slifin commented 3 years ago

Good afternoon again @finalfantasia ! You've probably noticed by now that we've been slow to merge community PRs on polygott. We've decided to focus on giving Repl.it a stable foundation instead of adding features and updating languages. Once we and our community feel comfortable with Repl.it's overall stability, we'll give this change another look. Thank you for contributing!

How's it looking at the moment?