Is it a problem if 2 bundled scripts have the same bundle id?

…if we never make a call to those scripts by their ID?

This is a bad thing for many reasons. MacOS uses bundle ID as the identity of an application in lots of places and having duplicates will lead to sadness :slight_smile:

Hi Mark,

Just to be sure: are you saying that 2 bundle compiled scripts sharing the same ID will cause a problem, somehow?

I recommend against this - bundle ID are expected to be unique across your script documents and applications.

I presume you have a reason for wanting to do this. While the chances duplicate bundle IDs will impact a bundled compiled script are lower, it all depends on the runtime environment being used and what the script does. As an example, bundle IDs may be used to retain persistent values (settings) and caches. If you are going to do this, make sure you understand the consequences and document for yourself the assumptions you are making.

Some of my scripts have the same file name because they do the same thing in different software.
I give them a custom ID on creation but it sometimes happens that this ID is reset on editing.
Since this behavior is random and infrequent, I sometimes fail to notice it.

To be sure that everything is for the best, I will add a suffix to their name according to the destination software.

Thanks Mark for your enlightenments.