sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

Remove require sealious #287

Closed adwydman closed 8 years ago

adwydman commented 8 years ago

I removed and replaced require("sealious"), but there's a problem with file-manager.js - I can't require it directly, because there's an error that goes like "Can't register the chip".

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 51.315% when pulling 28bc3e0bdc20b78de036003b057b895e21762ee0 on remove_require_sealious into 38db39b7c710ee2cc9722ac93f72296aa7c0c449 on references.

kuba-orlik commented 8 years ago

I can't require it directly, because there's an error that goes like "Can't register the chip".

Hmm... that's interesting. It would be really beneficial if we could remove all require("sealious") instances (it will allow us to remove the require-self dependency and make the code easier to manage and test). Could you reproduce the error and post the output here? :)

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.04%) to 51.345% when pulling 60cf9f5c09a30d566907fe1c6cb5c89093641be7 on remove_require_sealious into 38db39b7c710ee2cc9722ac93f72296aa7c0c449 on references.

adwydman commented 8 years ago

Okay, now it works. :) Now I require Datastore directly and previously I tried to get it through ChipManager like in main.js:

Sealious.init = function(){
    require("./base-chips/_base-chips.js");
    Sealious.Logger = require("./logger/logger.js");
    Sealious.PluginManager.load_plugins();
    Sealious.Datastore = Sealious.ChipManager.get_datastore_chip(); // this is how I tried to get it
};
coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.01%) to 51.315% when pulling 42d9a22ad06e4dae5a2719a85ff468dd6324d58c on remove_require_sealious into 38db39b7c710ee2cc9722ac93f72296aa7c0c449 on references.

kuba-orlik commented 8 years ago

That... is not going to work. Please not that you're requiring a chip-type into the Datastore variable, which should contain an instance of a datastore chip.

We have a larger issue at hands: I think that this is the time we discuss Datastore being provided as an argument to functions that use it.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.04%) to 51.345% when pulling 908c0a3a2005e5a1e357e8cfeb855e4d38557e59 on remove_require_sealious into 38db39b7c710ee2cc9722ac93f72296aa7c0c449 on references.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.04%) to 51.345% when pulling 908c0a3a2005e5a1e357e8cfeb855e4d38557e59 on remove_require_sealious into 38db39b7c710ee2cc9722ac93f72296aa7c0c449 on references.

adwydman commented 8 years ago

I merged this branch to remove_unnecessary_dependencies, so I'm closing this PR.