Home Download Buy Blog Forum Support

Package Control: A full-featured package manager

Re: Package Control: A full-featured package manager

Postby wbond on Wed Aug 17, 2011 7:36 pm

attanze wrote:The problem is that this plugin is making SublimeText2 build 2101 for Windows7 to crash every-time is downloading from web and I press the ALT key on the keyboard to switch to other application.


Are you using the 32bit or 64bit version of Sublime Text?
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

Re: Package Control: A full-featured package manager

Postby wbond on Thu Aug 18, 2011 3:48 am

sublimator wrote:So it could nuke commit history and development branches. Ouch.

You could take a look at how PackageSetup.py works.

Code: Select all
package_metadata_file = os.path.join(package_dir,
            'package-metadata.json'


Seems you are making a package-metadata.json on installation. Maybe looking for the existence of that would be a good determinant for whether a package gets included in UpgradeAll.


So this is certainly an interesting issue. When doing development on the package manager I experienced some issues with using the Installed Packages directory where PackageSetup overwrote changes to my plugins. Unfortunately there is no indication that there is any backup system, although I see there is something now. Because of that I abandoned any use of the Installed Packages directory other than the initial download and installation of Package Control. I looks like I may be able to use PackageSetup.py to perform the upgrade of zip files for me and take care of backing up files. That said, I don't know how much use those backups are since there is no indication they exist, and then once found would require a diff from the edited version to the pristine version to actually yield anything useful to the user. It does not appear that the pristine package files for the backed up files are saved, making the diff impossible and the backups more or less useless. It is possible I just misunderstand part of what is going on here.

In terms of wiping you VCS files, yes that would happen. However, I also fail to see how it would not happen with PackageSetup.py. I ran into issues with this while testing Package Control and never came up with a completely satisfactory solution. If you are tracking a package via Git, but then request it via Package Control, the downloaded .sublime-package (zip) would not have the git metadata, thus you would lose the commit between versions if you were to commit any changes. Thus is didn't seem all that useful to explicitly exclude VCS metadata from removal. All of this leads me to believe that the best situation is for Package Control to use Git, SVN or Mercurial when such a working copy is found. For Git I think the best solution would be
Code: Select all
git pull --rebase
, for SVN a simple
Code: Select all
svn update
and for Mercurial
Code: Select all
hg pull
.

All of that said, the behavior you are looking for, to upgrade only packages that have been installed via Package Control, happens automatically whenever ST starts up. The Upgrade All Packages command is basically a convenience command for a user to upgrade/change all of their downloaded packages to things that are tracked by Package Control. This can also be done manually by running Upgrade Package and selecting each package. When you do that, the text for each package indicates the exact action that will happen, including what the new and old versions are. Perhaps I should rename Upgrade All Packages to Upgrade/Overwrite All Packages?

I think these changes sounds like they would solve the problems you are experiencing.
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

Re: Package Control: A full-featured package manager

Postby alexrussell on Thu Aug 18, 2011 8:07 am

I think a way around sublimator's problem is to have an 'ignored packages' setting like Sublime does itself. That way you could add to your User settings any packages you don't want Package Control to manage.

Also, a feature request. I could add this myself to me own repo list but I thought I'd put it up as a request for everyone else's benefit. Can you add https://github.com/lunixbochs/sublimelint to your master package list? It's a useful plugin, and is really stable for me (although does rely on a local PHP installation if you want PHP linting, maybe that makes it not a candidate).
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am

Re: Package Control: A full-featured package manager

Postby aparajita on Thu Aug 18, 2011 8:02 pm

sublimator wrote:
alexrussell wrote:Can you add https://github.com/lunixbochs/sublimelint to your master package list? It's a useful plugin, and is really stable for me (although does rely on a local PHP installation if you want PHP linting, maybe that makes it not a candidate).


That plugin is great. I love it.


This fork is more actively developed: https://github.com/Kronuz/SublimeLint
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: Package Control: A full-featured package manager

Postby alexrussell on Fri Aug 19, 2011 10:55 am

aparajita wrote:This fork is more actively developed: https://github.com/Kronuz/SublimeLint

Sounds good to me. I never know whether the forks are going to be new/untested stuff waiting for an eventual pull request or an actual more actively developed version.
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am

Re: Package Control: A full-featured package manager

Postby wbond on Fri Aug 19, 2011 12:27 pm

The main reason I haven't added a repo for SublimeLint is that I was unable to tell which is the most actively developed and "best." If there is a general best choice, or a maintain volunteers their version, I'll add one.
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

Re: Package Control: A full-featured package manager

Postby Anomareh on Fri Aug 19, 2011 3:36 pm

After using them both I think the original is just that, and the fork is sort of a + version if you will. They are both actively maintained, I just believe the original is complete in the author's eyes where as some other people wanted more functionality that the original author wasn't interested in incorporating.

The original has Python, PHP, Perl and Ruby support where as the fork has added support for JS and Objective-J as well as PEP8 checking for Python.

Which you grab depends on what you're looking for. Personally I use the fork as I like the PEP8 and JS support.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: Package Control: A full-featured package manager

Postby aparajita on Fri Aug 19, 2011 5:44 pm

wbond wrote:The main reason I haven't added a repo for SublimeLint is that I was unable to tell which is the most actively developed and "best." If there is a general best choice, or a maintain volunteers their version, I'll add one.


The Kronuz fork is more active. What is involved in volunteering a version for inclusion?
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: Package Control: A full-featured package manager

Postby wbond on Fri Aug 19, 2011 6:23 pm

aparajita wrote:The Kronuz fork is more active. What is involved in volunteering a version for inclusion?


Just someone indicating they use it and that is seems to be the best and most actively developed version. From the conversation that has happened here is appears that the Kronuz fork is most actively developed, so I'll add it to the master channel list.
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

Re: Package Control: A full-featured package manager

Postby wbond on Fri Aug 19, 2011 6:35 pm

Version 1.1.0 of Package Control was just released for upgrade. Changes include:

  • Support for local Git and Hg repositories in addition to zip/.sublime-package downloads
  • Fixed Discover Packages command to pull the proper URL from custom repositories
  • Improved the handling of upgrades and removal on Windows, reducing the number of Access Denied errors
  • Changed the downloaders to try multiple times on timeout since GitHub and BitBucket requests seem to fail fairly frequently
  • Package upgrades now copy the complete old version to the Backups folder that is a sibling of the Packages directory
  • Fixed the text of the activity indicator during individual package upgrades

Also, the master channel list has been updated to include https://github.com/Kronuz/SublimeLint.

Thanks for all of the feedback and suggestions, keep them coming!

@sublimator

I very much apologize for causing you to lose work with Upgrade All Packages. This new version should prevent such loss, and should also make it possible for less network-intensive updates via git and hg.
wbond
 
Posts: 523
Joined: Mon Feb 28, 2011 5:33 am

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests