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

Empty code block in doc causes UCM exception #5349

Open
channingwalton opened this issue Sep 14, 2024 · 1 comment · May be fixed by #5352
Open

Empty code block in doc causes UCM exception #5349

channingwalton opened this issue Sep 14, 2024 · 1 comment · May be fixed by #5352
Assignees

Comments

@channingwalton
Copy link

channingwalton commented Sep 14, 2024

Describe and demonstrate the bug

Input in scratch.u:

README = {{{
```
```
}}

Then save the editor:

Encountered exception:
Prelude.last: empty list
CallStack (from HasCallStack):
  error, called at libraries/base/GHC/List.hs:1644:3 in base:GHC.List
  errorEmptyList, called at libraries/base/GHC/List.hs:158:13 in base:GHC.List
  lastError, called at libraries/base/GHC/List.hs:153:29 in base:GHC.List
  last, called at src/Unison/Syntax/Lexer/Unison.hs:432:23 in unison-syntax-0.0.0-45p2Y49CWcnC6rok1OkVIc:Unison.Syntax.Lexer.Unison

Environment (please complete the following information):

  • unison version: release/0.5.26 (built on 2024-09-05)
  • MacOS 14.6.1 on Macbook Pro M1 Max
@aryairani
Copy link
Contributor

Sorry about that, thanks for the report.

It looks like it started here: 31f952, #5187.

sellout added a commit to sellout/unison that referenced this issue Sep 16, 2024
There is no output, because this results in a Haskell exception, not a
Unison error.
sellout added a commit to sellout/unison that referenced this issue Sep 16, 2024
These code blocks still fail, but as a normal Unison error, not a Haskell exception. This matches their
behavior in previous releases.

Fixes unisonweb#5349.
sellout added a commit to sellout/unison that referenced this issue Sep 17, 2024
These code blocks still fail, but as a normal Unison error, not a Haskell exception. This matches their
behavior in previous releases.

Fixes unisonweb#5349.
@sellout sellout linked a pull request Sep 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants