I do not know whether you (Peter) are the same as the user pedro-w on
Github, but pedro-w created this Eastwood issue and added a comment with
links to a related discussion on a tools.reader issue tracker:
https://github.com/jonase/eastwood/issues/222

If you can find a way, with just tools.reader alone, to call
clojure.tools.reader/read in such a way that it first reads and uses the
contents of a data_readers.clj file, and then can successfully read the
sample .clj file in that issue #222 that causes Eastwood to fail now, that
sequence of API calls would be useful to know, and might be all that
Eastwood needs to work for projects with a non-empty data_readers.clj
file.  Adding that working sequence of API calls to Eastwood issue #222
would be a good place to document that, if someone finds out how to do it.


Yes, Eastwood does have source code copies of tools.reader and several
other open source libraries inside of itself, renamed to different
namespaces.  Why do such a crazy thing, you might reasonably ask?  Because
then Eastwood can read, analyze, and load tools.reader itself, without
conflicting with the one that Eastwood uses for its own purposes.  If a
project you want to lint via Eastwood is using an older version of
tools.reader, missing some function or feature Eastwood relies on, and
Eastwood didn't use this technique, it would fail on such a project.

I started 'dolly' (https://github.com/jafingerhut/dolly) to assist with
bringing new versions of libraries Eastwood depends upon into Eastwood,
renaming the namespaces semi-automatically for you.  It isn't in a shape
that I would recommend others to use right now, and it might never be in
that kind of shape, but it can do some things.  Its README mentions
mranderson as another similar project that might be better suited for
others.

Andy


On Thu, Jun 1, 2017 at 8:19 AM, Peter Hull <peterhul...@gmail.com> wrote:

> I had a quick look at this. As I understand it, the clojure.core reader
> processes data_readers.clj, but Eastwood uses tools.reader (or a version of
> it, copied into the Eastwood project?) which does not.
>
> I thought that, for linting, we don't need to actually run the data reader
> functions, so it should be possible to use the *default-data-reader-fn*
> mechanism to swallow the tag + value, returning 'something' (doesn't matter
> what, I used (gensym) ).
>
> I tried editing leiningen.eastwood/eastwood, but unfortunately couldn't
> find a way to set *default-data-reader-fn* such that tools.reader could
> pick it up. I am now at the limits of my clojur e knowledge!
>
> Does this sound reasonable? Any ideas what I am doing wrong?
>
> Pete
>
>
>
> On Thursday, 1 June 2017 07:19:04 UTC+1, Peter Hull wrote:
>>
>> On Thursday, 1 June 2017 06:55:52 UTC+1, Andy Fingerhut wrote:
>>>
>>> Sounds like a limitation/bug in the current Eastwood implementation that
>>> it doesn't handle this.  You are welcome to file an issue on Github:
>>> https://github.com/jonase/eastwood/issues
>>>
>>> Thanks for getting back to me. I've filed #222 (
>> https://github.com/jonase/eastwood/issues/222)
>> Pete
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to