SourceControl Problems With Shared Code and Internal Folders

It’s me struggling with a repository again. I noticed that my AppleLib, which shares code between macOS and iOS, gives a bunch of errors when downloaded from the repository. It cannot find a lot of folders which are shared and on a relative path, one level up from the base of the libraries ("…/shared external files"), although they reside inside my repository working folder and I have no problems opening them from there. Some folders in the Xojo project without a physical counterpart are being asked for too.

The crude workaround I found is to create a ZIP file of the contents and place it inside the repository too. When you unpack this one, everything is fine for Xojo.
But that is not what a repository is meant for. Are there any means to fix the project so that the links do work? I am uncertain what might have caused this. Maybe it was me copying the shared code to other places in the project file, moving pieces into different project folders. Is it possible to consolidate external links without making them internal again?

Is AppleLib publicly available?

Oh sorry! I wrote so much about it here recently that I wanted to avoid sounding insistent:

Coming next is a native and better-than-the-recent-one Scrollview control for Mac :wink:

I should add that when you ignore all the warnings, everything will be inside but the internal project folder structure will be mixed up. The ZIP (full content) reconstructs it ok.

ok, so I’m looking at the manifest file and there are definitely items that it needs which don’t exist in your repository. For instance… the first item that the IDE says is missing is QuartzCore, but the folder it’s looking for (according to the manifest) is:

iOSLib/Essential Core – do not remove from iOSLib!/QuartzCore

and that definitely doesn’t exist in the repository.

Could it be that you have items on your drive that haven’t been added & committed?

Just looking at the content of the zip file, I’m not sure that you’ve checked anything in for a while. The structure of the zip is very different than the structure of the zip file.

Maybe you’ve got two working copies?

Yes, that’s because some of the items that are missing are folders, and if they don’t get reconstructed, the IDE just puts them somewhere. Possibly the last folder it had a reference to (I’ve not looked into this).

Thanks for looking into it, Greg! Using SourceControl is a bit to me like trying to create a view in Xcode. It may work once, but the next time I’m back at the start with my knowledge. I am uncertain what to do to consolidate the files to my working structure. I should go and get some SourceTree training. It still doesn’t feel intuitive to me. (And it tells me everything is pushed and committed.)

EDIT: Think I’ll just try to make sure all the external files are correctly placed.

After I thought I had it fixed: The folders Xojo misses are folders I created inside the IDE. They did never exist physically in my files structure. Seems I shouldn’t do so and keep external files in exactly the folder structure I create them.

What you should do is just let the IDE create the folders the way it wants and only ever touch that structure in the IDE. You’ll have much more success with that.

And if it renames things with a .obsolete extension, you can remove those. That’s the IDE telling you that the file no longer exists in that location.

Thanks again, Greg. Think I finally made it. After hours of trying without success it worked when I modified the project files. I don’t know if it was me or a bug in Xojo.

The problem seems to be based around the fact that I put the external files one directory higher than mac and iOS library – on their parent directory level. I exported the complete shared folder at once with “make external”. I noticed that the exact same folder structure of the external files was created inside both iOS and macOS library folders too, but empty. You will find that in the project files at places like “Folder FrameworkName;OSXLib/shared files …” – but that was the place before I made them external.

I changed the project references to “;…/shared files” and had to do the same on iOS after I copied the shared folder from macOS to iOS (via clipboard inside the IDE). Now everything seems to work, and I try to keep an eye on items I add later.