Giter VIP home page Giter VIP logo

edge's Introduction

Edge

zulip join chat brightgreen

Documentation is hosted at juxt.pro. The sources can be browsed offline in doc/resources/doc/sources/index.adoc.

Tip
Use Asciidoctor browser extension to view these as html in your browser.

Intro

For newcomers to the Clojure language it can be quite a daunting task to put together a real Clojure application from scratch. That’s why we’ve done this initial step for you and creating a project that you can learn from and build upon.

This isn’t merely a toy application. Edge is JUXT’s baseline architecture which we use for our own professional Clojure projects. The name is taken from Datum edge.

Features

Edge is a simple foundation integrating the following:

With examples for:

For more information on why you’d use Edge, see Why Edge?.

The MIT License (MIT)

Copyright © 2016-2019 JUXT LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

edge's People

Contributors

arichiardi avatar armincerf avatar athomasoriginal avatar cataboom avatar christianberg avatar clashthebunny avatar danielcompton avatar deduktion avatar dharrigan avatar johantonelli avatar jonpither avatar jumarko avatar jvtrigueros avatar luciodale avatar malcolmsparks avatar martinbalfanz avatar mauricioszabo avatar mlotysz avatar pez avatar rickesh17 avatar severeoverfl0w avatar snichme avatar vladkotu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge's Issues

Unable to run `(go)` - no nREPL in classpath

edge/main$ git rev-parse HEAD
248512d1db83eccdbe6a1db223cc626d5a3ea0f6
edge/main$ ../bin/rebel -A:dev:build:dev/rebel
[Edge] Starting development environment, please wait…
[Rebel readline] Type :repl/help for online help info
[Edge] Loading Clojure code, please wait...
[Edge] Now enter (go) to start the dev system
dev=> (go)
CompilerException java.io.FileNotFoundException: Could not locate nrepl/server__init.class or nrepl/server.clj on classpath., compiling:(figwheel_sidecar/components/nrepl_server.clj:6:1) 
dev=>

This commit added org.clojure/tools.nrepl to the exclusions in figwheel-sidecar dependency: e879617
If I remove the exclusion, (go) appears to be working.

[RFC] Optional components in a system

Problem

There are a few cases in which you want to swap out entirely different components into your system. For example, switching development stubs for real production components, or only running kick during development and using one-shot builds in production.

Status

I'm looking to gather feedback on the below solutions, and possibly any additional solutions that can be considered.

Proposed Solutions

:component/remove?

Pros

  • Clear what is going to happen.
  • Clear use with all aero conditionals

