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

Restrict characters in package 'tags' #51

Closed
emdoyle opened this issue May 1, 2024 · 1 comment
Closed

Restrict characters in package 'tags' #51

emdoyle opened this issue May 1, 2024 · 1 comment
Assignees

Comments

@emdoyle
Copy link
Member

emdoyle commented May 1, 2024

While planning work on Issue #49 , I realized that we should restrict and validate package 'tags'. This makes TOML support much more straightforward, and will probably be useful in general if we end up using 'tags' as input to other commands or functionality.

We should use a regex like the following:
^[a-zA-Z0-9]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$
which would allow only alphanumeric characters, underscores, and dashes, while also always starting and ending with an alphanumeric character.

@emdoyle emdoyle self-assigned this May 1, 2024
@emdoyle
Copy link
Member Author

emdoyle commented May 1, 2024

Closing this in favor of turning 'constraints' into a list of dictionaries, and allowing arbitrary strings in a 'tags' key.

tach init already uses dots by default to tag nested packages, and this is intuitive behavior we should keep. We also use colons in our own 'tach' installation.

@emdoyle emdoyle closed this as not planned Won't fix, can't repro, duplicate, stale May 1, 2024
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

1 participant