Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow invalid names for SceneInterface/SceneCache/IndexedIO #485

Open
johnhaddon opened this issue Mar 30, 2016 · 2 comments
Open

Disallow invalid names for SceneInterface/SceneCache/IndexedIO #485

johnhaddon opened this issue Mar 30, 2016 · 2 comments

Comments

@johnhaddon
Copy link
Member

This was motivated by a cache being written using "" for the name and breaking tools further down the line. We should also consider disallowing "/" in a name since we use it as a path separator. Need to consider carefully at which level of IO we do this - perhaps IndexedIO should be left alone?

@johnhaddon
Copy link
Member Author

I'm just going to play devil's advocate here, and suggest an alternative approach. In a vector<InternedString> there is no ambiguity at all with any choice of name (even dumb names like "" and "/"), so why should we restrict it? The other option is to allow "/" to be escaped in the string->vector<InternedString> conversion, to disambiguate. For instance :

  • /a/b/c -> [ a, b, c ]
  • /a\/b/c -> [ a, /b, c ]

There's a related discussion on GafferHQ/gaffer#2070, where we're considering restricting even further to just alphanumerics. I think that's probably too much, so I'm proposing the above as an example of how we could remain totally general if we really wanted to.

@mattigruener
Copy link
Member

Just so I have mentioned this: The solution to use just alphanumerics that I have brought up before actually wouldn't work for us because we have nodes that create objects in an array-like format:

myObjects
\ object[0]
\ object[1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants