cmsis-pack-manager icon indicating copy to clipboard operation
cmsis-pack-manager copied to clipboard

Index keys need to support case-insensitive compares

Open flit opened this issue 6 years ago • 5 comments

The keys for Cache.index should be all lower-case so that devices can be found with a case-insensitive match.

flit avatar Apr 18 '19 23:04 flit

This is a good idea.

theotherjimmy avatar May 07 '19 15:05 theotherjimmy

@jkrech Are Dnames and Dvariants required to be unique after lowercasing? Could making all devices names lower case lead to conflicts of legitimate devices down the line?

theotherjimmy avatar May 14 '19 18:05 theotherjimmy

CMSIS-Pack is case sensitive and all we are prescribing in the specification is that each Dvendor is responsible for the uniqueness of the Dname / Dvariant descriptions distributed by their own packs. This shall ensure that the touple Dvendor:Dname is unique. Therefore in theory lower-casing Dname may result in duplicates. I have not seen that yet but as far as I can see we must not rule it out completely.

jkrech avatar May 14 '19 18:05 jkrech

Thanks. That's helpful. @flit We may have to find another way to search case-insensitively. I also need to have Dvendor in the index as well.

theotherjimmy avatar May 14 '19 18:05 theotherjimmy

Ok, well, I've already implemented case-insensitivity in pyOCD, anyway.

More generally, I agree the DFP attributes must be case-sensitive. Those contain device vendor names or part numbers.

But from a usability perspective in pyOCD, making target type names case-insensitive is a must.

flit avatar May 15 '19 15:05 flit