LightTable / Clojure

Light Table Clojure language plugin
MIT License
99 stars 51 forks source link

`:refer :all` does not work with "make current editor an instarepl" command #55

Closed olivergg closed 8 years ago

olivergg commented 8 years ago

I have a simple clojure (not clojurescript) project and I use the instarepl with lighttable. Everything was working fine until I've updated to the latest version of the Clojure plugin. Now, whenever I try to evaluate the following :

(ns olivergg.euler.problem_54
  (:require [olivergg.euler.common :refer :all]
            [clojure.set :refer :all]
            )
  )

an error occurs :

:refer must be followed by a sequence of symbols in :require / :require-macros; offending spec: [olivergg.euler.common :refer :all] at line 1

(BTW, it would be great to be able to copy paste that kind of error message)

kenny-evitt commented 8 years ago

@olivergg Would you link to your example code so I can try to reproduce? That's definitely a ClojureScript error.

olivergg commented 8 years ago

@kenny-evitt Yes, that's what I've guessed. You can see some examples in my github project : https://github.com/olivergg/clojure-euler/blob/master/src/olivergg/euler/problem_53.clj

kenny-evitt commented 8 years ago

@olivergg Are you running version 0.7.2? And what OS are you on? And what version of the Clojure plugin do you have installed? (And what other plugins, and what versions, do you have installed?)

I cloned your repo and evaluated the file to which you linked – LT connected to your project fine.

olivergg commented 8 years ago

@kenny-evitt I use LT 0.7.2 on ArchLinux with clojure 1.7.0 The installed plugins are : image

kenny-evitt commented 8 years ago

@olivergg When I tried to reproduce yesterday I was running LT 0.7.2 with version 0.1.1 of the Clojure plugin. I tried just now using a build of a very recent version of master and, first, with version 0.1.1 of the Clojure plugin, and then with version 0.1.3 of the Clojure plugin – in neither case could I reproduce this.

Are you running into this error when you run problem 53 or problem 54? Or both? The version of problem 54 in the version of your example repo that I cloned doesn't match the example code in your original comment. But even when I change the namespace declaration to match your example code, I still can't reproduce the error you reported.

Would you try running lein clean in your project's root directory in a terminal and then trying to reproduce this again? Or maybe clone your repo into a separate, new directory and try to reproduce it with that copy of our code?

You could also try removing individual plugins. It's possible one of them is causing this.

olivergg commented 8 years ago

I had to revert to :as in problem 54 to continue to work on it. But I've got the same issue with all the problems. I've just tried lein clean and it's still the same. I'll try removing individual plugins until it works. Thanks.

olivergg commented 8 years ago

By the way, I don't know if it was clear....but it's only the insta REPL live mode that does not work. Normal eval (with ctrl+enter) does work.

kenny-evitt commented 8 years ago

@olivergg I was able to reproduce this with the "Make current editor an instarepl" command.

kenny-evitt commented 8 years ago

@cldwalker @rundis This is weird. Any ideas?

rundis commented 8 years ago

Seems the ns form get's restricted to what's supported by ClojureScript when in instarepl mode, actually it seems the entire ns handling stuff is clojurescript specific.

olivergg commented 8 years ago

It's getting weirder. I've just tried to clone my repo on an Ubuntu 14.04 machine..... and everything works fine here.....

kenny-evitt commented 8 years ago

@olivergg Sorry, but I've got to 'defy the data' about this working on another box. I strongly suspect something isn't the same. I had to modify the code for problem 54 to match your original example code in this issue – are you sure you did the same when you tried just now? You wrote that you cloned the repo but you didn't state whether you modified the code, or even that you used the same problem namespace file.

Let's all agree to use a single example – please create a separate repo with a minimal example for which we can all reproduce this.

olivergg commented 8 years ago

@kenny-evitt Okay, I've managed to reproduce the issue on a minimal hello world project 1) lein new helloworld 2) Edit core.clj and add (:require [clojure.set :refer :all]) 3) Make the current editor an instarepl

kenny-evitt commented 8 years ago

@olivergg thanks

cldwalker commented 8 years ago

This issue has moved to https://github.com/LightTable/ClojureInstarepl/issues/15 as the instarepl is now its own plugin