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

[Feature]: Add support for map IDs in getTokens #5062

Open
kwvanderlinde opened this issue Nov 20, 2024 · 1 comment
Open

[Feature]: Add support for map IDs in getTokens #5062

kwvanderlinde opened this issue Nov 20, 2024 · 1 comment
Labels
feature Adding functionality that adds value

Comments

@kwvanderlinde
Copy link
Collaborator

Describe the Problem

getTokens() can use a map name as a condition. But map names are neither stable nor unique, so map IDs are preferrable in many case. Alas, getTokens() does not support map IDs.

The Solution you'd like

Add a new "mapID" condition to getTokens() and getTokenNames() that will match maps by their unique ID.

Alternatives that you've considered.

Extending the existing "mapName" condition to support map IDs. I turned this down because "mapName" suggests a name not an ID, it makes matching less precise when map names look like GUIDs, and it could hamper any other future changes to map name lookups.

Additional Context

No response

@kwvanderlinde kwvanderlinde added the feature Adding functionality that adds value label Nov 20, 2024
@FullBleed
Copy link

Is there a way to pull functions that:

  1. Currently only support mapname and not mapID.

  2. Token specific functions that rely on currentMap instead of having a mapname/id parameter.

As someone painstakingly going through his primary framework and refactoring everything to be mapID aware I feel like all of the get* token based functions need to be updated to support mapID. As you noted, map names just aren't stable, and wide support for mapIDs wasn't available when I wrote, or incorporated, a LOT of features... But I'm running into situations where if I use functions that expect tokens to be on the currentMap (i.e. getLabel) I have to wrap sections of code in map switching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
None yet
Development

No branches or pull requests

2 participants