Floobits / floobits-sublime

Floobits real-time collaboration plugin for Sublime Text 2 and 3
Apache License 2.0
294 stars 32 forks source link

outside local and workspace changes are not synced. #223

Open Tcll opened 9 years ago

Tcll commented 9 years ago

basically, the only thing that's actually synced is the file data itself. if you:

one thing I'm glad for:

I've written some rules for my group to keep these issues at bay, but I can't use another IDE like IDLE: https://copy.com/POywJtfa4Zdqd3GW this only applies to outside changes, it doesn't apply to any file action such as move or rename.

the reason I'm using Copy is because I'm using 3.5GB for my entire repo and I've maxed copy at 40GB so yea, my program won't fit in 100MB, so I'm only fitting the raw src files in Floobits and keeping everything else synced with Copy

kans commented 9 years ago

@Tcll

Thanks for the report. The basic problem with supporting the behavior that you want is that ST doesn't inform plugins when files change that aren't open. For that matter, python doesn't ship with bindings to native file watching APIs (like eg Node). Periodically scanning the FS doesn't scale well for large repos and many users have complained about the floobits plugin nuking their battery. Our intellij (and friends) plugin does support syncing external changes if that is an option. As for ST, I don't think we'll be able to offer a fix for watching external changes any time soon.

Could you tell me more about "Remove from Workspace" doing nothing? What is the expected behavior and what happens?

By the way, 3.5GB is rather large for a repo, can I ask what is taking up all the space? Are you checking in binaries or other generated files? If so, you can ignore these files via .flooignore files (same syntax as .gitignore).

Tcll commented 9 years ago

The basic problem with supporting the behavior that you want is that ST doesn't inform plugins when files change that aren't open.

ouch, I see

For that matter, python doesn't ship with bindings to native file watching APIs (like eg Node).

couldn't you just integrate a portable API?? I'm thinking something similar to what python's LiveCoding extension does... (you can place the extension in your program's directory)

I have no knowledge of a portable file-watch extension, though I can help keep an eye out for one if you like :) (I'm very picky with portability, I don't want my users to have to install python and extensions to run my python source) ^ that and I don't want to compile my source, as I encourage modifications to my program. (thus being the very definition of Open Source)

I'm pulling this off using a portable interpreter loaded by a forwarder (basically a BATCH program compiled with GameMaker (nice EXE icon and load banner) that loads python.exe loader.py 'x86') (I'm currently enforcing 'x86' because I have yet to actually put together a x64 interpreter) ^ I'm trying to remove extensions from each interpreter's site-packages/ directory and make them local for all interpreters.

so yea, I don't like non-portable python extensions... heh

Our intellij (and friends) plugin does support syncing external changes if that is an option.

I'll take a look into this, thanks :)

Could you tell me more about "Remove from Workspace" doing nothing? What is the expected behavior and what happens?

By the way, 3.5GB is rather large for a repo, can I ask what is taking up all the space? Are you checking in binaries or other generated files? If so, you can ignore these files via .flooignore files (same syntax as .gitignore).

yea, the 3.5GB is all related to my program's (for 2 builds and a side program) run-time, as well as test files, documentation, and other things... I've repeatedly tried removing my portable python interpreter's directory from the online workspace via "Remove from Workspace", which removed most of the directoy at first, though it left some stuff in numpy/ which I tried removing and ended up having to manually delete in the online workspace. (good thing this didn't delete the local run-time... heh)

Tcll commented 9 years ago

so I'm looking at that IntelliJ IDEA thing, and right off the bat it reminds me of the nightmares I had with Eclipse+PyDev... is using IntelliJ with the python plugin roughly the same, or would it be alot better??

I just don't want to download more garbage...

I'll give Eclipse the fact that it at least has some intellisense, but the last I used it, could barely tell me anything compared to VS2010+PythonTools I have yet to look for a python intellisense plugin for Sublime, but everyone keeps ranting and overglorifying? Sublime.

idk, I can't speak much for sublime as I'm finally trying it out... heh right off the bat with ST it feels just like Gedit or... I want to say Editra? (don't have the shortcut anymore)

but yeh, I have yet to find a good IDE that can completely replace VS2010 intellisense tracking and provide Aptana's convenience features. if you'd like a good VS2010 ultimate installer to try out PythonTools, I could email you what's probably the last non-malwared one on the internet :) (I use 2010 over 2013 because newer windows kernels (above XP x64) are VERY bad)


also, found what looks to be a decent utility: (near the bottom) https://github.com/rtfd/readthedocs.org/tree/master/deploy/wheels

import sys, time
sys.path.append( local_directory+'watchdog-0.7.0-py2-none-any.whl' ) #NOTE: untested (might get ImportError)
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler

info here: http://brunorocha.org/python/watching-a-directory-for-file-changes-with-python.html and here: https://pypi.python.org/pypi/watchdog

would be nice if people understood the meaning of portable lol


EDIT: OT: intellisense plugin for ST: https://github.com/SublimeCodeIntel/SublimeCodeIntel just thought I'd clear that up :)

Tcll commented 9 years ago

better idea, from Nitrous Desktop to get the best of both worlds.

it's probably better off to keep the resources separate, so the idea I've got is to build your own sync app. this should allow other IDEs to be able to use the workspace as well, AND I can integrate it with my copy workspace, hopefully omitting my 3.5GB of program run-time, tests, and documentation... heh

if I move the tests and docs out of the workspace, I'll use up at least 1.2GB (PyQt4 is stupidly large at 200MB, and is merged locally with my IDE)

OT: yes, I'm building my own IDE for editing my main program's scripts because not one python IDE other than Visual Studio can do what I need... actually no, not even visual studio, that's only half of what I need.

so yea, if plugins are too much of a hassle, just keep them at basic syncage, and build a separate app. :)

kans commented 9 years ago

If you are building python, Intellij really isn't a good fit at all - there is PyCharm, but it will suck at C - there is the C++ editor that was just released, but it will struggle with python and maybe C too! We are slowly working towards VS support, but it will be a while before we ship it.

I will check out watchdog to see if we can ship it with ST and friends.