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

Attempting to load Seaside fails #407

Open
timrowledge opened this issue Dec 7, 2023 · 2 comments
Open

Attempting to load Seaside fails #407

timrowledge opened this issue Dec 7, 2023 · 2 comments

Comments

@timrowledge
Copy link

I've been making some fixes to Seaside and was hoping to use Squot to commit them and issue pull requests. (Assuming of course that this is even the thing I should do; not a git-user)

Loading Squot works just fine.

I had no problem with cloning the seaside repository (https://github.com/SeasideSt/Seaside.git) nor with getting to see an impressive amount of files as a result. It's very fast; good.

My problem is that loading Seaside (outside of the Squot context) is pretty complex and loads a bunch of other packages using

(Smalltalk classNamed: #Metacello) new
baseline:'Seaside3';
repository: 'github://SeasideSt/Seaside:master/repository';
load;
load: #('REST' 'Scriptaculous').```

At the very least this brings in a bunch of the Grease project as well.

If I try to follow the guide to using Squot things go very wrong quite quickly because it doesn't do all those prerequisites and extras. Not being a git expert, Squot expert, nor metacello expert, I'm not sure what the appropriate way to deal with this might be. Has anyone ever tried Squotting Seaside? Is it possible to do the load via the metacello baseline script above and then 'adopt' it into Squot? Or what?
@j4yk
Copy link
Collaborator

j4yk commented Mar 19, 2024

Hi @timrowledge, sorry for replying so late to this.

Can you be more specific how things go "very wrong"? For the rest of the reply I will assume that you mean that the Git browser does not show the loaded Seaside yet, or that the Squot working copy is "out of touch" with what you previously loaded via Metacello.

Yes, you can "adopt" already installed packages into Squot and the Git Browser after having them installed via Metacello previously, but it can be somewhat tricky. Nevertheless this is the way to go because as you noticed, Squot does not take care of loading any dependencies outside of the project's Git repository like Metacello does.

To "adopt", you must add a new project in the Git browser and choose the directory of your existing Seaside clone, or "Clone" in the Git browser. That will add Seaside in the Git browser without loading anything, with the default branch marked with the green dot for the "current branch". If what you loaded with Metacello matches the latest commit on that branch, you can skip the next paragraph.

If you loaded something from a different branch or for any other reason the stuff in your image is based on a different commit than the one displayed at the top of the branch with the green dot, you have to find the correct branch in the Git browser. Then you have to "trick" the Git browser to switch to this branch without actually doing anything to the working copy. You can do this by shift-yellow-clicking on the branch and choose "Make this the current branch". This command is hidden in the shift menu because as much as it helps to "reconnect" your working copy to the right point in history in this case, if used inappropriately it leads to the opposite where your working copy gets out of synch with the current branch, which subsequently may lead to strange commits later on. This is like telling Monticello: "Please assume that this version is the ancestor of my working copy, not the one that you thought it is."

Once the branch with the green dot is at the right commit, which matches what is loaded in the image, right-click on this commit and choose "Checkout objects". Squot will now notice all the packages which are in fact already loaded, and add them to the working copy. However, it will obviously not find any of the packages that are not meant for Squeak (but e. g. for Pharo or Gemstone), and will propose to load those in the "Select changes to load" window that opens. You don't want to (and often cannot) load these packages obviously, so in that window, for every such package that belongs to Seaside but not into your image, choose "Toggle whether this will be loaded" in the popup menu. This will tell Squot to keep it around and not remove it with your next commit even though it is not loaded. For the packages that you actually have loaded, you will ideally not see any diff in the window. If there are some differences, you will have to choose whether you want to replace what is in your image with what is in the commit or not (e. g. if you already changed something, you probably want to keep that, i. e. you have to "Skip this change (x)"). Finally, click the "Accept" button to update the working copy.

After you have gone through this hassle, ideally when you click "Commit", it will only show changes that you have made by yourself, and especially no removals of packages.

@timrowledge
Copy link
Author

timrowledge commented Mar 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants