The spec's load-file op (with file-path) loads a file by path on the server side. The existing Clojure nREPL load-file works differently: it takes a file parameter containing the full source as a string and evaluates it inline, behaving close to eval.
@alexander-yakushev pointed out that this is a compatibility-breaking change, and that CIDER may soon replace its load-file usage with eval calls anyway.
@technomancy responded that a server could support both shapes (old behavior when file is present, new behavior when file-path is present), though he agrees the old behavior shouldn't be in the spec.
Options:
- Spec both shapes, with discovery rules.
- Drop
load-file from the spec entirely and let clients use eval.
- Keep only the new shape and accept the compat break.
The spec's
load-fileop (withfile-path) loads a file by path on the server side. The existing Clojure nREPLload-fileworks differently: it takes afileparameter containing the full source as a string and evaluates it inline, behaving close toeval.@alexander-yakushev pointed out that this is a compatibility-breaking change, and that CIDER may soon replace its
load-fileusage withevalcalls anyway.@technomancy responded that a server could support both shapes (old behavior when
fileis present, new behavior whenfile-pathis present), though he agrees the old behavior shouldn't be in the spec.Options:
load-filefrom the spec entirely and let clients useeval.