wanna help with windows, where do I get started ?

37 views
Skip to first unread message

Frédéric Merizen

unread,
Aug 11, 2012, 12:06:42 PM8/11/12
to buster...@googlegroups.com
Hi

the main thing holding me back from using buster on my current project is windows support, so I thought I might as well give a hand.

So, I followed the instructions from http://busterjs.org/docs/developers/ : I
  • installed node.js (v. 0.8.6)
  • checked out buster-dev-tools (from https://github.com/busterjs/buster-dev-tools.git)
  • set up NODE_PATH and PATH as per the instructions
  • ran buster-dev-tools pull, and got an error because there is no underscore 0.4.x
  • fixed referee/package.json to reference lodash rather than underscore
  • ran buster-dev-tools pull again
so far, so good (except for the lodash thing - did I miss something obvious?). Now, for some test running

buster>cd buster-configuration
buster-configuration>node test\buster-configuration-test.js

And now I get 4 errors : two instaces each of
  • TypeError: Object buster.assert has no method 'calledWith' 
  • TypeError: Object buster.assert has no method 'calledOnceWith'
sprinkling a few console.logs throw the code, it appears that
  • buster-sinon.js is actually called
  • seen from within buster-sinon, it does add the methods 'calledWith' and 'calledOnceWith' to buster.assert.assert and buster.assert.refute
  • however, seen from the outside (say, from buster-wiring.js), buster.assert.assert and buster.assert.refute do not appear to have the new methods after buster-sinon is required
Is this some new node.js feature? A kind of insulation layer to prevent modules from poking each other?
or is this some winows specific problem that needs correcting?
ooooor is this some stupid newbie mistake I'm making?

Any help appreciated, I hope I can pay it back some time later by contributing windows fixes
-- 

Frederic Merizen
..........................................................
50, Avenue des Champs-Elysées
75008 Paris


August Lilleaas

unread,
Aug 11, 2012, 1:26:46 PM8/11/12
to Frédéric Merizen, buster...@googlegroups.com
Just a heads up, the tests are yet to run successfully on a windows setup. When I started work on this some time ago, I only fixed buster-resources (now ramp-resources) and a few others that I can't remember - basically enough to at least make "buster test" able to do anything at all. So the fact that you're getting weird and hard to explain issues is not because there's anything wrong with your setup or anything like that.

I also got the underscore issue - referee is Chris' package so I'm not sure what's up with that. Seems like the nice folks over at underscore unpublished the old 0.x versions when releasing 1.0? How semantic. I'll poke Chris about it, he probably doesn't notice as he's got a 0.4 available in his local node_modules already.

And I also get these test failures you're mentioning on my main dev box which runs Linux. So this doesn't seem to be windows specific at all.

I'm currently doing a deep dive into buster-capture-server (will be renamed "ramp" soon), and both Chris and I have been AFK for at least a month now. So I guess the most sensible thing I can say now is sorry that Buster is currently in a more-than-normal buggy state..

August Lilleaas

unread,
Aug 11, 2012, 2:18:58 PM8/11/12
to Frédéric Merizen, buster...@googlegroups.com
Took a quick look at this. Disclaimer: I'm not familiar with the wiring, it's Chris' code.

It seems that the "buster" package still uses on "buster-assertions".  buster-sinon does too. Probably more. This causes the dev-tools to install buster-assertions a bunch of times, which in turn causes there to be multiple versions of buster-assertions around, making the side-effects require("buster-sinon") has random - it internally requires buster-assertions and monkey patches it, but it will only do that on the buster-assertions installed in node_modules of the buster-sinon package.

So, basically the quick fix is rm -rf buster/node-modules/buster-assertions and rm -rf buster-sinon/node-modules/buster-assertions.

But yeah, this is obviously not a real fix. As far as I recall, buster-assertions should be completely deprecated. Chris probably haven't noticed this as he afaik doesn't use buster-dev-tools.

Frédéric Merizen

unread,
Aug 12, 2012, 2:53:40 AM8/12/12
to August Lilleaas, buster...@googlegroups.com

Thanks, I really appreciate the quick answer.

I'll go with the hacky fix for now and focus on windows-specific problems. I'll also install buster-dev-tools on a linux VM so I can tell windows-specific problems from plain old bugs without asking you every time.

I understand that windows support is still very rough. I am hoping to help fix that and get to know the codebase at the same time.

August Lilleaas

unread,
Aug 12, 2012, 3:47:08 AM8/12/12
to Frédéric Merizen, buster...@googlegroups.com
No problem, let me know if you need anything else. I'm happy to help and I'm happy you're helping :)

I put myself in charge of making buster work on windows before 1.0 ships, but I'm not really a windows user except from gaming, so help here is definitely appreciated.

Windows seems to be your main platform, so I have a semi off-topic question: do you think Windows users would like a Buster.js installer.exe thingie that makes "buster" available in cmd.exe? Or would most windows developers prefer an IDE integration to Visual Studio or some other IDE instead you think?

Christian Johansen

unread,
Aug 13, 2012, 2:51:02 AM8/13/12
to August Lilleaas, Frédéric Merizen, buster...@googlegroups.com
Hey,

I'm going to clean up my mess in buster-dev-tools tonight and make sure it runs cleanly. Sorry for the inconvenience.

Christian
--
MVH
Christian

Christian Johansen

unread,
Aug 14, 2012, 3:56:44 AM8/14/12
to August Lilleaas, Frédéric Merizen, buster...@googlegroups.com
Hey,

So the dev-tools setup should work now. That is, there are some pitfalls, but dev-tools does set up a working environment.

When you start the server, be sure to go directly to http://localhost:1111/capture If you go to the front page, the server crashes :) This is an API change in capture-server that I was not aware of, and it will be fixed soon.

Christian
--
MVH
Christian
Reply all
Reply to author
Forward
0 new messages