Cons

  • Requires enumeration of all NOT cases in conditionals. This is not easy with, e.g. #profile. For example, to only have a component in production:
    :foo {:component/remove? #profile {:dev true :test true}}
  • Production components with dependencies are unable to be grouped with their dependencies as part of the conditional. This makes it harder to mentally follow code paths as a group.

:component/keep?

If (and (contains? x :component/keep?) (not (:component/keep? x))) then remove the component.

Pros

  • Clear what is going to happen (but less clear than :component/remove)
  • Clear use with aero conditionals

Cons

  • As a contains? check is in place, this violates some expectations of the default value for this key being nil (falsey)
  • Production components with dependencies are unable to be grouped with their dependencies as part of the conditional. This makes it harder to mentally follow code paths as a group.

Subsystem

There are a few ways this could look, and each of them have more/less obvious syntax to them. I think the below is the most obvious syntax that's valid edn.

:ig/system
{:web-server
 {:emailer #ig/ref :emailer}

 #subsystem :email-subsystem
 #profile {:dev {:email-stub 5}
           :prod {:smtp-emailer {:smtp-conn #ig/ref :smtp-conn}
                  :smtp-conn {:host "127.0.0.1" :username "user"}}}

 ;; nil value (as would be for the :production case) results in no alteration.
 #subsystem :dev-util
 #profile {:dev {:some-dev-util "blah"}}
}

The result of this in production is a system like so:

:web-server {:emailer #ig/ref :emailer}
:smtp-emailer {…}
:smtp-conn {:host "" …}

That is, there is no namespacing from the nested subsystem.

Pros

  • Groups branching points and their dependencies together
  • Unspecified conditional branches are removed automatically

Cons

  • Introduces new syntax
  • Naming a subsystem may imply namespacing, but implicit namespacing would break #ig/ref
  • I can imagine uncertainty over usage of #ig/ref inside a subsystem/across subsystem boundaries.

#merge

Encourage #merge for this case:

:ig/system #merge [
  {:web-server {:emailer #ig/ref :emailer}}
  #profile {
   :prod {:smtp-emailer {…}
          :smtp-conn {…}}
   :dev {:emailer-stub {}}
  }
  #profile {:dev {:some-dev-util "blah"}}
]

Pros

  • Uses existing features of aero
  • Builds on clojure semantics

Cons

  • Requires converting existing call of a {} to a #merge []
  • Requires breaking up system into lots of smaller systems in order to have some key proximity with regards to logical grouping of components (e.g. putting email related components near things that use email things inside the map).
  • Looks a bit ugly. This is personal aesthetic though, not a strong argument.

Implicit merge

Instead of only considering the :ig/system key, a :edge.system/overlays key could be considered also.
This would be a map of named subsystems which would be merged in.
Conflicting keys in maps would be an error.

{:ig/system {:web-server #ig/ref :emailer}
 :edge.system/overlays
 {:emailer-impl #profile {:prod {:smtp-emailer {…} :smtp-conn {…}}
                          :dev {:emailer-stub {}}}
                          
  :dev-utils #profile {:dev {…}}}}

Pros

  • Low syntax
  • Clear use with aero built-in conditionals
  • Named branching points allows for conflict detection with useful information, e.g.
    :dev-utils and :emailer both contain :smtp-emailer, and none has priority. :boom:
    
  • Allows grouping dependencies of branching points together
  • Unspecified conditional branches are removed automatically

Cons

  • Implicit merging means that it is more "magical". Good naming & logging will help reduce the impact of this.
  • Naming a subsystem may imply namespacing, but implicit namespacing would break #ig/ref

boot uberjar fails

A new clone of this project at cc9ad27
With

$ boot --version
#http://boot-clj.com
#Thu Jan 05 16:57:57 CET 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0-alpha12
BOOT_VERSION=2.6.0

And

$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~15.10.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
$ boot uberjar
Building uberjar
Compiling {sass}... 8 changed files.
Compiling ClojureScript...
• edge.js
Compiling 1/1 edge.main...
             clojure.lang.ExceptionInfo: java.io.IOException: File name too long, compiling:(yada/schema.clj:84:3)
    data: {:file "/tmp/boot.user6370988360429421521.clj", :line 61}
clojure.lang.Compiler$CompilerException: java.io.IOException: File name too long, compiling:(yada/schema.clj:84:3)
                    java.io.IOException: File name too long
                                ...  

java.lang.IllegalStateException when running boot dev

Hi, when I followed the tutorial and run boot dev, there was this error:

     clojure.lang.ExceptionInfo: template already refers to: #'boot.core/template in namespace: adzerk.boot-reload
    data: {:file "adzerk/boot_reload.clj", :line 1}
java.lang.IllegalStateException: template already refers to: #'boot.core/template in namespace: adzerk.boot-reload
                                       ...
                        clojure.core/refer                          core.clj: 4098
                                       ...
                        clojure.core/apply                          core.clj:  632
                     clojure.core/load-lib                          core.clj: 5730
                                       ...
                        clojure.core/apply                          core.clj:  632
                    clojure.core/load-libs                          core.clj: 5749
                                       ...
                        clojure.core/apply                          core.clj:  632
                      clojure.core/require                          core.clj: 5832
                                       ...

This is my boot -h output:

#http://boot-clj.com
#Thu Jun 23 11:13:55 CST 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.7.0
BOOT_VERSION=2.6.0

Add Emacs instructions for cljs apps

CIDER 21.1 is asking for the following on M-x cider-jack-in-clj&cljs:

Select ClojureScript REPL type:

(perhaps this should be written into .dir-locals.el)

Select figwheel-main build (e.g. :dev):

Not sure what to put here. If I try 'app' I get the following error:

Execution error (ExceptionInfo) at cljs.cli/missing-file (cli.clj:192).
File app.cljs.edn does not exist

Clojure REPL is not bootstrapped

Hello folks!

I was investigating the possibility of have a double repl in a unique boot session and I saw your project. It looks like you were able to achieve this at some point but at the moment this project only bootstraps a cljs repl on port 5710.

Is there a direction I can take in order to fix that?

Thanks and keep up the good work!

Recompile Error Message

Compiling ClojureScript...
? edge.js
Writing target dir(s)...
java.net.BindException
: Address already in use

...

clojure.tools.nrepl.server/start-server/invokeStatic

server.clj:
143

clojure.tools.nrepl.server/start-server
server.clj
:
121

...

clojure.core/apply/invokeStatic
core.clj
:
646

clojure.core/apply

core.clj:
641

      boot.repl-server/start-server/invokeStatic

repl_server.clj:
83

                   boot.repl-server/start-server     repl_server.clj:   66
                          boot.repl/launch-nrepl            repl.clj:   51
                          boot.core/launch-nrepl            core.clj: 1228
                                             ...                          
                 clojure.core/apply/invokeStatic            core.clj:  646
                              clojure.core/apply            core.clj:  641
                     boot.task.built-in/fn/fn/fn        built_in.clj:  392
                                             ...                          
                 clojure.core/deref/invokeStatic            core.clj: 2228
                              clojure.core/deref            core.clj: 2214
                  boot.task.built-in/fn/fn/fn/fn        built_in.clj:  395
                  boot.task.built-in/fn/fn/fn/fn  
  built_in.clj:  

303
adzerk.boot-cljs/eval294/fn/fn/fn

boot_cljs.clj:
201

               adzerk.boot-cljs/eval242/fn/fn/fn

boot_cljs.clj:
135

          adzerk.boot-cljs-repl/eval396/fn/fn/fn

boot_cljs_repl.clj
:
164

                  boot.task.built-in/fn/fn/fn/fn

  built_in.clj: 

396

boot.task.built-in/fn/fn/fn/fn
built_in.clj
:
394

          adzerk.boot-reload/eval521/fn/fn/fn/fn

boot_reload.clj:
140

adzerk.boot-reload/eval521/fn/fn/fn
boot_reload.clj
:
139

deraen.boot-sass/eval613/fn/fn/fn

boot_sass.clj:

46

                  boot.task.built-in/fn/fn/fn/fn

built_in.clj:
167

            boot.task.built-in/fn/fn/fn/fn/fn/fn

  built_in.clj

:
348

               boot.task.built-in/fn/fn/fn/fn/fn

  built_in.clj

:
348

boot.task.built-in/fn/fn/fn/fn

built_in.clj:
345

boot.core/run-tasks
core.clj
:
938

                               boot.core/boot/fn

core.clj
:
948

clojure.core/binding-conveyor-fn/fn
core.clj:
1938
...

Elapsed time: 0.546 sec

deduce-version-from-git Error with shell command

Thanks for a great project setup to get started, I'm pretty new to the whole Clojure world and this is greatly appreciated!

I just pulled down the latest changes from github and after that boot dev will not start, it gives me an java.lang.NumberFormatException.
The problem after a bit of testing was this new function deduce-version-from-git introduced here: 7c54b26
When I run this command (both in the repl and in my terminal) I get:

$ git describe --dirty --long --tags --match "[0-9].*"
fatal: No names found, cannot describe anything.

If I run without the --match flag I get: metail-115-gce4a740-dirty

Not sure what the desired output should be so I won't open a PR.

Integrate cljs dev tooling

https://github.com/bhauman/cljs-test-display
https://github.com/bhauman/devcards
https://github.com/binaryage/cljs-devtools

These are all useful. It would be great if there was some way to easily add these to a project.

  • It should be integrated into the default template.
  • There should be an upgradeable #merge or custom aero tag to devify a clojurescript build.
  • The tooling for printing out metadata information should be extended to the kick builder to detect which dev tools are on and provide links to the servers if necessary (e.g. To the devcards and test pages)
  • lib.cljs.dev could house all of these
  • html files should be created as a convenience for users, maybe with some custom css

Update project for Java 9

I cloned the project and tried to run it but got this error:

java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(aleph/http/client_middleware.clj:420:7)
  java.lang.ExceptionInInitializerError: 
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
             clojure.lang.ExceptionInfo: java.lang.ExceptionInInitializerError
    file: "/var/folders/x5/t1zvsp455tb1j07y_j6tddxm0000gn/T/boot.user545993743605152703.clj"
    line: 41

The issue seems to be an incompatibility with Java 9.

Updating details are here: https://www.deps.co/blog/how-to-upgrade-your-clojure-projects-to-use-java-9/

boot dev reports command not found

Hi I'm very new to the edge, I got the error: "command not found" when I tried to clone the project and run the 'boot dev' command. Is there sth missed?

Mach uberjar builds corrupt .jar file

This could be a Mach issue but more likely an edge one. When running mach uberjar, the resulting .jar is 8 bytes in size, whereas the file outputted by boot uberjar is 50Mb.

Provide an enhanced pretty printing socket server function

It would be quite useful for production environments to have an override socket server they can use which pretty prints results. Maybe using fipp/puget, but most likely just using clojure.pprint/pprint as it's built-in, and production-time dependencies aren't wanted usually.

(test-all) doesn't run any tests

Steps to reproduce:

$ git clone https://github.com/juxt/edge
$ git rev-parse HEAD

12d61e44923e3af6e935bd6f6c37e6085817802c

$ boot dev

Starting reload server on ws://localhost:60766
[...]
Elapsed time: 41.227 sec

$ boot repl (in new session)

REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha14
Java HotSpot(TM) 64-Bit Server VM 1.8.0_112-b16
        Exit: Control+D or (exit) or (quit)
[...]
user=>

user=> (test-all)


Testing user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
{:test 0, :pass 0, :fail 0, :error 0, :type :summary}

user=> (reset-and-test)

:reloading (edge.phonebook-app edge.selmer edge.phonebook.db edge.phonebook edge.sources edge.hello edge.examples edge.web-server edge.system edge.main user)

Testing user

Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
"Elapsed time: 1.54168 msecs"
{:test 0, :pass 0, :fail 0, :error 0, :type :summary}

Can't run boot in base of cloned edge directory

This is very wierd.
I am on OS X.
I cloned edge, cd edge, and run boot dev.
See the error below.

I can't even run boot -h in this repo.

From outside this repo, I can run boot -h fine.

edge git:(master) boot dev
   clojure.lang.ExceptionInfo: Could not locate com/stuartsierra/component__init.class or com/stuartsierra/component.clj on classpath:
    data: {:file
           "/var/folders/j7/8c8ps6n13xn7b5yw0df0bslw0001yl/T/boot.user7045153429829462527.clj",
           :line 5}
java.io.FileNotFoundException: Could not locate com/stuartsierra/component__init.class or com/stuartsierra/component.clj on classpath:
                     ...
    clojure.core/load/fn                          core.clj: 5641
       clojure.core/load                          core.clj: 5640
                     ...
   clojure.core/load-one                          core.clj: 5446
clojure.core/load-lib/fn                          core.clj: 5486
   clojure.core/load-lib                          core.clj: 5485
                     ...
      clojure.core/apply                          core.clj:  626
  clojure.core/load-libs                          core.clj: 5524
                     ...
      clojure.core/apply                          core.clj:  626
    clojure.core/require                          core.clj: 5607
                     ...
        boot.user/eval65  boot.user7045153429829462527.clj:    7
                     ...
      boot.main/-main/fn                          main.clj:  196
         boot.main/-main                          main.clj:  196
                     ...
        boot.App.runBoot                          App.java:  399
           boot.App.main                          App.java:  488
                     ...
               Boot.main                         Boot.java:  258

Example phonebook SPA app doesn't load

I've just cloned the Edge repository, added a boot task to integrate with Emacs CIDER (as per the readme), and launched the sample app with boot cider dev.

The server launches successfully and the sass and clojurescript compilation steps report success to the console, but when I navigate to the SPA example from the front page, I only see some introductory text and a <p> tag saying Initialising...

In the browser console, two errors report they couldn't load the compiled app artifacts:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (app.css, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (edge.js, line 0)

For info, after retrieving the various jars the boot task reports as follows:

Starting reload server on ws://localhost:62435
Writing adzerk/boot_reload/init28564.cljs to connect to ws://localhost:62435...
Writing boot_cljs_repl.cljs...
12:18:28.474 [clojure-agent-send-off-pool-0] INFO  edge.web-server - Started web-server on port 3000

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

Compiling {sass}... 8 changed files.
Adding :require adzerk.boot-reload.init28564 to edge.cljs.edn...
Retrieving cider-nrepl-0.12.0.pom from https://clojars.org/repo/
Retrieving refactor-nrepl-2.2.0.pom from https://clojars.org/repo/
Retrieving refactor-nrepl-2.2.0.jar from https://clojars.org/repo/ (11845k)
Retrieving cider-nrepl-0.12.0.jar from https://clojars.org/repo/ (322k)
nREPL server started on port 5600 on host 127.0.0.1 - nrepl://127.0.0.1:5600
Adding :require adzerk.boot-cljs-repl to edge.cljs.edn...
Compiling ClojureScript...
• edge.js
Writing target dir(s)...
2016-07-08 12:20:29.864 java[94827:8231576] 12:20:29.863 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
Elapsed time: 121.690 sec

Are there other initialisation steps I need to perform?

Create edge index page

Provide a page which lists useful links, for example:

  1. Link to auto-tests (if on)
  2. Link to root of main web server
  3. Link to devcards
  4. Custom links to particular areas of site (maybe with custom js to log you in for example? uncertain, could be done via having a special url which did the work too).

Harvesting these links should be extensible in some way.
They should be hosted ???.
Figwheel extra mains would be convenient but aren't universally available, and edge is supposed to be agnostic.
One option would be to start a third web server to host this, but I think 2 is already too many.

krei does not seem to hotreload changes to cljs code

After running edge, changing the hiccup in phonebook_app.cljs cases a page refresh but the change is not reflected. Even after killing and restarting the bin/repl process, changes aren't reflected.

If I check the target directory, the relevant cljs and js files have the right timestamps, but hold outdated code.

What could be the issue?

A single version of 3rd party dependencies with tools.deps

Would be desirable for a number of reasons to guarantee a single version of each 3rd party lib across all modules, not the case for now:

screenshot 2018-12-14 at 08 34 33
etc..

In Lein this would be where managed deps comes in.

Doesn't seem to be any great way to do this with current tools.deps, one (admittedly clunky) option would be a deps.edn in the root of edge with an alias of override deps for all the 3rd party libs. Set CLJ_CONFIG to the root of edge and make sure that alias is always specified.

Or a Make/Mach preprocessor?

Repl start Error Message

Starting REPL with boot in /Users/nomad/Projects/edge
Starting reload server on ws://localhost:49485
Writing adzerk/boot_reload/init28534.cljs to connect to ws://localhost:49485...
Writing boot_cljs_repl.cljs...
11:05:34.511 [clojure-agent-send-off-pool-0] INFO edge.web-server - Started web-server on port 3000

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

Compiling {sass}... 8 changed files.
Adding :require adzerk.boot-reload.init28534 to edge.cljs.edn...
nREPL server started on port 5600 on host 127.0.0.1 - nrepl://127.0.0.1:5600
Adding :require adzerk.boot-cljs-repl to edge.cljs.edn...
Compiling ClojureScript...
? edge.js
user=>
Refreshing code...
:reloading (edge.phonebook-app edge.selmer edge.phonebook.schema edge.phonebook.db edge.phonebook edge.sources edge.hello edge.web-server edge.system user)
Refresh complete
Writing target dir(s)...
java.net.BindException
:
Address already in use

...

clojure.tools.nrepl.server/start-server/invokeStatic

    server.clj:  143

clojure.tools.nrepl.server/start-server

server.clj:
121
...

clojure.core/apply/invokeStatic

      core.clj

:

646

                              clojure.core/apply

      core.clj

:

641

      boot.repl-server/start-server/invokeStatic

repl_server.clj:

83

boot.repl-server/start-server

repl_server.clj:

66
boot.repl/launch-nrepl
repl.clj:

51

boot.core/launch-nrepl core.clj
:
1228

...

clojure.core/apply/invokeStatic

core.clj
:
646

clojure.core/apply

core.clj
:

641

boot.task.built-in/fn/fn/fn
built_in.clj
: 392
...

                 clojure.core/deref/invokeStatic

core.clj
:
2228

                              clojure.core/deref            core.clj: 2214

                  boot.task.built-in/fn/fn/fn/fn  

built_in.clj
:
395

boot.task.built-in/fn/fn/fn/fn

  built_in.clj

:

303
adzerk.boot-cljs/eval294/fn/fn/fn
boot_cljs.clj
:
201

               adzerk.boot-cljs/eval242/fn/fn/fn       boot_cljs.clj:  135
          adzerk.boot-cljs-repl/eval396/fn/fn/fn  boot_cljs_repl.clj

: 164
boot.task.built-in/fn/fn/fn/fn built_in.clj: 396
boot.task.built-in/fn/fn/fn/fn built_in.clj:

394
adzerk.boot-reload/eval521/fn/fn/fn/fn
boot_reload.clj:
140

adzerk.boot-reload/eval521/fn/fn/fn

boot_reload.clj
:
139

deraen.boot-sass/eval613/fn/fn/fn

 boot_sass.clj

:

46

boot.task.built-in/fn/fn/fn/fn

built_in.clj:

167

boot.task.built-in/fn/fn/fn/fn/fn/fn

built_in.clj:

348

               boot.task.built-in/fn/fn/fn/fn/fn        built_in.clj

:
348

boot.task.built-in/fn/fn/fn/fn

built_in.clj:

345

boot.core/run-tasks

core.clj
:
938

boot.core/boot/fn

core.clj:

948

             clojure.core/binding-conveyor-fn/fn

core.clj:
1938

...

Elapsed time: 39.235 sec

boot dev not working for yada branch

In the yada branch

boot dev

fails as aero is not included in the dependencies in build.boot.

I added this dependency along with updating the versions of some of the other dependencies whilst I was there. I'm not sure if this is a consequence of updating yada to 1.1.11, but I also needed to change the server.clj stop code to make make reloaded.repl/reset work, specifically to:

(stop [component] (when-let [server (:server component)] ((:close server))) component)

previously it was

(stop [component] (when-let [server (:server component)] (.close server)) component))

Changes in forked version here: https://github.com/markmelling/edge/tree/yada

First run on windows: build error and 404s

As I was trying to get edge up and running on Windows, I got the following behaviour on both Windows 8.1 and Windows 10.

When running boot dev the first time around, the following messages are output to the console:

12:05:40.519 [clojure-agent-send-off-pool-0] INFO  edge.web-server - Started web-server on port 3000
       clojure.lang.ExceptionInfo: C:\Users\lachance\.boot\cache\tmp\data\devel\edge\dq0\-rcsl8f\edge\selmer.clj: Le processus ne peut pas accÚder au fichier car ce fichier est utilisÚ par un autre processus.
    data: {:file
           "C:\\Users\\lachance\\AppData\\Local\\Temp\\boot.user3118914793701141329.clj",
           :line 31}
java.nio.file.FileSystemException: C:\Users\lachance\.boot\cache\tmp\data\devel\edge\dq0\-rcsl8f\edge\selmer.clj: Le processus ne peut pas accÚder au fichier car ce fichier est utilisÚ par un autre processus.
      file: "C:\\Users\\lachance\\.boot\\cache\\tmp\\data\\devel\\edge\\dq0\\-rcsl8f\\edge\\selmer.clj"
      reason: "Le processus ne peut pas accÚder au fichier car ce fichier est utilisÚ par un autre processus.\r\n"

(the french error message indicates that the process cannot access the file as it is used by another process).

Attempting to load http://localhost:3000/ then leads to all resources except the html to be 404 (edge.css and edge.js), with the following error:

clojure.lang.ExceptionInfo:  {:status 404}
    at clojure.core$ex_info.invoke(core.clj:4593)
    at yada.resource$eval26538$fn__26539$fn__26540.invoke(resource.clj:121)
    at manifold.deferred$eval7307$chain___7328.invoke(deferred.clj:860)
    at manifold.deferred$chain.invoke(deferred.clj:929)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:632)
    at yada.handler$handle_request_with_maybe_subresources.invoke(handler.clj:120)
    at yada.handler$handle_request.invoke(handler.clj:168)
    at yada.handler.Handler.request(handler.clj:223)
    at bidi.vhosts$make_handler$fn__20669.invoke(vhosts.clj:160)
    at aleph.http.server$handle_request$fn__19056$f__6628__auto____19057.invoke(server.clj:154)
    at clojure.lang.AFn.run(AFn.java:22)
    at io.aleph.dirigiste.Executor$Worker$1.run(Executor.java:62)
    at manifold.executor$thread_factory$reify__6510$f__6511.invoke(executor.clj:36)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.lang.Thread.run(Thread.java:745)

The fix seems to be to delete .boot/cache and run boot dev again. When this is done, everything works.

Hopefully the issue can be fixed for any other future poor souls that have to work on Windows ;)

bin/app should show Usage

Currently there's an error:

[malcolm@melkor edge]$ bin/app
bin/app: line 4: shift: shift count out of range

Could not locate dev__init.class, dev.clj or dev.cljc on classpath

Error on new cljs app.

[malcolm@melkor edge]$ bin/app acme/app --sass --cljs
Generating fresh 'clj new' edge.app-template project into acme.app.
[malcolm@melkor edge]$ cd acme.app/
[malcolm@melkor acme.app]$ ../bin/rebel --nrepl --cljs
[Edge] Starting development environment, please wait…
[Rebel readline] Type :repl/help for online help info
[Edge] Loading Clojure code, please wait...
java.io.FileNotFoundException: Could not locate dev__init.class, dev.clj or dev.cljc on classpath.
	at clojure.lang.RT.load(RT.java:466)
	at clojure.lang.RT.load(RT.java:428)
	at clojure.core$load$fn__6824.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6765.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core$require.doInvoke(core.clj:6007)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at edge.rebel.main$_main$fn__2891.invoke(main.clj:59)
	at clojure.main$repl$fn__9075.invoke(main.clj:427)
	at clojure.main$repl.invokeStatic(main.clj:426)
	at clojure.main$repl.doInvoke(main.clj:345)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.core$apply.invoke(core.clj:660)
	at rebel_readline.clojure.main$eval2756$repl_STAR___2757.invoke(main.clj:82)
	at rebel_readline.clojure.main$repl.invokeStatic(main.clj:91)
	at rebel_readline.clojure.main$repl.doInvoke(main.clj:90)
	at clojure.lang.RestFn.invoke(RestFn.java:457)
	at edge.rebel.main$_main.invokeStatic(main.clj:55)
	at edge.rebel.main$_main.doInvoke(main.clj:52)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.core$apply.invokeStatic(core.clj:665)
	at clojure.main$main_opt.invokeStatic(main.clj:491)
	at clojure.main$main_opt.invoke(main.clj:487)
	at clojure.main$main.invokeStatic(main.clj:598)
	at clojure.main$main.doInvoke(main.clj:561)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:705)
	at clojure.main.main(main.java:37)
[Edge] Failed to require dev, this usually means there was a syntax error. See exception above.
[Edge] Please correct it, and enter (fixed!) to resume development.
user=> 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.