Comments (4)
A reproducing case would be great, thanks.
from potemkin.
Hey, thanks for the quick response. I'm digging into this a little more and it looks like I've got more of a heisenbug than I initially realized -- I'm now having trouble reproducing it myself.
I'll see if it turns up again; in the meantime sorry for raising the alarm prematurely =)
from potemkin.
No worries. All of these tools are different kinds of hacks, I wouldn't be surprised if there are lurking issues. Let me know if you find anything else.
from potemkin.
I came across this same issue I think you describe and I can reproduce it as follows.
say you have var
#'foo/bar
and you use import vars like this
(ns importer)
(import-vars
[foo bar])
then, in another ns you have
(ns consumer (:require [importer :refer :all]))
now in the result of (ns-refers 'consumer)
you will see #'importer/bar
but the :ns on the metadata of that var will be foo
as expected. all ok so far.
now, with clojure.tools.namespace, when you have a compilation error, it calls clojure.tools.namespace.repl/recover-ns which walks over the ns-refers of your current ns and for each one calls (refer ns ...)
, but the ns in question is found from the metadata, which is foo. the current ns already has bar from importer, and that is where it blows up.
from potemkin.
Related Issues (20)
- Source for 0.3.13 HOT 2
- Macros define var even if not evaluated HOT 1
- Any chance of a version of import-vars that works for cljc? HOT 1
- Empty defprotocol+ bodies cause definition to not occur HOT 2
- Add examples for optional names to README
- Reconsider ClojureScript support? HOT 1
- Document how `import-vars` interacts with direct-linking and namespace reloading HOT 2
- def-derived-map has a broken hashCode if any key is nil HOT 3
- Metadata handling by `postwalk` in some cases
- Reliable JVM crash using definterface+ HOT 4
- wow, awesome naming! HOT 3
- def-map-type's predefined count doesn't run in constant time HOT 1
- Boxed math warning at unchecked-add
- Question: why so many ancestors difference betwence Clj map and a PotemkinMap? HOT 1
- Top-level namespace breaks jdeps analysis HOT 2
- docs: describe defprocotol+ HOT 9
- docs: add caveat about import-vars? HOT 2
- `def-map-type` breaks in namespaces that shadow core Clojure methods like `instance?`
- Potential breakage
- potemkin maps are `(instance? java.util.Iterator)` but clojure maps are not
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from potemkin.