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

toBase64UrlUnpadded doesn't use the URL variant in scheme runtime #5504

Open
ceedubs opened this issue Dec 13, 2024 · 0 comments
Open

toBase64UrlUnpadded doesn't use the URL variant in scheme runtime #5504

ceedubs opened this issue Dec 13, 2024 · 0 comments
Assignees
Labels
bug native Bugs in native runtime

Comments

@ceedubs
Copy link
Contributor

ceedubs commented Dec 13, 2024

Describe and demonstrate the bug

In the scheme runtime, the builtin for converting to the URL variant of base 64 doesn't actually use the URL variant. It uses / instead of _ for index 63.

See the difference between run and run.native below:

``` ucm
fresh/main> builtins.merge

  Done.
```

``` unison
main = do
  fromUtf8.impl (toBase64UrlUnpadded 0xsfc)
```

``` ucm :added-by-ucm
  Loading changes detected in scratch.u.

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:

    ⍟ These new definitions are ok to `add`:
    
      main : 'Either Failure Text
```

``` ucm
fresh/main> run main

  Right "_A"
```

``` ucm
fresh/main> run.native main

  Right "/A"
```

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • ucm --version 0.5.29
  • OS/Architecture: x86 linux
@ceedubs ceedubs added the bug label Dec 13, 2024
@dolio dolio self-assigned this Dec 13, 2024
@ceedubs ceedubs added the native Bugs in native runtime label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug native Bugs in native runtime
Projects
None yet
Development

No branches or pull requests

2 participants