Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

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

Closed
olivergg opened this issue Sep 15, 2015 · 15 comments
Closed
Labels

Comments

@olivergg
Copy link

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
Copy link

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

@olivergg
Copy link
Author

@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
Copy link

@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
Copy link
Author

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

@kenny-evitt
Copy link

@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
Copy link
Author

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
Copy link
Author

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
Copy link

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

@kenny-evitt kenny-evitt changed the title :refer :all does not work anymore in a clojure project :refer :all does not work with "make current editor an instarepl" command Sep 22, 2015
@kenny-evitt
Copy link

@cldwalker @rundis This is weird. Any ideas?

@rundis
Copy link
Contributor

rundis commented Sep 23, 2015

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
Copy link
Author

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
Copy link

@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
Copy link
Author

@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
Copy link

@olivergg thanks

@cldwalker
Copy link
Member

This issue has moved to LightTable/ClojureInstarepl#15 as the instarepl is now its own plugin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants