Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-29 Thread Bozhidar Batsov
Sounds like a plan to me. :-)

On 28 July 2015 at 20:35, Stuart Sierra the.stuart.sie...@gmail.com wrote:

 Thanks for the responses everyone.

 So far, my general plan is starting to look like this:

 c.t.n.*dependency* and c.t.n.*track* are platform agnostic.

 c.t.n.*file* and c.t.n.*parse* can be extended to support Clojure 
 ClojureScript by adding an optional argument read-opts passed through to
 tools.reader/read.

 c.t.n.*find* can be extended with optional arguments to select a
 platform, either Clojure or ClojureScript, which will encapsulate both
 valid file extensions and reader options.

 Reload/refresh functionality will remain Clojure(JVM) only for now: c.t.n.
 *dir*, c.t.n.*reload*, and c.t.n.*repl*.

 More notes and work-in-progress are visible on TNS-35
 http://dev.clojure.org/jira/browse/TNS-35

 I'm not saying there will *never* be any ClojureScript support for
 refresh/reload, just that I have no idea how to do it right now and I want
 to deal with the easier problems first.

 –S

 --
 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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-28 Thread W. David Jarvis
Yagni uses dir/scan-all and tracker. Would love to have ClojureScript 
support.

On Saturday, July 25, 2015 at 7:29:24 PM UTC-4, Brian Marick wrote:

 Midje 

 Stuart Sierra wrote: 
  1. Do you need/want ClojureScript support? 

 Eventually, but not soon. 

  
  2. What namespaces (repl, find, dir, file, parse) do you call in 
  tools.namespace? 

 repl, dir, track, reload 

  
  3. How would you like to distinguish between get me Clojure 
  sources and get me ClojureScript sources? 

 I don't have an opinion. 


-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-28 Thread Stuart Sierra
Thanks for the responses everyone.

So far, my general plan is starting to look like this:

c.t.n.*dependency* and c.t.n.*track* are platform agnostic.

c.t.n.*file* and c.t.n.*parse* can be extended to support Clojure  
ClojureScript by adding an optional argument read-opts passed through to 
tools.reader/read.

c.t.n.*find* can be extended with optional arguments to select a 
platform, either Clojure or ClojureScript, which will encapsulate both 
valid file extensions and reader options.

Reload/refresh functionality will remain Clojure(JVM) only for now: c.t.n.
*dir*, c.t.n.*reload*, and c.t.n.*repl*.

More notes and work-in-progress are visible on TNS-35 
http://dev.clojure.org/jira/browse/TNS-35

I'm not saying there will *never* be any ClojureScript support for 
refresh/reload, just that I have no idea how to do it right now and I want 
to deal with the easier problems first.

–S

-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Daniel Compton
Kibit uses a vendored copy of file/clojure-file? and
find/find-clojure-sources-in-dir, to support other possible Clojure
extensions like cljx. Without the ability to add more extensions like cljx
we couldn't switch back, however even if they were added, it's probably not
worth adding the dep for two functions.

--
Daniel Compton
On Sat, 25 Jul 2015 at 2:48 PM Ambrose Bonnaire-Sergeant 
abonnaireserge...@gmail.com wrote:

 In core.typed I use *parse* and *file* to parse Clojure files and
 probably ClojureScript files eventually.

 I resolve the files myself so I don't have strong opinions on 3).

 Thanks,
 Ambrose

 On Sat, Jul 25, 2015 at 5:14 AM, Stuart Sierra 
 the.stuart.sie...@gmail.com wrote:

 Hello to anyone and everyone writing tools for working with Clojure and
 ClojureScript source files …

 I've been looking into adding better support for ClojureScript in
 tools.namespace.

 It's not a trivial problem. Lots of places in tools.namespace assume
 there is only one kind of source file. For Clojure 1.7 it got updated to
 include .cljc files as well, but it's still hard-coded. I've collected some
 of my notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

 My question to you: if you maintain a tool or library which uses
 tools.namespace:

1. Do you need/want ClojureScript support?

2. What namespaces (repl, find, dir, file, parse) do you call in
 tools.namespace?

3. How would you like to distinguish between get me Clojure sources
 and get me ClojureScript sources?

 Note: I am **not** proposing a full port of tools.namespace to
 ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled
 to JVM Clojure, and equivalent tools already exist for ClojureScript.

 This is just about using tools.namespace to parse and analyze the
 dependencies of ClojureScript source files, statically, the same way it now
 does for Clojure source files.

 Thanks,
 –S

 --
 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.

