Make (and keep) local modifications to a package


#1

I’ve installed a package, and want to make local modifications. And I would like to keep them when there’s an update for the package. I know a bit about git and Atom has git built into it, so is it as easy as git clone of the package’s github repo into my local packages folder, and commiting my changes? Or does it take more config changes to make the update process play nice with this git repo and make the pull merge nicely instead of overwriting the scripts with the new version?


#2

You could use apm develop to get the source code for a package and make local changes to it. But when updates happen to the package one of two things would happen:

  1. The update is compatible with your change
  2. The update is compatible with your change after some modifications
  3. The update is not compatible with your change

In the case of #1, when you perform a git pull on the package repository, Git would merge your changes automatically and everything is fine. In the case of #2, you would manually have to shift some things around. In the case of #3, you would have to change the package significantly to make your change possible again or you might just be out of luck … essentially write your own copy of the old version of the package.

So there isn’t any magical way to just make your changes work through some automated process. If there were, many software developers would be out of jobs :wink:


#3

I’m not at all worried about having to ‘merge’ the changes of a new version with my modifications. If an incompatibility arises, it’ll be a nice challenge or a reason to talk to the package’s original developer(s).

Will the ‘normal’ check for new versions of the package in atom still work?


#4

No, if the package was installed this way it won’t be checked for updates.