FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Start using prepublishing to fix dependencies · Issue #301 · nodegit/nodegit · GitHub

Repository navigation

Start using prepublishing to fix dependencies #301

Description

Currently pretty much everything (except mocha and istanbul) have to be dependencies, not devdependencies, because we use a lot of them during the build process. By farming out a few things to prepublish, we can move a lot of dependencies.

Activity

  1. added this to the milestone on Nov 26, 2014
  2. maxkorp commented on Dec 5, 2014

    CollaboratorAuthor

    So, this is still an issue, unfortunately. You have to be very careful to generate the code and then to not have the project built (even from earlier), or it gets skipped. I think we gotta move this out of prepublish (maybe in to publish?). @tbranyen suggested moving the binary stuff out of publish anyways.

  3. maxkorp commented on Jan 8, 2015

    CollaboratorAuthor

    So the scale of what we should move is much larger than I realized, which is fine. Makes it easy, at least. Gonna handle that now.

  4. maxkorp commented on Jan 14, 2015

    CollaboratorAuthor

    Posting this here, since the community keeps growing and we're not all in the Slack :)

    So, we need to make a decision on cleanup, and installs. I'm starting to shy away from the idea of using npm install from inside the directory to build

    I'm thinking that we need to just use npm run build or something like that, so that when someone does npm install nodegit or npm install and nodegit is in their package.json, we can clean up a bit because over half of the size of nodegit once it's installed is dead weight. Source files, etc

    We have no way of telling did they do it local to the directory vs is it being pulled from NPMs registry vs is npm pulling it from a git repo via a tag like nodegit: nodegit/nodegit#somesha in order to decide when to clean otherwise. Using npm install for only people installing the dependency fixes this for us.

    I'm gonna move forward with this idea, but I'd love some input from at least two of you, to get a consensus on that before landing it. @mcollina @johnhaley81 @tbranyen

  5. maxkorp commented on Jan 14, 2015

    CollaboratorAuthor

    That doesnt work, because then somebody trying to install the dependencies will probably run npm install and mess up their directory. I've added a clean script, and I'm going to add the debug stuff now, but I think we're kinda SOL on the cleaning up after ourselves thing, unless we wanna check against NODE_ENV=="PRODUCTION" or such

  6. mcollina commented on Jan 14, 2015

    Collaborator

    I think the best way is to assume that a user that want a custom-build thing will read the readme. So, I'm 👍 for cleaning up always, but after a custom build is made, never clean it up (we can just stick a file somewhere). Our install script can be called with --cleanup from npm, and it will be immediate for users how to install without cleaning up.

    What do you think?

  7. maxkorp commented on Jan 14, 2015

    CollaboratorAuthor

    Thats certainly an option, but only helps if somebody is consciously installing nodegit.

    For now, I think I might just leave the clean script in place but not called. NPM is overhauling their installer at the moment, and I'm sifting through their issues, gonna see if it resolves all of our issues, and if not, I'll either comment or file something new. Gonna open a PR for these changes, because they seem to be working.

  8. maxkorp commented on Jan 14, 2015

    CollaboratorAuthor

    So John and I talked a bit and heres my idea

    There are 3 cases here.

    1. You are installing it as a dependency, using the typical semver way.
    2. You are installing it as a dependency, using the git url or github shorthand way.
    3. You are inside the project, installing its dependencies and causing it to build.

    To clean, ideally we'd nuke stuff needed to build it again, so it's really not a good thing to have that happen unintentionally (eg doing the typical npm install is too likely) in the last case. also ideally, it would happen in case 1 and 2, but never in 3 unless someone did it on purpose (as opposed to always happening).

    The issue is detecting which case we're in. I can tell if we're in case 1 or not, but cant tell between case 2 and 3.

    Of the first two cases, the first is significantly more common. I'm thinking if we're in case 1 we clean, and otherwise we dont. That way, case 1 and case 3 (which should accomodate for 99% of installs) work optimally, with 1 cleaning and 3 not, while case 2 works, and just takes up some extra space, no big deal.

    Doing that, we can even nuke the devdependencies as part of the clean to really optimize things.

  9. modified the milestones: 0.2.5, 0.3.0 on Jan 15, 2015
  10. tbranyen commented on Jan 29, 2015

    Member

    This is resolved now right?

  11. maxkorp commented on Jan 29, 2015

    CollaboratorAuthor

    Ack, yes, yes it is, as of 0.3.0 targeted stuff on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL