-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A port of the nbb nrepl-server to basilisp #723
A port of the nbb nrepl-server to basilisp #723
Conversation
d9517cc
to
2a5923e
Compare
bb72b76
to
3f35756
Compare
Rebased from main to resolve conflicts and updated changelog with issue numbers. |
This is definitely very cool and I'm excited to see how this works. Would it be possible to start breaking off the smaller bug fixes as individual PRs so this PR is just the nrepl server? Most of them seem straightforward enough on their own. My one reservation with using code from another project is that I assume we'll need to correctly attribute the source of that code to its original author(s) and I'm not 100% sure how to do that. Perhaps a copyright notice at the top of the file attributing that author and mentioning the license is the same as the main project. |
…727) Hi can you please review patch to fix the problem of `ns` becoming unavailable after executing `in-ns` in the context of the `eval` operation. It addresses #718. (part of breaking the individual bugfixes from #723) thanks Co-authored-by: ikappaki <[email protected]>
Hi, could you please review patch to fix issue with import name aliasing in the context of an `eval` operation. It addresses #719. (part of breaking the individual bugfixes from #723) Thanks. Co-authored-by: ikappaki <[email protected]>
Hi, could you please consider patch to fix an issue with with `ns-resolve` erroring out on macros. It addresses #720. (part of breaking the individual bugfixes from #723) Thanks --------- Co-authored-by: ikappaki <[email protected]> Co-authored-by: Chris Rink <[email protected]>
…730) Hi, could you please review patch to introduce a new namespace `basilisp.stacktrace` and a `print-cause-trace`. It partly addresses #721. This is a requirement of the upcoming nbb nrepl-server port implemented in #723. CIDER specifically requests this function when an exception is thrown to display to the user, making it essential. thanks Co-authored-by: ikappaki <[email protected]>
Hi, could you please review patch to fix what it seems to be a potential issue with how readwrite locks are used in basilisp. It addresses #722. This was discovered while testing of the upcoming nrepl-server described in #723. The nrepl-server tests which are using threads were failing due to trying to release an rlock which has been already released, and is fixed as described in #722 by using `with self._lock.gen_rlock()` instead of a single instance of `with self._rlock()`. The error was ``` File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/basilisp/lang/runtime.py", line 706, in find return v File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/readerwriterlock/rwlock.py", line 49, in __exit__ self.release() File "/home/runner/work/basilisp/basilisp/.tox/py39/lib/python3.9/site-packages/readerwriterlock/rwlock.py", line 344, in release if not self.v_locked: raise RELEASE_ERR_CLS(RELEASE_ERR_MSG) RuntimeError: release unlocked lock ``` Thanks Co-authored-by: ikappaki <[email protected]>
3f35756
to
28b0afe
Compare
done, merged to main and rebased this branch, ready for review.
Indeed we should, I've already chatted with the author about it and plan to bring them in to discuss about it once we pass the review and have a final product (include documentation). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still working my way through this but I had a few comments and questions to start with.
Thanks again for putting this together! This is extremely cool and I'm so excited it's happening.
It might be nice if we could split the |
Though I also realize this may make the discussions between us and the nbb folks more complicated, so maybe not. |
I don't foresee any objections to assigning credits; I expect the discussion to focus more on deciding where to allocate them. I consider the Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Finally took a first pass on the nrepl server itself.
66363f9
to
6c702cb
Compare
Hi, I've updated the documentation to include references to the nREPL server. It also includes two autogen fixes
Thanks |
6c702cb
to
e579cd8
Compare
e579cd8
to
0041c75
Compare
(Updated to pick up latest changes from main and adjusted code accordingly) |
8e565e2
to
463da3b
Compare
merged replacement bencode lib from main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finally took a pass on the tests. Really nice, comprehensive suite. Thanks for doing that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no further comments for now.
Is there anything else we need to do to discuss with nbb's authors on our use of their tooling or are our current attributions sufficient?
Hi @borkdude, as mentioned briefly the other day, I've ported the nbb nREPL server (and together with @chrisrink10 the bencode library as a dependency) to |
Seems sufficient to me. I too borrowed the initial code from some other project. Standing on shoulders, etc :) |
Thanks a lot for all your hard work! |
Hi,
could you please review patch to port nbb's build in nrepl-server to basilisp contrib. It addresses #412.
nbb
has the same EPL-1.0 license asbasilisp
so I believe using its code as the base for this PR should not cause licensing issues.The nbb
bencode
module which is a dependency was ported as well. Extensive tests were written for both.The server has been tested to work with both CIDER and Calva in VS-Code.
The server can be invoked with
baslisp nrepl-server
:Several fixes were required to make it work, which are included as separate commits in this PR prior to the main bencode and nrepl-server commits. They address the following issues
Fixed issue with sort-* fns returning an error on empty seqs (sort-* function fails on empty seq #716)ns
being unavail afterin-ns
duringeval
(Unable to setup namespace withns
after its creation usingin-ns
#718)eval
ing anns
#719)ns-resolve
throwing error on macros (error raised when trying tons-resolve
a macro #720)support for the
basilisp.stacktrace/print-cause-trace
is also added because it is requested by CIDER when an exception is thrown to show to the user, which is essential, it partially addresses #721.In addition, two issues were observed while running the tests in CI
The 1.6.0 was released few days ago and complains for an additional type error in the generator, which is now ignored with this patchwith self._lock.gen_rlock()
instead of a single instance ofwith self._rlock()
. The error wasI understand this could be a lot to go through and there likely to be multiple iterations while I update the code with your feedback, of which I'm looking forward to.
I have not written a nrepl-server section for the manual yet. I plan to do this after a successful review, and will also update the changelog.
Thanks