Re: [BuildStream] Invalid characters for element names



In 07/12/2018 15:54, Chandan Singh wrote:
Hi all,

As we already use colon (`:`) as a separator for specifying cross-junction
elements, I was wondering if it would make sense to disallow elements to have
it in their names. This was bought up in comments on #809 [1] and !998 [2].

As we discussed on GitLab, this is already an issue for the CLI as it will not
work correctly if a project has a junction element with `:` in its name. So, I
think we should maintain a list of invalid characters and disallow elements
that violate this policy. I imagine this check to work in the same the recent
change for mandating `.bst` extension works.

While we are doing this change, are there any characters that we would like to
disallow from element names, and reserve them for internal use?


My first thought is to heavily restrict it now, to alphanumeric ASCII, hyphen, underscore and '+'. That is all freedesktop-sdk needs (but please do say if anyone know of another project this wouldn't work for).

It's easier to restrict it now and allow more characters in future than to try and restrict it when people already have elements using unusual characters.

Jim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]