Skip to content

Conversation

@mitchellwrosen
Copy link
Member

Overview

This PR fixes a small bug in slurp related to unnamed test watches. Previously, we assumed that, when trying to resolve a term by Name to its type, its Name.toVar name would either be found in the latest typechecked unison file, else it'd be in the codebase.

Now, between those two, we check whether it exists as an unnamed test watch in the latest typechecked unison file (whose generated Name, i.e. test.<guid>, matches the name we're looking for.

I also amended builtins.md to include a test that looks like it was accidentally omitted.

Test coverage

I tested this change manually by merging into #5962 where the bug was observed. I don't entirely have an explanation for why that branch was hitting this error but trunk wasn't, as the changes to the load logic are superficial.

@mitchellwrosen mitchellwrosen marked this pull request as ready for review October 28, 2025 17:31
@mitchellwrosen mitchellwrosen changed the title slurpt unnamed test watches properly slurp unnamed test watches properly Oct 28, 2025
@aryairani
Copy link
Contributor

Was there no way to intentionally trigger it with a transcript?

@aryairani
Copy link
Contributor

aryairani commented Oct 28, 2025

Or, I guess I was confused about testing strategy between the comment about testing manually and the one about updating builtins.md

@aryairani aryairani added this to the 1.0.1 milestone Oct 29, 2025
@aryairani aryairani merged commit 3c5e994 into trunk Oct 29, 2025
31 checks passed
@aryairani aryairani deleted the unnamed-test-watch-slurp branch October 29, 2025 17:36
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.

3 participants