-- 
--
Daniel

-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Dylan Butman
I use .repl constantly for namespace reloading. Clojurescript support would 
be a fantastic improvement for reloading cljs component systems.

On Friday, July 24, 2015 at 5:14:04 PM UTC-4, Stuart Sierra wrote:

 Hello to anyone and everyone writing tools for working with Clojure and 
 ClojureScript source files …

 I've been looking into adding better support for ClojureScript in 
 tools.namespace.

 It's not a trivial problem. Lots of places in tools.namespace assume there 
 is only one kind of source file. For Clojure 1.7 it got updated to include 
 .cljc files as well, but it's still hard-coded. I've collected some of my 
 notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

 My question to you: if you maintain a tool or library which uses 
 tools.namespace:

1. Do you need/want ClojureScript support?

2. What namespaces (repl, find, dir, file, parse) do you call in 
 tools.namespace?

3. How would you like to distinguish between get me Clojure sources 
 and get me ClojureScript sources?

 Note: I am **not** proposing a full port of tools.namespace to 
 ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled 
 to JVM Clojure, and equivalent tools already exist for ClojureScript.

 This is just about using tools.namespace to parse and analyze the 
 dependencies of ClojureScript source files, statically, the same way it now 
 does for Clojure source files.

 Thanks,
 –S


-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Bozhidar Batsov
Stuart mentioned that equivalent tools already exist for cljs, but I'm not
sure what he refers to. CIDER makes use of `c.t.n.repl/refresh` (its
lower-level blocks to be precise) and it'd be great if we could provide the
same functionality for cljs.

On 25 July 2015 at 17:37, Dylan Butman dbut...@gmail.com wrote:

 I use .repl constantly for namespace reloading. Clojurescript support
 would be a fantastic improvement for reloading cljs component systems.


 On Friday, July 24, 2015 at 5:14:04 PM UTC-4, Stuart Sierra wrote:

 Hello to anyone and everyone writing tools for working with Clojure and
 ClojureScript source files …

 I've been looking into adding better support for ClojureScript in
 tools.namespace.

 It's not a trivial problem. Lots of places in tools.namespace assume
 there is only one kind of source file. For Clojure 1.7 it got updated to
 include .cljc files as well, but it's still hard-coded. I've collected some
 of my notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

 My question to you: if you maintain a tool or library which uses
 tools.namespace:

1. Do you need/want ClojureScript support?

2. What namespaces (repl, find, dir, file, parse) do you call in
 tools.namespace?

3. How would you like to distinguish between get me Clojure sources
 and get me ClojureScript sources?

 Note: I am **not** proposing a full port of tools.namespace to
 ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled
 to JVM Clojure, and equivalent tools already exist for ClojureScript.

 This is just about using tools.namespace to parse and analyze the
 dependencies of ClojureScript source files, statically, the same way it now
 does for Clojure source files.

 Thanks,
 –S

  --
 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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Stuart Sierra
On Sat, Jul 25, 2015 at 10:37 AM, Dylan Butman dbut...@gmail.com wrote:

 Clojurescript support would be a fantastic improvement for reloading cljs
 component systems.


As I said, I am not planning a complete port of the reloading functionality
of clojure.tools.namespace.repl to work in ClojureScript. The mechanics of
reloading code are completely different in ClojureScript.

The ClojureScript compiler itself now has some auto-compiling
functionality, and tools like lein-figwheel are filling in the rest.

–S

-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Stuart Sierra
On Sat, Jul 25, 2015 at 11:15 AM, Bozhidar Batsov wrote:

 it'd be great if we could provide the same functionality for cljs.


I'd like to say I know how to do that, but I just don't think it's possible
right now. The way tools.namespace does reloading in Clojure(JVM) depends
on implementation details of the Clojure runtime, including the function
remove-ns which doesn't exist in ClojureScript.

–S

-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Brian Marick

Midje

Stuart Sierra wrote:

1. Do you need/want ClojureScript support?


Eventually, but not soon.



2. What namespaces (repl, find, dir, file, parse) do you call in
tools.namespace?


repl, dir, track, reload



3. How would you like to distinguish between get me Clojure
sources and get me ClojureScript sources?


I don't have an opinion.

--
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-25 Thread Lars Andersen
refactor-nrepl, which is the brain behind refactoring libraries like 
clj-refactor and clj-light-refactor uses:

1. find/find-namespaces-in-jarfile
2. file/clojure-file?
3. find/find-clojure-sources-in-dir
4. parse/read-ns-decl

