Closed abingham closed 11 years ago
Perhaps the solution is to allow nested projects? Then you perform the refactor in the context of the larger project.
We would need to map the notion of "nesting" onto rope's notion of projects. I don't know if rope supports nesting in any direct way, but it apparently does support multiple "project roots", at least with respect to certain refactorings. The first phase of this task is just to wrap my head around what rope supports, and then decide how that maps best to traad/emacs.
The notion of project nesting may belong more naturally to a project-management tool like eproject or prosjekt. These could impose a notion of nesting which is then translated to rope's API somehow. Plenty to explore here...thanks for the ideas!
Part of this API might include the ability to "add" and "remove" projects from a running server instance.
Why not run a server for each project? I guess it will be relatively easy. Also you can support Python 3 project this way (although I don't know if rope requires Python 3 executable to refactor Python 3 project).
I assume that rope needs some unified view of a collection of project if it's going to apply a refactoring across several of them at once. I may be wrong, and that's why this task still needs investigation.
Also, FWIW, I believe that rope does need to run under Python3 in order to work with python3 code.
refactoring across several of them
I didn't know that rope can do that. That would be a very cool feature.
Rope mentions "cross-project refactorings" on their main page, and the package includes rope.refactor.muiltiproject
which seems to be the key for that. They have a bit of documentation on it, but I haven't really looked through it yet.
This seems to more-or-less work now. Perhaps the API could use some tweaking, but I'll leave time and practice to sort that out.
Just understand the issues a bit more. This is a bit fringe-feeling right now, but I'd like to avoid going too far down one design path that makes multi-project support difficult in the future.