hpi-swa / Squot

Squeak Object Tracker - Version control for arbitrary objects, currently with Git storage
Other
61 stars 29 forks source link

Git Browser cannot find my package to load/trick #397

Closed cr1901 closed 1 year ago

cr1901 commented 1 year ago

I'm trying to learn Smalltalk/Squeak for Advent Of Code 2022 and want to save my work so that others can "easily" run my code (and also view the source if they don't want to load a VM plus image).

Obviously, I'm doing something wrong here, but with the sparse information on the Squeak Wiki, I cannot figure out what I'm doing wrong.

First, I have created a test repository on my system:

image

Next, the git browser tells me "I need to add a package to track in this project" (tangential question: the README says "With this tool you can create projects (in-image working copies) that can contain multiple objects, including packages.". But the git browser seems to imply that "only packages can be tracked"? Maybe the top-level object must be a package):

image

From what I can gather, a package refers to code loaded by Monticello. So I create a dummy Monticello package as so:

image

When I try to track my shiny new fake package in Git Browser, the Git Browser can't find it: image

To avoid an XY Problem: What specifically must I do in order to use Git Browser to track code for classes/objects I'm inserting into the System Browser?

cr1901 commented 1 year ago

Update: Apparently, an empty package will not be recognized by the Git Browser. I have to add something (even a dummy class) to the TestPackage category before the Git Browser will start tracking a package.

j4yk commented 1 year ago

Hello @cr1901,

Thank you for these questions! Packages in Squeak are constituted by class categories, so you have to create a category before you can add the package in the Git Browser. To add the package in the Monticello Browser is not required, and neither is that you create a dummy class in your category first.

Specifically, to meaningfully track some code with the Git Browser, you first have to create some code, which means you will create one class, which means you will put that class into a category. This category can automatically be treated as a package, and you can add it as such in the Git Browser.

I have extended the intro text to point out this relationship to class categories, and renamed the "title" in the left list in the package tracking selection dialog to say "Untracked class categories" to indicate that this is what gets displayed there.

The tracking of objects that are not packages is implemented under the hood, but not really stable yet. Hence I have not added any buttons or indications in the GUI of it.