scotch/sapling

Compilation error - services.coffee

bsr203 opened this issue · 6 comments

Kyle, thank you for the effort on this library and making available. I have an application which uses almost the same stack. I was trying sapling but got the below error while following

  1. ./scripts/development.sh to compile javascripts and css

The error is
$ ./scripts/development.sh
02 Oct 21:00:12 - error: Compiling of 'app/scripts/person/services.coffee' failed. rror: missing ] on line 50

I don't follow coffescript and would be nice to see it working locally.

thanks again.

Hi @bsr203,

The error you're seeing is caused by a missing ]) on line 51 /app/scripts/person/services.coffee#L5. This bug has been fixed in sapling master, but sapling-aego's sapling version is stuck at commit 265d7a1, if that makes sense.

Right now I'm working on finishing up the NodeJS backend. Once I have it completed I'll fix sapling-aego to make it compatible with sapling master. I really wanted to make the Go backend the primary, but there wasn't enough interest -- and I really want Sapling to be a community project.


It's great to get feedback from another Go developer! If you have the time I would really like to hear what elements of your stack that are the same; so I have better idea of what people are using when I resume work on saping-aego

The areas where I need more information on are:

  1. Javascript vs Coffeescript - Sapling master is now written in Javascript.
  2. Gorilla JSON-RPC vs RESTful - Sapling master now uses a RESTful architecture, but I have designed it so that JSON-RPC could still be used, so I would like to get feedback on this.
  3. What other elements are the same or different?

Thank you for your time and interest,

-Kyle

Hello Kyle,
After posting the above message, I found a thread in Angular discussing porting sapling from Coffee to JS. I see many like to have it in JS, and I too like to see it. Probably Coffescript is highly productive and worth the time spending to learn it. But for me, Front end development was a forced necessity, and loved development in GO. I was trying to get away with the minimal effort on it to get the work done. If I think about it not all needs to be fluent in all the tools technology used by sapling. If you think Coffeescript is that beneficial, and if the code has enough explanation (not sure how the generated code turns out), I would spend the time to understand it. As a community project, I too agree for a JS implementation as it has long life (things like DART coming up, ..) and wider acceptance/understanding.

I was reluctant to use Gorilla (even for routing / PAT) to keep my dependency minimal). I think it is an elegant project, with good momentum and excellent documentation. Still, I preferd to keep my dependency minimal. With authentication etc, I started using cookiestore, session of Gorilla. I use RESTful architecture with JSON as payload. I didn't want to use JSON-RPC because Go implementation (standard library) is not over http. I saw Gorilla, but trying to be simple at first. With Angular, JSON RPC makes sense as most/all of the templating is at client side. I think it is a tough decision as it probably hard to please all.

Honestly, this is my first day looking at sapling and aego. Will give you feed back once I familiar with it. Again, me being not exposed to the tools (esp build chain), I found it is bit difficult to start with. I initially target google app engine, so I don't need live reload etc. I like minifier etc, but not there yet to decide what to use. I would like to see a project very lean and the workflow not dependent on tools. Think about Gorilla, it is so easy to drop in and even replace. Probably your architecture is very modular already as I see support for different auth strategy and could use one of it. Still, it would be nice to have few simple examples of aego.
aego is tied to appengine, and works for me. But majority of the users may like to see a simple drop in auth package for standalone project. I use a wrapper around appengine context to limit my dependency (as one need context even in business domain for log etc).

I have some time pressur to finish a project, so not sure would be able to evaluate your offering fully. Also, I am in the middle so not sure whether it make sense (and time) to switch the build platform. Will get back to you later.

After adding ]) on line 51, ./scripts/development.sh didn't give an error.

$ ./scripts/development.sh
03 Oct 06:04:13 - info: compiled in 8703ms

but the script didn't return (I think something/build tool may be running background).

At this point not sure what to do next.
As per the instruction here http://sapling.scotchmedia.com/about

I tried to do ./scripts/compile-html.sh in a separate shell, but got these error
./scripts/compile-html.sh
./scripts/compile-html.sh: line 3: jade: command not found

didn't read bout jade but this step was supposed to avoid it

( Using Jade?
./scripts/compile-jade.sh to run a jade watcher
)

When tried to start npm, that too gave this error.

$ npm start

sapling@0.0.1 start /...sapling-aego/client
brunch watch --server

events.js:48
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:670:11)
at Array.0 (net.js:771:26)
at EventEmitter._tickCallback (node.js:190:38)

npm ERR! sapling@0.0.1 start: brunch watch --server
npm ERR! sh "-c" "brunch watch --server" failed with 1
npm ERR!
npm ERR! Failed at the sapling@0.0.1 start script.
npm ERR! This is most likely a problem with the sapling package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! brunch watch --server
npm ERR! You can get their info via:
npm ERR! npm owner ls sapling
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.4.0

meanwhile, I saw the js implementations in master branch. You may close this issue if new impl is planned.

Thank you for the detail response, that is exactly the information I was looking for.

As to the errors that you are seeing, I have simplified the process and fixed the code that is causing the errors in master. I will get the sapling-aego branch updated as soon as I can.

I appreciating you trying this, I'm sorry that the experience wasn't great. I'll keep this issue open until I have everything correct.

Thank again for your feedback and time,

-Kyle

don't use this lib. so closing.