pax_global_header 0000666 0000000 0000000 00000000064 13426365055 0014523 g ustar 00root root 0000000 0000000 52 comment=752d627057877379a46f0ca259a88a02cc58a5e4 nrepl-0.6.0/ 0000775 0000000 0000000 00000000000 13426365055 0012646 5 ustar 00root root 0000000 0000000 nrepl-0.6.0/.dir-locals.el 0000664 0000000 0000000 00000000313 13426365055 0015274 0 ustar 00root root 0000000 0000000 ;;; Directory Local Variables ;;; For more information see (info "(emacs) Directory Variables") ((clojure-mode (clojure-indent-style . :always-align) (indent-tabs-mode . nil) (fill-column . 80))) nrepl-0.6.0/.github/ 0000775 0000000 0000000 00000000000 13426365055 0014206 5 ustar 00root root 0000000 0000000 nrepl-0.6.0/.github/CONTRIBUTING.md 0000664 0000000 0000000 00000002615 13426365055 0016443 0 ustar 00root root 0000000 0000000 # Contributing If you discover issues, have ideas for improvements or new features, or want to contribute a new module, please report them to the [issue tracker][1] of the repository or submit a pull request. Please, try to follow these guidelines when you do so. ## Issue reporting * Check that the issue has not already been reported. * Check that the issue has not already been fixed in the latest code (a.k.a. `master`). * Be clear, concise and precise in your description of the problem. * Open an issue with a descriptive title and a summary in grammatically correct, complete sentences. * Include any relevant code to the issue summary. ## Pull requests * Read [how to properly contribute to open source projects on Github][2]. * Use a topic branch to easily amend a pull request later, if necessary. * Write [good commit messages][3]. * Squash related commits together. * Use the same coding conventions as the rest of the project. * Include tests for the code you've submitted. * Make sure the existing tests pass. * Open a [pull request][4] that relates to *only* one subject with a clear title and description in grammatically correct, complete sentences. [1]: https://github.com/nrepl/nrepl/issues [2]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request [3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html [4]: https://help.github.com/articles/using-pull-requests nrepl-0.6.0/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 13426365055 0016371 5 ustar 00root root 0000000 0000000 nrepl-0.6.0/.github/ISSUE_TEMPLATE/bug_report.md 0000664 0000000 0000000 00000001200 13426365055 0021054 0 ustar 00root root 0000000 0000000 --- name: Bug Report about: Report an issue with nREPL you've discovered. --- Use the template below when reporting bugs. Please, make sure that you're running the latest stable release or the latest snapshot of nREPL and that the problem you're reporting hasn't been reported (and potentially fixed) already. ## Expected behavior ## Actual behavior ## Steps to reproduce the problem This is extremely important! Providing us with a reliable way to reproduce a problem will expedite its solution. ## Environment & Version information ### Clojure version E.g. 1.9.0 ### Java version E.g. 1.8 ### Operating system E.g. Windows 10 nrepl-0.6.0/.github/ISSUE_TEMPLATE/feature_request.md 0000664 0000000 0000000 00000001104 13426365055 0022112 0 ustar 00root root 0000000 0000000 --- name: Feature Request about: Suggest new nREPL features or improvements to existing features. --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context about the feature request here. nrepl-0.6.0/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000001060 13426365055 0020004 0 ustar 00root root 0000000 0000000 Before submitting a PR make sure the following things have been done: - [ ] The commits are consistent with our [contribution guidelines](CONTRIBUTING.md) - [ ] You've added tests to cover your change(s) - [ ] All tests are passing - [ ] The new code is not generating reflection warnings - [ ] You've updated the [changelog](../CHANGELOG.md)(that only applies to user-visible changes) Thanks! *If you're just starting out to hack on nREPL you might find this [section of its manual][1] extremely useful.* [1]: https:/nrepl.org/nrepl/hacking_on_nrepl.html nrepl-0.6.0/.gitignore 0000664 0000000 0000000 00000000316 13426365055 0014636 0 ustar 00root root 0000000 0000000 # emacs + vi backup files *~ .*.sw* # various IDE junk *.ipr *.iml *.iws .project .classpath .settings # artifacts, etc eclipse-classes classes target .externalToolBuilders /.lein* /.nrepl-port pom.xml nrepl-0.6.0/.travis.yml 0000664 0000000 0000000 00000003360 13426365055 0014761 0 ustar 00root root 0000000 0000000 dist: xenial language: clojure lein: 2.8.3 cache: directories: - $HOME/.m2 script: - make $TARGET env: matrix: - VERSION=1.7 TARGET=test - VERSION=1.8 TARGET=test - VERSION=1.9 TARGET=test - VERSION=1.10 TARGET=test - VERSION=master TARGET=test global: # deployment credentials - secure: "f2pEAipCOs8JRMzSVMnbqBPbWFzI7G/FjPW9FY9ZjAhRvpslRC6JzG4r6uSJMoKU474ZQk+hzpYXCNSuqbztvYdd50J7E5iT3SpOIpRkNHtao0kEfxzFlH7P+sQ0LWPU5KZJXMue/9lKLxXdersdl2SAU7PSntQwqTEEicMluYs=" - secure: "PheOCJixQP9LaDcmkHGAOLmmPG6AQyN+PkgYw23cDTcFA6FKh4uVj28PHhlCQc0V6KrwzDqUAoSzyhSlcGm6LiZks714w6WHL3jpfIxnVKHN0J8FktnCy9Td9nrKhBCC2kNisaEhRyK4LojDcdFpliXZjJoituDnp4YhnaRIpsw=" jdk: - openjdk8 - openjdk11 - openjdk-ea stages: - name: check jdk: openjdk11 - name: test - name: deploy jdk: openjdk11 # Deploy only from the home repo where the credentials can be # properly decrypted. Never deploy from a pull request job. # In addition, ensure we're on the master branch (snapshots) # or a branch with semver naming (releases). if: repo = nrepl/nrepl AND type != pull_request AND ( branch = master OR branch =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ) jobs: include: - stage: check env: VERSION=1.10 TARGET=eastwood - stage: check env: VERSION=1.10 TARGET=cljfmt - stage: check env: VERSION=1.10 TARGET=verify_cljdoc - stage: test env: VERSION=1.10 TARGET=cloverage jdk: openjdk8 after_success: bash <(curl -s https://codecov.io/bash) -f target/coverage/codecov.json - stage: deploy env: TARGET=deploy matrix: fast_finish: true allow_failures: - jdk: openjdk-ea - env: VERSION=master TARGET=test - env: VERSION=1.10 TARGET=cloverage nrepl-0.6.0/CHANGELOG.md 0000664 0000000 0000000 00000030222 13426365055 0014456 0 ustar 00root root 0000000 0000000 ## Changelog ### 0.6.0 (2019-02-05) #### New features * [#117](https://github.com/nrepl/nrepl/issues/117): Replace `nrepl.middleware.pr-values` with `nrepl.middleware.print`. * New dynamic vars in `nrepl.middleware.print` for configuring the print middleware at the REPL. * The new middleware provides behaviour that is backwards-compatible with the old one. Existing middleware descriptors whose `:requires` set contains `#'pr-values` should instead use `#'wrap-print`. * [#128](https://github.com/nrepl/nrepl/pull/128): New middleware, `nrepl.middleware.caught`, provides a hook called when eval, read, or print throws an exception or error. Defaults to `clojure.main/repl-caught`. Configurable by the dynamic var `nrepl.middleware.caught/*caught-fn*`. #### Bugs fixed * [CLI] Make sure ack port parameter is converted to integer for command line nREPL initialization. * [CLI] When starting the REPL, make sure the transport option is used correctly. * [CLI] Make sure calling `send-ack` at `cmdline` ns works with the correct transport. * [#8](https://github.com/nrepl/nrepl/issues/8): Clean up context classloader after eval. #### Changes * [#16](https://github.com/nrepl/nrepl/issues/16): Use a single session thread per evaluation. * [#107](https://github.com/nrepl/nrepl/issues/107): Stop reading and evaluating code on first read error. * [#108](https://github.com/nrepl/nrepl/issues/108): Refactor cmdline functions into a public, reusable API. * Restore the `nrepl.bencode` namespace. ### 0.5.3 (2018-12-12) #### Bugs fixed * Make sure we never send a nil transport to via `send-ack`. ### 0.5.2 (2018-12-10) #### Bugs fixed * [CLI] [#90](https://github.com/nrepl/nrepl/issues/90): Doesn't display properly URLs if using a 3rd-party transport. ### 0.5.1 (2018-11-30) #### Changes * [#89](https://github.com/nrepl/nrepl/issues/89): Remove `tools.logging` dependency. ### 0.5.0 (2018-11-28) #### New features * [#12](https://github.com/nrepl/nrepl/issues/12): Support custom printing function in `pr-values`, enabling pretty-printed REPL results. * [#66](https://github.com/nrepl/nrepl/pull/66): Add support for a global and local configuration file. * [CLI] [#63](https://github.com/nrepl/nrepl/issues/63): Make it possible to specify the transport via the command-line client (`--transport/-t`). #### Bugs fixed * [#10](https://github.com/nrepl/nrepl/issues/10): Bind `*1`, `*2`, `*3` and `*e` in cloned session. * [#33](https://github.com/nrepl/nrepl/issues/33): Add ability to change value of `*print-namespace-maps*`. * [#68](https://github.com/nrepl/nrepl/issues/68): Avoid illegal access warning on JDK 9+ caused by `nrepl.middleware.interruptible-eval/set-line!`. * [CLI] [#77](https://github.com/nrepl/nrepl/issues/77): Exit cleanly after pressing `ctrl-d` in an interactive REPL. * [#13](https://github.com/nrepl/nrepl/issues/13): Catch ThreadDeath exception thrown by interrupt. #### Changes * [#56](https://github.com/nrepl/nrepl/issues/56): Bind the server by default to `127.0.0.1` instead of to `::` (this turned out to be a security risk). * [#76](https://github.com/nrepl/nrepl/pull/76): Move version-related logic to a dedicated namespace (`nrepl.version`). * Deprecate `nrepl.core/version`. * Deprecate `nrepl.core/version-string`. * [CLI] [#81](https://github.com/nrepl/nrepl/pull/81): Handle interrupt in interactive session. ### 0.4.5 (2018-09-02) #### New features * [CLI] The built-in the CLI generates an `.nrepl-port` file on server startup. * [CLI] [#39](https://github.com/nrepl/nrepl/issues/39): Add a `--connect` command-line option allowing you to connect. with the built-in client to an already running nREPL server. * [CLI] Add shorthand names for most command-line options. * [CLI] Add a `-v/--version` command-line option. #### Changes * [#32](https://github.com/nrepl/nrepl/issues/32): Extract the bencode logic in a [separate library](https://github.com/nrepl/bencode). #### Bugs fixed * [#38](https://github.com/nrepl/nrepl/issues/38): Remove extra newline in REPL output. ### 0.4.4 (2018-07-31) #### New features * [CLI] Added `--help` command-line option. * [CLI] Added `--bind` command-line option. * [CLI] Added `--handler` and `--middleware` command-line options. Extremely useful when starting nREPL using `clj` and `tools.deps`, as this allows you to inject middleware trivially without the need for something like `lein` or `boot`. #### Bugs fixed * [CLI] Add missing newline after colorized values displayed in the REPL. ### 0.4.3 (2018-07-26) #### New features * [CLI] Display connection info when starting the built-in cmd client. This makes it possible for clients like CIDER to parse it and auto-connect to the server. Pretty handy if you're using `clj` to start your server. #### Bugs fixed * [#16](https://github.com/nrepl/nrepl/issues/16): Don't change the thread used for form evaluation over time. See [#36](https://github.com/nrepl/nrepl/pull/36) for a discussion of the fix. **(partial fix)** #### Changes * The result of `nrepl.server/start-server` no longer contains the legacy key `:ss` from the days of nREPL 0.0.x. If someone was using it they should switch to `:server-socket` instead. * [#28](https://github.com/nrepl/nrepl/issues/28): Echo back missing ns during eval (previously you'd only get an error that a ns is missing, but no mention of the name of that namespace). ### 0.4.2 (2018-07-18) #### Changes * [#35](https://github.com/nrepl/nrepl/pull/35): Add constant DCL across evaluations (which means you can now easily hot-load dependencies). #### Bugs fixed * [#34](https://github.com/nrepl/nrepl/pull/34): Treat `nil` port as 0 (which assigns a random port). ### 0.4.1 (2018-05-23) #### Bugs fixed * [#11](https://github.com/nrepl/nrepl/issues/11): Don't read the version string from a resource file (`version.txt`). ### 0.4.0 (2018-05-21) #### Changes * [#4](https://github.com/nrepl/nrepl/issues/4): Change the project's namespaces. (**breaking**) `clojure.tools.nrepl` is now `nrepl.core`, the rest of the namespaces were renamed following the pattern `clojure.tools.nrepl.*` -> `nrepl.*`. ### 0.3.1 (2018-05-19) #### Bugs fixed * [#15](https://github.com/nrepl/nrepl/issues/15) Fix for `clojure.tools.nrepl.middleware.session` for `:unknown-session` error and `clojure.tools.nrepl.middleware.interruptible-eval` for `:no-code` error, the correct response of `:status :done` is now being returned. * [#26](https://github.com/nrepl/nrepl/issues/26): Recompile the Java classes for Java 8. ### 0.3.0 (2018-05-18) #### Changes * [#1](https://github.com/nrepl/nrepl/issues/1): Materially identical to `[org.clojure/tools.nrepl "0.2.13"]`, but released under `nrepl/nrepl` coordinates as part of the migration out of clojure-contrib https://github.com/nrepl/nrepl * `clojure.tools/logging` is now a normal dependency (it used to be an optional dependency). #### Bugs fixed * [#20](https://github.com/nrepl/nrepl/issues/20): If `start-server` is not provided with a `:bind` hostname, nREPL will default to binding to the ipv6 `::` (as before), but will now _always_ fall back to `localhost`. Previously, the ipv4 hostname was only used if `::` could not be resolved; this change ensures that the `localhost` fallback is used in networking environments where `::` is resolved successfully, but cannot be bound. -------------------------------------------------------------------------------- `0.2.13`: * `start-server` now binds to `::` by default, and falls back to `localhost`, avoiding confusion when working in environments that have both IPv4 and IPv6 networking available. (NREPL-83) `0.2.11`: * `clojure.tools.nrepl.middleware.interruptible-eval` now accepts optional `file`, `line`, and `column` values in order to fix location metadata to defined vars and functions, for more useful stack traces, navigation, etc. * REPL evaluations now support use of reader conditionals (loading `.cljc` files containing reader conditionals has always worked transparently) `0.2.10`: * `clojure.tools.nrepl.middleware.pr-values` will _not_ print the contents of `:value` response messages if the message contains a `:printed-value` slot. * `default-executor` and `queue-eval` in `clojure.tools.nrepl.middleware.interruptible-eval` are now public. `0.2.9`: * `clojure.tools.nrepl.middleware.interruptible-eval` now defines a default thread executor used for all evaluations (unless a different executor is provided to the configuration of `clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval`). This should aid in the development of `interrupt`-capable alternative evaluation middlewares/handlers. `0.2.8`: * The default bind address used by `clojure.tools.nrepl.server/start-server` is now `localhost`, not `0.0.0.0`. As always, the bind address can be set explicitly via a `:bind` keyword argument to that function. This is considered a security bugfix, though _technically_ it may cause breakage if anyone was implicitly relying upon nREPL's socket server to listen on all network interfaces. * The `ServerSocket` created as part of `clojure.tools.nrepl.server/start-server` is now configured with `SO_REUSEADDR` enabled; this should prevent spurious "address already in use" when quickly bouncing apps that open an nREPL server on a fixed port, etc. (NREPL-67) * Middlewares may now contribute to the response of the `"describe"` operation via an optional `:describe-fn` function provided via their descriptors. (NREPL-64) * The `:ns` component of the response to `"load-file"` operations is now elided, as it was (usually) incorrect (as a result of reusing `interruptible-eval` for handling `load-file` operations) (NREPL-68) `0.2.7`: * The topological sort ("linearization") applied to middleware provided to start a new nREPL server has been reworked to address certain edge case bugs (NREPL-53) * `interruptible-eval` no longer incorrectly clobbers a session's `*ns*` binding when it processes an `eval` message containing an `ns` "argument" * Eliminated miscellaneous reflection warnings `0.2.5`: * Clients can now signal EOF on `*in*` with an empty `:stdin` value (NREPL-65) * Clojure `:version-string` is now included in response to a `describe` operation (NREPL-63) * Improve representation of `java.version` information in response to a `describe` operation (NREPL-62) `0.2.4`: * Fixed the source of a reliable per-connection thread leak (NREPL-40) * Fix printing of lazy sequences so that `*out*` bindings are properly preserved (NREPL-45) * Enhance `clojure.tools.nrepl.middleware.interruptible-eval/evaluate` so that a custom `eval` function can be provided on a per-message basis (NREPL-50) * Fix pretty-printing of reference returned by `clojure.tools.nrepl.server/start-server` (NREPL-51) * nREPL now works with JDK 1.8 (NREPL-56) * The value of the `java.version` system property is now included in the response to a `describe` operation (NREPL-57) * Common session bindings (e.g. `*e`, `*1`, etc) are now set in time for nREPL middleware to access them in the case of an exception being thrown (NREPL-58) `0.2.3`: * Now using a queue to maintain `*in*`, to avoid intermittent failures due to prior use of `PipedReader`/`Writer`. (NREPL-39) * When loading a file, always bind `*print-level*` and `*print-length*` when generating the `clojure.lang.Compiler/load` expression (NREPL-41) `0.2.2`: * Added `clojure.tools.nrepl/code*` for `pr-str`'ing expressions (presumably for later evaluation) * session IDs are now properly combined into a set by `clojure.tools.nrepl/combine-responses` * fixes printing of server instances under Clojure 1.3.0+ (nREPL-37) `0.2.1`: * fixes incorrect translation between `Writer.write()` and `StringBuilder.append()` APIs (NREPL-38) `0.2.0`: Top-to-bottom redesign `0.0.6`: Never released; initial prototype of "rich content" support that (in part) helped motivate a re-examination of the underlying protocol and design. `0.0.5`: - added Clojure 1.3.0 (ALPHA) compatibility `0.0.4`: - fixed (hacked) obtaining `clojure.test` output when `clojure.test` is initially loaded within an nREPL session - eliminated 1-minute default timeout on expression evaluation - all standard REPL var bindings are now properly established and maintained within a session nrepl-0.6.0/Makefile 0000664 0000000 0000000 00000002454 13426365055 0014313 0 ustar 00root root 0000000 0000000 .PHONY: test docs eastwood cljfmt cloverage release deploy clean VERSION ?= 1.9 # Some tests need to be filtered based on JVM version. This selector # will be mapped to a function in project.clj, and that function # determines which `deftest` to run based on their metadata. JAVA_VERSION := $(shell lein with-profile +sysutils \ sysutils :java-version-simple | cut -d " " -f 2) TEST_SELECTOR := :java$(JAVA_VERSION) test: lein with-profile +$(VERSION) test $(TEST_SELECTOR) eastwood: lein with-profile +$(VERSION),+eastwood eastwood cljfmt: lein with-profile +$(VERSION),+cljfmt cljfmt check cloverage: lein with-profile +$(VERSION),+cloverage cloverage --codecov verify_cljdoc: curl -fsSL https://raw.githubusercontent.com/cljdoc/cljdoc/master/script/verify-cljdoc-edn | bash -s doc/cljdoc.edn # When releasing, the BUMP variable controls which field in the # version string will be incremented in the *next* snapshot # version. Typically this is either "major", "minor", or "patch". BUMP ?= patch release: lein with-profile +$(VERSION) release $(BUMP) # Deploying requires the caller to set environment variables as # specified in project.clj to provide a login and password to the # artifact repository. deploy: lein with-profile +$(VERSION) deploy clojars clean: lein clean nrepl-0.6.0/README.md 0000664 0000000 0000000 00000010217 13426365055 0014126 0 ustar 00root root 0000000 0000000