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

Fix ByteArray warning, declare compatibility with GNOME Shell 42 #15

Merged
merged 2 commits into from
Apr 2, 2022

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Apr 1, 2022

  • extension: Avoid deprecated conversion from Uint8Array to String

    Previously, this logged a warning:

      Some code called array.toString() on a Uint8Array instance.
      Previously this would have interpreted the bytes of the array
      as a string, but that is nonstandard. In the future this will
      return the bytes as comma-separated digits. For the time being,
      the old behavior has been preserved, but please fix your code
      anyway to explicitly call ByteArray.toString(array).
    

    The byteArray module mentioned in the warning is itself non-standard,
    and in gjs >= 1.70, there is a standard JavaScript replacement for it,
    the TextEncoder object. For details see
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1946.

    Resolves: relies on deprecated Uint8Array.toString conversion #14

  • metadata: Declare compatibility with GNOME Shell 42

    Bug-Debian: https://bugs.debian.org/1008535

@smcv
Copy link
Contributor Author

smcv commented Apr 1, 2022

Marked as draft until I test it with older and newer GNOME Shell versions.

@smcv
Copy link
Contributor Author

smcv commented Apr 1, 2022

Confirmed to work with GNOME Shell 3.38.6 (Debian 11), 41.4 (Debian testing) and 42.0 (Debian unstable).

@smcv smcv marked this pull request as ready for review April 1, 2022 11:05
smcv added 2 commits April 1, 2022 12:06
Previously, this logged a warning:

    Some code called array.toString() on a Uint8Array instance.
    Previously this would have interpreted the bytes of the array
    as a string, but that is nonstandard. In the future this will
    return the bytes as comma-separated digits. For the time being,
    the old behavior has been preserved, but please fix your code
    anyway to explicitly call ByteArray.toString(array).

The byteArray module mentioned in the warning is itself non-standard,
and in gjs >= 1.70, there is a standard JavaScript replacement for it,
the TextEncoder object. For details see
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1946>.

Signed-off-by: Simon McVittie <[email protected]>
Resolves: biji#14
Copy link
Owner

@biji biji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you

@biji biji merged commit f343832 into biji:master Apr 2, 2022
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

Successfully merging this pull request may close these issues.

relies on deprecated Uint8Array.toString conversion
2 participants