knownasilya / breach-module-manager

A module manager for Breach
9 stars 0 forks source link

Make cache.js more testable #7

Closed knownasilya closed 10 years ago

knownasilya commented 10 years ago
mblarsen commented 10 years ago

Was turning it into each own module. Will continue tomorrow.

mblarsen commented 10 years ago

Created https://github.com/mblarsen/npm-local-cache. Adds more general functionality, than we need for this project. It is with testsuite.

Will move they keyword url scheme into this module and then we can use it as dependency.

knownasilya commented 10 years ago

@mblarsen very nice!

knownasilya commented 10 years ago

@mblarsen I've pushed up some changes to the cache, maybe those changes should be decoupled from the cache since they aren't updating or reading the cache.

Also when doing a full cache refresh, it produces errors in the breach out console. Not sure if that's fixed in your new package. Would love to get these integrated :+1:

mblarsen commented 10 years ago

Unit tests seems to be running fine. I'm having problems hooking it up, because breach.cc crashes every time I add the module. You had similar issues no?

If you want to try to hook it up use:

var cache = require('npm-local-cache')({ keywords: [moduleKeyword] });

.. and instead of cache.all() use:

cache.init().then(function () {
    var pkgs = cache.getPackages();
});
knownasilya commented 10 years ago

@mblarsen I haven't tried it yet, but I'll give it a go later today. Surprised that it's not behaving.

spolu commented 10 years ago

Hi guys is there any API that you need to be opened right away in breach_core ?

knownasilya commented 10 years ago

@spolu Not sure if there is anything that would help. I think most of the issues are in the fact that debugging is very painful. Lots of times errors just get swallowed somewhere and we never see them.

What would help is being able to do a repl debug e.g. node debug index.js, for modules. If this isn't possible at the moment, then I think this is of utmost priority.

spolu commented 10 years ago

We have an entire effort that aims at turning breach into a pure nodeJS module. That will help a lot with what you describe.

knownasilya commented 10 years ago

@spolu that's great!

Is there anything in core that you think would help us going forward (if you made it public api)?

spolu commented 10 years ago

module addition, removal, start, stop etc... these are not publicly avilable to modules yet right?

knownasilya commented 10 years ago

@spolu did not realize that, since I haven't started looking at those. Yes, those will have to be made available.

spolu commented 10 years ago

Actually they are exposed already: see https://github.com/breach/breach_core/blob/master/lib/core_module.js#L538

knownasilya commented 10 years ago

@mblarsen did you get it working with your latest commits?

mblarsen commented 10 years ago

No, can still not test the module in breach.cc

But made the implementation. Perhaps you can test it if it works for you?

Michael Bøcker-Larsen http://www.gofundme.com/plant-a-tree-api http://about.me/mblarsen

On Thursday 24 July 2014 at 18:59, Ilya Radchenko wrote:

@mblarsen (https://github.com/mblarsen) did you get it working with your latest commits?

— Reply to this email directly or view it on GitHub (https://github.com/mblarsen/breach-module-manager/issues/7#issuecomment-50014109).

knownasilya commented 10 years ago

@mblarsen last time I tried it didn't work, but I'll give it another try.

mblarsen commented 10 years ago

The unit tests are green but you might need to make some changes to the integration. Make sure to have .catch() on the promise as well.

On Thursday, July 24, 2014, Ilya Radchenko notifications@github.com wrote:

@mblarsen https://github.com/mblarsen last time I tried it didn't work, but I'll give it another try.

— Reply to this email directly or view it on GitHub https://github.com/mblarsen/breach-module-manager/issues/7#issuecomment-50016682 .


Michael

Contact numbers at the moment: +977 9851175659 +45 20734933

.. or preferably just contact me on this email.

Also checkout: Places Restaurant & Bar http://fb.me/PlacesKathmandu / Sahyogram http://sahyogram.com Me: Facebook http://fb.me/mblarsen, Twitter http://twitter.com/mblarsen, LinkedIn http://np.linkedin.com/in/mblarsen

knownasilya commented 10 years ago

Ok, so it works in a custom version of exobrowser + clone of breach_core.. but not in latest alpha build. Just crashes, and I can't find any logs..

mblarsen commented 10 years ago

Exactly what I’m experiencing!

Michael Bøcker-Larsen http://www.gofundme.com/plant-a-tree-api http://about.me/mblarsen

On Friday 25 July 2014 at 09:24, Ilya Radchenko wrote:

Ok, so it works in a custom version of exobrowser + clone of breach_core.. but not in latest alpha build. Just crashes, and I can't find any logs..

— Reply to this email directly or view it on GitHub (https://github.com/mblarsen/breach-module-manager/issues/7#issuecomment-50104987).

knownasilya commented 10 years ago

@mblarsen lets move this discussion to #10