Feature Update svnrepo.json to be able to use git install (& revisit some scripts)

Captain Scotch

New member
This is facially similar to Irrat's post here, but different enough that I think it's worth a new topic.

Recently, my friend Beldur noticed that one of the scripts in svnrepo.json wasn't working. Being very detail-oriented weirdos, we wondered if there were any other scripts in Script Manager that do not work, so we took an opportunity to look at every script currently within svnrepo.json and test them to see if they are installable without modifications. A spreadsheet of our findings is located here. The majority of the scripts located in the manager still work quite well -- we found a handful of errors in dependencies.txt for the given scripts (noted in the linked sheet), but out of 124 scripts in svnrepo.json, only 14 actively do not install correctly as of r27226. That's basically only 11% -- ridiculous, not even funny. :)

As part of this exercise, we also looked at script activity for scripts where we knew more recent iterations/pulls exist; things like EatDrink vs Consume, cc_snapshot vs av_snapshot, etc. Obviously, a lot of the inactive scripts are totally fine -- for instance, Ezandora's Detective Solver.ash script really doesn't need to be updated at all. It works as perfectly well today as it did when the IOTM was released. On the other hand, we found several scripts in the script manager that have more-recently-updated versions that could probably do with being included over the old version, or scripts that would be great to have a more recent version of. (This is, for example, why we forked in and updated Bountiful; posters on the ASS Discord were having issues with the Script Manager's Bounty.ash script and we wanted to make sure we had something for them to use.)

I wanted to bring this to mafia dev attention for two reasons. First, interested parties could potentially fork and fix the issues with some of the inactive scripts. Some of them, like Bale's OCD Inventory Management, have already been forked with a new version that is more up-to-date. For those, we could just swap that out with their new maintained versions. Second, svnrepo.json currently uses SVN installation for all scripts; now that Mafia has native Git installation support, it would be nice if we could add a way to differentiate git scripts from svn scripts in Script Manager, so that we can have manager default to the correct installation protocol for the given script storage type. At this time, not every git script in Script Manager actually can properly use the normal git installation protocol for Mafia, but of the 27 I think 23 of them are trivial to add checkout statements for and 4 of them would require some sort of different git clone handling.

Anyway. Let me know what you all think. I am happy to do a dust-up of svnrepo.json that cleans up scripts however you all want. I think doing the SVN vs Git differentiation within ScriptManager.java is a bit beyond my scripting abilities, but I am always happy to do the boring paperwork while the better coders do the Java stuff. I think the basic thing is just making sure GitManager.java does the few remaining things that SVNManager.java does and incorporating it properly? I dunno.

Thanks for reading!

-- Scotch
 

Veracity

Developer
Staff member
A few comments:

- Scripts in svnrepo.json are required to have a thread on kolmafia.us that announces them. Ideally, the author/maintainer will read and accept suggestions/bug reports. I realize that a lot of github users accept such things on that platform - and for some folks, only on that platform. I don't particularly care. If there is an announcement thread here, it could state that as the policy and explain where/how to do it.
- If Aventuristo wants to make a forum thread here, I'd be happy to update the Snapshot Maker entry to point to it.
- You can expect updates for a few of my "non-Active" scripts soon.
-- Garden Harvester will soon have Rock Garden support. If KoL only releases a new garden every two years, you can't really expect updates more often than that. :) In any case, I just released "garden pick PLOT..." to KoLmafia's CLI, so expect an update Real Soon Now.
-- Missing Manuel will have an update within days; I have it updated with the Avatar of Shadows over Loathing bosses, but just want to check the Cheese Wizard and Jazz Agent replacements for Naughty Sorceress forms.
-- Veracity's BeachComber works as well as it has ever - but considering that I myself have switched to using "combo", I no longer recommend it. Heck, VMF can be configured to use either VBC or combo
-- All my scripts use vprops. vcon uses vprops, but is only used in VMF. Those are both library scripts.
- Auto Mushroom is by rlbond86, who has handed custody (in the form of commit access) to me, since they are no longer interested in KoL. I think it works just fine as is and my multis all have mushroom gardens, so, if we somehow break it, I will know soon enough, but I expect it is "finished".
- Airport Colors is a Relay script. What do you mean "does not cause any apparent changes"? Works great for me; when I look at the airport, the 5 charter planes are colored per their element. Is there an installation issue?
- Thanks for pointing out that CONSUME points to Detective Solver. Oops. :)
- Bale's NS Tower Scroller works as always; when you go to the lair, the browser scrolls down to the first unfinished stage.
- I have no idea what Bale's Campground does, but I am sure that it has the same issue that was reported when somebody's Campground script took over for Workshed visits. This Not a Bug

I would like GitManager support with ScriptManager. But that was Not a Goal of the original release, although it would be a nice improvement.
 

fronobulax

Developer
Staff member
The data in svnrepo.json comes from script authors. So if a script is not there or if it has errors the script author should be the point of contact for issues.

The succession question is not quite as black and white as it may appear. For example, EatDrink and Bale's OCD script both have potential successors but if the successor is not listed in svnrepo.json then the script author needs to take some action. Furthermore when the successor scripts were announced, at least for me, they were not complete replacements with identical functionality. So I am likely to run the ancient scripts until they break totally for me. No one else has to do that but changes to svnrepo need to allow successors to exist with their ancestors.

Bale's UR exists in two versions because there were users who did not want to adopt the new version. Since that was a fork and a relocation on SVN that was easy to accommodate but that solution does not handle succession very well. An issue with succession is names. Sometimes users want the same name for their inventory management script whether it is Bale's or someone elses. That suggests an installation process that knows about aliases.

Some of the possibilities for improving what is essentially KoLmafia's App Store probably are not going to work with the current model of everything being installed in scripts/ and only run from there. That is not likely to be a quick fix.

The ability of KoLmafia to infer the protocol from the repository seems to be a good idea and feasible. I just don't think it has risen to the top of anyone's list.

Thank you for the analysis.
 

fronobulax

Developer
Staff member
Not sure where/how to continue the discussion.

A new command "checksvngit" that scans the local SVN directory for repositories that are hosted on GitHub in r27233.

Simplistically anything it reports should be uninstalled and then manually reinstalled using git, not SVN. This is simplistic because it does not deal with things that can be installed via the Script Menu or that are installed as dependencies. It does not account for the possibility that the same repository could be on a user's machine installed by both svn and git.

I'm wondering about making KoLmafia decide the protocol for everything in svnrepo.json based upon the host repository and making KoLmafia smart enough to check for the same repo installed via SVN and git. I'm also wondering about how to manage local changes. In SVN you just make the changes in the svn directory and the svn command will merge your changes when it updates. Not sure how to make that happen with git, although it is possible.
 
Top