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

Index keys need to support case-insensitive compares #96

Open
flit opened this issue Apr 18, 2019 · 5 comments
Open

Index keys need to support case-insensitive compares #96

flit opened this issue Apr 18, 2019 · 5 comments

Comments

@flit
Copy link
Member

flit commented Apr 18, 2019

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

@theotherjimmy
Copy link
Collaborator

This is a good idea.

@theotherjimmy
Copy link
Collaborator

@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?

@jkrech
Copy link

jkrech commented May 14, 2019

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.

@theotherjimmy
Copy link
Collaborator

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.

@flit
Copy link
Member Author

flit commented May 15, 2019

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.

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

3 participants