martinklepsch / electron-and-clojurescript

💡 Make an electron app with nothing but ClojureScript!
MIT License
148 stars 21 forks source link

Update deps #2

Closed YurySolovyov closed 7 years ago

YurySolovyov commented 8 years ago

I tried updating deps as mentioned in #1, but it was not that easy. Following patch makes it compile, but I can't see target directory, where running it with current deps creates target directory just fine.

diff --git a/boot.properties b/boot.properties                             
index 740ade3..500dc80 100644                                              
--- a/boot.properties                                                      
+++ b/boot.properties                                                      
@@ -1,4 +1,4 @@                                                            
 #https://github.com/boot-clj/boot                                         
 #Fri Jul 31 00:07:27 CEST 2015                                            
-BOOT_CLOJURE_VERSION=1.7.0                                                
-BOOT_VERSION=2.2.0                                                        
+BOOT_CLOJURE_VERSION=1.8.0                                                
+BOOT_VERSION=2.6.0                                                        
diff --git a/build.boot b/build.boot                                       
index 50a6566..ae05232 100644                                              
--- a/build.boot                                                           
+++ b/build.boot                                                           
@@ -1,10 +1,13 @@                                                          
 (set-env!                                                                 
  :source-paths    #{"src"}                                                
  :resource-paths  #{"resources"}                                          
- :dependencies '[[adzerk/boot-cljs "1.7.48-3" :scope "test"]              
-                 [org.clojure/clojurescript "1.7.107"]                    
-                 [adzerk/boot-cljs-repl "0.1.10-SNAPSHOT" :scope "test"]  
-                 [adzerk/boot-reload    "0.3.2-SNAPSHOT"  :scope "test"]])
+ :dependencies '[[org.clojure/clojurescript "1.9.229"]                    
+                 [org.clojure/tools.nrepl "0.2.12" :scope "test"]         
+                 [com.cemerick/piggieback "0.2.1" :scope "test"]          
+                 [weasel "0.7.0" :scope "test"]                           
+                 [adzerk/boot-cljs "1.7.228-1" :scope "test"]             
+                 [adzerk/boot-cljs-repl "0.3.3" :scope "test"]            
+                 [adzerk/boot-reload    "0.4.12"  :scope "test"]])        

 (require                                                                  
  '[adzerk.boot-cljs      :refer [cljs]]                                   

I'll try to come up with a patch that updates enough deps to not break the build.

martinklepsch commented 8 years ago

@YurySolovyov that's a change in boot itself. Previously target/ was written implicitly but now you have to use the target task.

It's a kind of optimisation that is usually good but in this case where target/is needed it adds an extra step. Try extending dev-build so that it calls (target) at the end.

YurySolovyov commented 8 years ago

@martinklepsch ok, so that worked:

Try extending dev-build so that it calls (target) at the end.

I can see target/ folder now. Next issue is something repl-related, it seems like it drops host in ws connection for some reason:

image

Edit: even though watch task seems fine(ports are different asI launched it later, but you get the point):

boot watch dev-build                                                        
Writing boot_cljs_repl.cljs...                                                
Starting reload server on ws://localhost:51394                                
Writing adzerk/boot_reload/init646.cljs to connect to ws://localhost:51394... 

Starting file watcher (CTRL-C to quit)...                                     

nREPL server started on port 51395 on host 127.0.0.1 - nrepl://127.0.0.1:51395
Adding :require adzerk.boot-cljs-repl to renderer.cljs.edn...                 
Adding :require adzerk.boot-reload.init646 to renderer.cljs.edn...            
Compiling ClojureScript...                                                    
ò renderer.js                                                                 
Compiling ClojureScript...                                                    
ò main.js                                                                     
Writing target dir(s)...                                                      
Elapsed time: 17,454 sec                                                      
martinklepsch commented 8 years ago

If you expand the stacktrace, can you perhaps trace the error back to a relevant line in boot-reload? Looking at the code the fallback logic seems good and I don't see how it would end up with a nil host or similar.

YurySolovyov commented 8 years ago

This was my thought too, but when I tried to expand it, there was nothing there. Maybe I should've tried reloading the page, will try again tomorrow. Thanks.

YurySolovyov commented 8 years ago

Side question: why did you started with boot and not Leiningen?

martinklepsch commented 8 years ago

I prefer Boot's composable pipeline approach and in general it's a much more versatile tool than Leiningen and it's plugin architecture.

Is there anything that's bothering you about Boot?

YurySolovyov commented 8 years ago

I may be wrong, but it seems like Leiningen is de-facto standard. At least for the beginner like me :)

martinklepsch commented 8 years ago

@YurySolovyov Leiningen exists for much longer but Boot adoption has been increasing steadily since it was released. I personally think Boot is simply better and I've put in the time to be productive with it, doing things that would otherwise be very hard with Leiningen.

Do you know about the Clojurians Slack channel? http://clojurians.net/ There's a #boot channel which is very active and has lots of people happy to help if you run into any questions or issues. In any case I'm also happy to answer any questions you may have here.

martinklepsch commented 7 years ago

Closing this as #3 has been merged