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

Referring to a named watch, then adding, triggers sqlite crash #3376

Open
ChrisPenner opened this issue Aug 31, 2022 · 3 comments
Open

Referring to a named watch, then adding, triggers sqlite crash #3376

ChrisPenner opened this issue Aug 31, 2022 · 3 comments
Assignees
Labels

Comments

@ChrisPenner
Copy link
Contributor

ChrisPenner commented Aug 31, 2022

Referring to a named watch, then adding, triggers sqlite crash

> named = 18

x = named
.> add

  ⍟ I've added these definitions:

    x : Nat


  I added some default metadata.

Encountered exception:
SqliteQueryException
    { sql = "SELECT object.id
            FROM object
            JOIN hash ON object.primary_hash_id = hash.id
            WHERE hash.base32 = ? COLLATE NOCASE"
    , params = ""4cmnuksk66811n0hde9oroe54q1ku0r11fj50hvnvpfn7baooolpc4kpkocb3j6e6r7tu485mkvit586io4m4ua43ukd54i1kk24rpo""
    , exception = ExpectedExactlyOneRowException
        { rows = "[]" }
    , callStack = []
    , connection = Connection
        { name = "main"
        , file = "/Users/cpenner/.unison/v2/unison.sqlite3"
        }
    , threadId = ThreadId 295
    }

@aryairani
Copy link
Contributor

This is still an issue as of today even with #4438 merged

@aryairani
Copy link
Contributor

I'm guessing we just universally exclude watch expressions, but we should include them if a regular expression depends on them, or complain and fail when we try to add a dependent; but why not just include them?

Could just do a time-boxed initial investigation

@aryairani
Copy link
Contributor

We hope that nobody is referring to named watches in their other definitions, but as an error message, an unformatted sqlite exception is p. bad. The problem is likely that we unconditionally exclude watch expressions when adding, even if they are dependencies.

Mitchell says maybe stop supporting named regular watches at all.

Chris wonders if it wouldn't be the same amount of work to fix the exclusion vs disallowing named regular watches.

test> named = []
x = named

followed by add produces the same-looking sort of crash

@aryairani aryairani added crash and removed codebase-manager / ucm Issues related to the codebase editor CLI application (ucm) crash labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants