ID's are truncated when too long?

Hi,

Trying to debug an issue with a component not receiving messages. I printed out the msg.url() from the init function of my script and it looks wrong.

DEBUG:SCRIPT: url: [battle:/collection0/battle_character_i#battle_character_image_s]
DEBUG:SCRIPT: url: [battle:/collection1/battle_character_i#battle_character_image_s]
DEBUG:SCRIPT: url: [battle:/collection2/battle_character_i#battle_character_image_s]

It is printing battle_character_i instead of battle_character_image_selector and battle_character_image_s instead of battle_character_image_selector.

Is this just a side-effect of pprint() or is there a max-length on identifiers?

That’s just an oversight with the way URLs are converted to strings that limits each part to 32 characters.

2 Likes

I agree, we can (should) increase it from the 32 char limit. I think the 32 was originally only for the socket name. :man_shrugging:
It is still going to be a fixed upper limit though (something like 256/512) to avoid allocating an extra string.

Added ticket here:

3 Likes