And finally, dependency, file and track are used together to get a list of 
dependent namespaces, e.g. to find out which files are affected when a file 
or dir of files has been moved.

As we add refactoring support for cljs, tools.namespace is one of the 
libraries we're going to lean on.  Since refactor-nrepl is a side project, 
support for cljs in libraries like tools.namespace often end up being a 
deciding factor when debating which feature to build next.

I don't have a strong opinion on 3, but get-me-all-source-files with 
predicate functions for filtering might be nice, because the predicate 
functions themselves are somewhat useful.

Thanks for working on tools.namespace, it's been a joy to use when writing 
tooling!

Lars

On Friday, July 24, 2015 at 11:14:04 PM UTC+2, Stuart Sierra wrote:

 Hello to anyone and everyone writing tools for working with Clojure and 
 ClojureScript source files …

 I've been looking into adding better support for ClojureScript in 
 tools.namespace.

 It's not a trivial problem. Lots of places in tools.namespace assume there 
 is only one kind of source file. For Clojure 1.7 it got updated to include 
 .cljc files as well, but it's still hard-coded. I've collected some of my 
 notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

 My question to you: if you maintain a tool or library which uses 
 tools.namespace:

1. Do you need/want ClojureScript support?

2. What namespaces (repl, find, dir, file, parse) do you call in 
 tools.namespace?

3. How would you like to distinguish between get me Clojure sources 
 and get me ClojureScript sources?

 Note: I am **not** proposing a full port of tools.namespace to 
 ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled 
 to JVM Clojure, and equivalent tools already exist for ClojureScript.

 This is just about using tools.namespace to parse and analyze the 
 dependencies of ClojureScript source files, statically, the same way it now 
 does for Clojure source files.

 Thanks,
 –S


-- 
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.


Tool authors: ClojureScript support in tools.namespace?

2015-07-24 Thread Stuart Sierra
Hello to anyone and everyone writing tools for working with Clojure and 
ClojureScript source files …

I've been looking into adding better support for ClojureScript in 
tools.namespace.

It's not a trivial problem. Lots of places in tools.namespace assume there 
is only one kind of source file. For Clojure 1.7 it got updated to include 
.cljc files as well, but it's still hard-coded. I've collected some of my 
notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

My question to you: if you maintain a tool or library which uses 
tools.namespace:

   1. Do you need/want ClojureScript support?

   2. What namespaces (repl, find, dir, file, parse) do you call in 
tools.namespace?

   3. How would you like to distinguish between get me Clojure sources 
and get me ClojureScript sources?

Note: I am **not** proposing a full port of tools.namespace to 
ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled to 
JVM Clojure, and equivalent tools already exist for ClojureScript.

This is just about using tools.namespace to parse and analyze the 
dependencies of ClojureScript source files, statically, the same way it now 
does for Clojure source files.

Thanks,
–S

-- 
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.


Re: Tool authors: ClojureScript support in tools.namespace?

2015-07-24 Thread Ambrose Bonnaire-Sergeant
In core.typed I use *parse* and *file* to parse Clojure files and probably
ClojureScript files eventually.

I resolve the files myself so I don't have strong opinions on 3).

Thanks,
Ambrose

On Sat, Jul 25, 2015 at 5:14 AM, Stuart Sierra the.stuart.sie...@gmail.com
wrote:

 Hello to anyone and everyone writing tools for working with Clojure and
 ClojureScript source files …

 I've been looking into adding better support for ClojureScript in
 tools.namespace.

 It's not a trivial problem. Lots of places in tools.namespace assume there
 is only one kind of source file. For Clojure 1.7 it got updated to include
 .cljc files as well, but it's still hard-coded. I've collected some of my
 notes in TNS-35: http://dev.clojure.org/jira/browse/TNS-35

 My question to you: if you maintain a tool or library which uses
 tools.namespace:

1. Do you need/want ClojureScript support?

2. What namespaces (repl, find, dir, file, parse) do you call in
 tools.namespace?

3. How would you like to distinguish between get me Clojure sources
 and get me ClojureScript sources?

 Note: I am **not** proposing a full port of tools.namespace to
 ClojureScript. Something like c.t.n.repl/refresh is too tightly coupled
 to JVM Clojure, and equivalent tools already exist for ClojureScript.

 This is just about using tools.namespace to parse and analyze the
 dependencies of ClojureScript source files, statically, the same way it now
 does for Clojure source files.

 Thanks,
 –S

 --
 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.