thSoft / elysium

LilyPond IDE for Eclipse
http://elysium.thsoft.hu
14 stars 3 forks source link

review include resolution #132

Closed nittka closed 6 years ago

nittka commented 6 years ago

122 indicates that the current uri resolution does not work properly. Absolute, relative includes as well as linked folders in Eclipse workspaces should be treated correctly.

It is possible, that we have to replace Eclipse resolution mechanisms by always resolving against absolute file location. My feeling is that many include and refactoring related problems could be solved that way.

nittka commented 6 years ago

LilyPond under windows works for paths containing backslashes (both single and double), but warns about non-normalized file names, i.e. excects slashes. Also the current include resolution throws errors when the path contains backslashes.

So whatever we do, before actual resolution (and validation) we should normalize includes, replacing backslashes by slashes... The default string value converter already removes single backslashes completely. So there is no chance to normalize them at the moment. The String value converter would have to be replaced.

nittka commented 6 years ago

aspects to consider

The most important aspect is that the projects real location need not be related to its workspace location. Two projects p1 and p2 may be siblings in the workspace but not in the file system. The current resolution implementation works well enough (well only) if the projects are actually located in the workspace (which probably a standard case, otherwise there should have been more bug reports).

Functionality that needs to be checked

nittka commented 6 years ago

@thSoft : I started working on a rewrite of the include mechanism. If you want to try it out and give feedback you may do so - https://github.com/nittka/elysium/tree/newInclude

So far, I think to have the basis for relative and absolute includes on both Windows- and Unix-based systems more or less working. Find References is buggy, but turned out to be so before, as well. Determining dependencies (recompiles) and refactorings are still big open issues.

nittka commented 6 years ago

I consider this issue closed as the basic logic is implemented. If issues arise due to non-file-URIs in the index (for find reference, determining all including files etc.) they should be dealt with in separate tickets.