cinder / TinderBox

TinderBox
14 stars 6 forks source link

Support alternative CinderBlock locations #1

Open sansumbrella opened 8 years ago

sansumbrella commented 8 years ago

Moving issue from the binary to here. https://github.com/cinder/TinderBox-Mac/issues/6

sansumbrella commented 8 years ago

I toyed with supporting symlinks today, but am not having luck with Qt on that front.

OSX alias: visible in iteration, not recognized as a directory, not resolved to actual file path. ln -s symlink: not visible in iteration (with QDir::AllEntries)

sansumbrella commented 8 years ago

Will probably need to have a field for specifying additional CinderBlock locations after all. Benefit is that it's less magical.

richardeakin commented 8 years ago

To me, this is a very important feature and I'd love to see someone take it on (sorry, completely missed the previous issue you had created). I totally agree with the need to be able to manage blocks as submodules (along with a project-specific copy of cinder as submodule), which currently isn't possible because cinderblocks are expected to live within the repo's blocks folder - unless you don't mind the block's samples and tests all being broken.

We really can't rely on system symlinks across all platforms. I think we could add support for a list of search directories. Alternatively, there could be an 'add cinderblock' ability in TinderBox and you just navigate to the repo's folder, but I don't see any real gain in this over just having a set of search paths.

The one tricky part we've foreseen is what happens when there are two cinderblocks with the same name within the search paths. The solution I like here is similar to what an IDE does when you open two copies of the same name but they are at different paths - you prepend part of the folder path to the project name, just enough to be unique. So for example if you had Cinder-OpenCV in both cinder's blocks folder and one in a folder called 'experimental', the latter would show up in TinderBox with the name 'experimental/Cinder-OpenCV'.