Open AutonomicPerfectionist opened 11 months ago
I think adding identifier is okay, though I don't think it alone will fully solve the CMakeTest issue that inspired it. In particular, I think users of CMakeTest should be allowed to name tests with names like "This is my test".
There's a separate issue CMakePP/CMakeTest#90 to figure out what to do with that, I just realized we had no true identifier
type while thinking about that issue
Is your feature request related to a problem? Please describe. Right now, when we want to say "this parameter must be a string denoting a valid CMake variable name," we use the
desc
type. However,desc
is allowed to contain spaces and other special characters that are not valid in CMake variable names. This results in signatures not being specific enough and can lead to very hard-to-debug errorsDescribe the solution you'd like It would be nice to introduce a new built-in type, say we call it
identifier
, that is descended fromdesc
but adds additional restrictions such that everyidentifier
is guaranteed to be a valid CMake identifier. Pointers can then descend fromidentifier
instead ofdesc
.fxn
may also descend fromidentifier
since command names also follow the same restrictions.