IP9, #include and aliases

I finally got to playing around a bit with IP9 and have run into some problems getting my code to work. I hope someone can help.

 

My setup is as follows:

I have one big folder with lots of subfolders that contains all my Igor code, which lives in a Dropbox. I create an alias to this folder (Mac Mojave) and move said alias to the Documents/WaveMetrics/(…)/User Procedures folder. In IP6, 7 and 8, I can then #include any file in any subfolder I want. However, this workflow now seems broken in IP9 and I keep getting "Include file not found" errors.

 

A minimal problem I can reproduce is this:

  1. Create a folder somewhere that contains "file1.ipf", create an alias and move the alias to the WaveMetrics/(…)/User Procedures folder.
  2. Start IP9, #include "file1". File is included just fine.
  3. Now also move the alias to my big Dropbox folder to WaveMetrics/(…)/User Procedures folder
  4. Restart IP9, #include "file1" and I get an "Include file not found" error.

Stragely enough, after step 4, I can include files that are in the Dropbox folder, at the lowest level, but not in any of the subfolders. Relative paths don't seem to work either.

I'm completely stumped, not least because the same alias-to-Dropbox workflow works just fine in IP8.

Some screenshots

Ugh! Procedure files as aliases pointing into a cloud folder. On macOS. I've never trusted this approach to work reliably with anything.

You may need to do some digging about aliases versus symlinks and play with commands at the terminal.

https://apple.stackexchange.com/questions/323213/symbolic-link-vs-alias

https://dkhambu.medium.com/symbolic-link-vs-alias-90e3d196578f

Even when your problem is resolved now, I'd be curious if this approach is sustainable in the long term.

In reply to by jjweimer

I forgot to mention: Replacing the aliases with symlinks doesn't make a difference. 

Having the folder on the dropbox really does seem to mess things up though. The problem disappears when I symlink to a copy of the folder on the HD. Thanks for nudging me in the right direction, JJ.

I still haven't given up on having my code on the cloud. It sure makes things convenient and it works just fine in IP8, for some reason.

The file system code for the mac version of Igor was completely rewritten for IP9. IP8 and before had been using long since deprecated API calls that got buggier and buggier. It's pretty likely that this change explains why this worked for you on IP8 but not IP9.

Like jjweimer, I recommend against doing this because even if you get this bit working you might run into other problems (especially if you may modify any of the procedure files in the Dropbox folder). But you wouldn't be the first user to try to use a link to a folder in a cloud drive (Google Drive, Dropbox, etc.) like this, and at least sometimes it works well for the user.

From your screenshot, it looks like you know the trick of holding down the SHIFT key and selecting the Help->System Information menu item to get a full directory listing of the Igor Pro and Igor Pro User Files folders. However in your image it isn't clear if the file listing contains no children nodes under "igorstuff alias" or if you've just cropped them out.

I can't recall any other users complaining about this problem in IP9, but this isn't my code so I might have missed some bug reports. I suggest that you send a message to support@wavemetrics.com that includes your full system information (hold SHIFT and select Help->System Information) and information on the Dropbox app or plugin or whatever you're using to set up this drive. We don't use Dropbox so I can't promise that we'll investigate this fully but at least if you send this to support it's easier to make sure that the author of the file system code gets alerted to the problem you're having.

I have my documents folder mirrored to iCloud. For my purposes - simply syncing home and work computers - it has worked well.

In reply to by aclight

However in your image it isn't clear if the file listing contains no children nodes under "igorstuff alias" or if you've just cropped them out.

Nope, nothing cropped out. The folder contents don't show up in the System information, whenever I alias to another folder. Including works fine though.

I'll message support with the original problem. Thanks for the help!