lpil/youid
Auf GitHub ansehenWarnings about truncated bit array segments when building for javascript target
Open
#16 geöffnet am 12. Mai 2026
bughelp wanted
Repository-Metriken
- Stars
- (31 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
warning: Truncated bit array segment
┌─ /home/liv/source/gleam/gleeps/gleeps_shared/build/packages/youid/src/youid/uuid.gleam:246:64
│
246 │ let assert <<a:size(48), _:size(4), b:size(12), _:size(2), c:size(62)>> =
│ ^^^^^^^^
This segment is a 62-bit long int, but on the JavaScript target numbers
have at most 52 bits. It would be truncated to its first 52 bits.
Hint: Did you mean to use the `bytes` segment option?
warning: Truncated bit array segment
┌─ /home/liv/source/gleam/gleeps/gleeps_shared/build/packages/youid/src/youid/uuid.gleam:280:26
│
280 │ let assert <<data:bits-size(128), _:32>> = crypto.hash(crypto.Sha1, data)
│ ^^^^^^^^^
This segment is a 128-bit long int, but on the JavaScript target numbers
have at most 52 bits. It would be truncated to its first 52 bits.
Hint: Did you mean to use the `bytes` segment option?
warning: Truncated bit array segment
┌─ /home/liv/source/gleam/gleeps/gleeps_shared/build/packages/youid/src/youid/uuid.gleam:299:30
│
299 │ let assert <<a:size(12), b:size(62), _:size(6)>> =
│ ^^^^^^^^
This segment is a 62-bit long int, but on the JavaScript target numbers
have at most 52 bits. It would be truncated to its first 52 bits.
Hint: Did you mean to use the `bytes` segment option?
warning: Truncated bit array segment
┌─ /home/liv/source/gleam/gleeps/gleeps_shared/build/packages/youid/src/youid/uuid.gleam:357:18
│
357 │ let assert <<t:60>> = <<t_hi:12, t_mid:16, t_low:32>>
│ ^^
This segment is a 60-bit long int, but on the JavaScript target numbers
have at most 52 bits. It would be truncated to its first 52 bits.
Hint: Did you mean to use the `bytes` segment option?