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

Permissons should be using a bigint instead of u64 #3047

Open
GnomedDev opened this issue Nov 18, 2024 · 0 comments
Open

Permissons should be using a bigint instead of u64 #3047

GnomedDev opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something misbehaves or is not working. model Related to the `model` module.

Comments

@GnomedDev
Copy link
Member

The permissions type is documented on ddev docs to say:

Permissions are stored in a variable-length integer serialized into a string, and are calculated using bitwise operations. For example, the permission value 123 will be serialized as "123". For long-term stability, it's recommended to deserialize the permissions using your preferred languages' Big Integer libraries.

This was also echoed by discord staff in the large bot channels a while ago, as they are coming up to 64 permissions. This will be a breaking change as bitflags is not compatible with bigints, to my knowledge, and we wouldn't want to use a naive bigint implementation anyway for performance reasons.

@GnomedDev GnomedDev added bug Something misbehaves or is not working. model Related to the `model` module. labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something misbehaves or is not working. model Related to the `model` module.
Projects
None yet
Development

No branches or pull requests

1 participant