GemTalk / Rowan

a new project/package manager for Smalltalk that supports FileTree and Tonel repositories, and is independent of Monticello and Metacello
MIT License
14 stars 7 forks source link

Too easy to fail a project load and make future logins impossible #845

Closed ericwinger closed 2 years ago

ericwinger commented 2 years ago

Using Jadeite, 3.2.9, I got an error during project load which prevented future logins. Can anything be done to make a nicer failure case or user error message or should this be filed under "don't do that?"

Reproduction case:

  1. Using Jadeite 3.2.9 console project pop-up menu, "Load Git Project ..."
  2. Select a .ston file that is not in $ROWAN_PROJECTS_HOME. I selected one of Lisa's .ston files on benton. /benton1/users/gsadmin/ROWAN37/myrowan/TestCreateProj/rowan/specs/TestCreateProj.ston
  3. I got an error and closed the debugger. Will attach the stack for reference. 20220815_cant_unload_project.txt
a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand  #'/'

At this point, when I closed the debugger, the project had been loaded and was in a bad state. In retrospect, I should have aborted immediately, but instead I committed.

The realization of big trouble came later when I logged out and couldn't log back in. That's because Jadeite error'ed trying to access the bad project when it tried to open the console.

I could see a user having problems like this.

It might be possible to have Jadeite do something on login if there's a project in a bad state but continue to login. That has risks too because the bad project is still lurking in the image.

dalehenrich commented 2 years ago

@ericwinger so far I only see a stack that appears to be from an attempt to unload a project ... did you get an error while loading?

ericwinger commented 2 years ago

The problem wasn't on load, it was when Jadeite tried to access the project. That's done after login, when it opens the console's project browser. It fails in the same way - on the #asDefinition call.

ericwinger commented 2 years ago

20220815_load_fail.txt

ericwinger commented 2 years ago

20220815_Jadeite_hits_bad_project.txt

dalehenrich commented 2 years ago

Looks like the project spec ... is invalid so we either need to validate the project spec on load (yes) or wait until the last minute to put the project into loaded projects (also yes) ...