Re: [ClojureScript] 1.7.160 :modules when you require their ns...

2015-10-27 Thread Sebastian Bensusan
Hi Martin,

>From your explanation + examples it is not clear to me what the problem is. 
>Would you mind putting together a small repo with a build script that shows 
>the problem? Having that it will be much easier to discuss it and determine if 
>there is a problem in the compiler.

Thanks!

Sebastian

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] 1.7.160 :modules when you require their ns...

2015-10-26 Thread Martin Weber
On Monday, October 26, 2015 at 3:10:57 PM UTC+1, David Nolen wrote:
> Based on what you've said so far it's not clear whether you misunderstand the 
> purpose of :modules. :modules is only about code splitting advanced builds. 
> It has nothing do with dependencies.
> 
> 
> David

splitting compiled code and dependency management go hand-in-hand, don't they? 
(how would you load the code-split build without e.g. cljs.* present?)

But that aside, is it intentional that if I do
(ns mine.core
 (:require [mine.something :as something]))

and

(ns mine.something)

and define a module to include mine.something

and compile that module to a file something.js

that this file something.js is essentially empty?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] 1.7.160 :modules when you require their ns...

2015-10-26 Thread David Nolen
Based on what you've said so far it's not clear whether you misunderstand
the purpose of :modules. :modules is only about code splitting advanced
builds. It has nothing do with dependencies.

David

On Mon, Oct 26, 2015 at 9:57 AM, Martin Weber 
wrote:

> Assume I got modules compilation with cljsbuild to work (with a local
> 1.7.160 build, because .145 is broken in that regard, put the
> 1.7.160-aot.jar into my lib/ and be happy it works).
>
> Assume I have ns "mine.something" and "mine.core" and a :modules entry
> {:something {:output-to ".../something.js" :entries #{"mine.something"}}}
>
> #1 If I do not require mine.something in mine.core (or elsewhere,
> transitively), and compile the sources, I get a something.js with content
> as one would expect, representing the code defined in something.cljs, but
> does not include the dependencies - neither view google dependency calls
> nor via code inclusion.
>
> Is there a way to control dep inclusion? (as in:
> - don't include any deps,
> - include those deps that are specific to myself but not those present
> already,
> - include all my deps, including cljs itself)
>
> Without this capability modules need management of their dependencies
> basically in a manual matter, which is .. suboptimal.
>
> #2 If I require mine.something in mine.core, and compile the sources, I
> get a something.js with no content other than the source map file comments,
> like
> //# sourceMappingURL=something.js.map
> Instead its code is compiled into the same output as the using namespace
> is being compiled to (here: mine.core, i.e. to cljs-base.js)
>
> I believe this is a bug.
>
> Regards,
> -Martin
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] 1.7.160 :modules when you require their ns...

2015-10-26 Thread Martin Weber
Assume I got modules compilation with cljsbuild to work (with a local 1.7.160 
build, because .145 is broken in that regard, put the 1.7.160-aot.jar into my 
lib/ and be happy it works).

Assume I have ns "mine.something" and "mine.core" and a :modules entry 
{:something {:output-to ".../something.js" :entries #{"mine.something"}}}

#1 If I do not require mine.something in mine.core (or elsewhere, 
transitively), and compile the sources, I get a something.js with content as 
one would expect, representing the code defined in something.cljs, but does not 
include the dependencies - neither view google dependency calls nor via code 
inclusion.

Is there a way to control dep inclusion? (as in: 
- don't include any deps, 
- include those deps that are specific to myself but not those present already, 
- include all my deps, including cljs itself) 

Without this capability modules need management of their dependencies basically 
in a manual matter, which is .. suboptimal.

#2 If I require mine.something in mine.core, and compile the sources, I get a 
something.js with no content other than the source map file comments, like 
//# sourceMappingURL=something.js.map
Instead its code is compiled into the same output as the using namespace is 
being compiled to (here: mine.core, i.e. to cljs-base.js)

I believe this is a bug.

Regards,
-Martin

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.