Sublime Forum

Setting up a dev. environment for package contributions

#1

Hi,

I am pretty new to git/github and I haven’t really found the best way to setup a development environment for contributions to st2 packages. So I was curious about what you guts are doing. Here is what I thinks makes the whole thing suboptimal. I add a package using package control. Now I want to contribute to this package so I basically have to remove it through package control, create a fork, and clone the fork my sublime packages folder. Now I can work the package, test changes in st2, commit changes to my fork and finally sent a pull request to the fork that is on package control. All good so far. But now I don’t get automatic updates through package control and instead have to manually fetch new changes from the original repo, which is pretty annoying because I have to keep track of changes in the original repo. So I might delete my clone and add the original version through package control. But now I can’t easily contribute to the repo and send pull requests.

So is there any way to seamlessly integrate these steps and have an up to date version of the original repo while still being able to send pull requests for contributions?

Thanks!

0 Likes

Package Control: A full-featured package manager
#2

I haven’t contributed to other’s packages but if I were to, I would do it the way you described. You can install a git plugin for Sublime, that way you can sync every change you make to a dev or master branch and when you’re done you just do a pull request. The forking isn’t that big of a problem because you wouldn’t want conflicting plugins to begin with.

  • Daniel
0 Likes

#3

I don’t know about ST2, i am using ST3. In my case the official plugin is distributed as zip file package and my fork is a loose package.

Unfortunately, there are quite a few personal modifications that can not be merged to the upstream. I am maintaining the fork. My master branch is in sync with the official distribution, master is merged into dev branch.

Additionally, i use override audit which alerts me of possible conflicts between the zip package and loose package.

Instead i could also move my personal customizations into the User package. In any case i’ll always end up with duplicates from the original and my local changes.

Additionally, disable vcs fetching for Package Control:

{ "ignore_vcs_packages":[] }

I think it would be very useful to add a chapter in the documentation, addressing the case of contributing to distributed packages.

0 Likes