You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script out javascript files to be included in main nodegit.js file #456
Theres still a few being manually included (as they aren't valid types in libgit/idefs), so I'm reopening this. The solution seems to be loading via the directory content list, but there are a few ordering tweaks that need to happen (namely utils need to come first, and anything that isnt a type needs to come next, before the others).
Wouldn't be hard. Either that or just put the new types in a folder, like non-libgit-types or something, and we can just readdir lib/utils, then lib/non-libgit-types, then just lib.
I forget the exact reasoning, but we were deliberately avoiding requiring other lib files inside of libs. It's something to do with prototyping issues due to the way require caches modules. Something to do with the fact that we were overwriting __proto__s for the whole function thing (eg Clone(args) using Clone.clone(args) etc). I think for utils it should be fine, though, since that scenario never comes up (eg we dont have like Utils.dostuff.dostuff which you can call via Utils.dostuff)
Activity
tbranyen commentedon Mar 3, 2015
Closed via 2542c04
maxkorp commentedon Mar 4, 2015
Theres still a few being manually included (as they aren't valid types in libgit/idefs), so I'm reopening this. The solution seems to be loading via the directory content list, but there are a few ordering tweaks that need to happen (namely utils need to come first, and anything that isnt a type needs to come next, before the others).
tbranyen commentedon Mar 4, 2015
Might be easy to maintain an array of the files that have order restrictions and then assume the remaining filtered files can be arbitrarily added.
maxkorp commentedon Mar 4, 2015
Wouldn't be hard. Either that or just put the new types in a folder, like
non-libgit-typesor something, and we can just readdir lib/utils, then lib/non-libgit-types, then just lib.tbranyen commentedon Apr 20, 2015
@maxkorp why does utils need to come first, everything should manually require it if its needed
maxkorp commentedon Apr 20, 2015
I forget the exact reasoning, but we were deliberately avoiding requiring other lib files inside of libs. It's something to do with prototyping issues due to the way require caches modules. Something to do with the fact that we were overwriting __proto__s for the whole function thing (eg
Clone(args)usingClone.clone(args)etc). I think for utils it should be fine, though, since that scenario never comes up (eg we dont have likeUtils.dostuff.dostuffwhich you can call viaUtils.dostuff)tbranyen commentedon Apr 20, 2015
Ah okay, yeah in some places I can see order mattering for that. Since we're requiring NodeGit and then using the attached properties. Makes sense.