Cargo Shorts GUI

fronobulax

Developer
Staff member
OK. I deleted and restored. No visible change. I wonder if the issue is I have never noticed that the in-run version is lacking features? I've used the script in run only a couple of times so that's maybe 10 views in contrast to many, many more in aftercore.

I bristle when someone talks about a problem, claims it is frequent, claims it is mafia's problem and I have never heard of it. I accept that reaction is my problem but language is important.

That said I saved phulin-shorts-ui-branches-master-build before and after the delete. mafia said it was up to date before the delete so I expected no differences. I found a few files of the form bundle.number.* were missing and replaced(?) by similarly named files with a different number. That is a legitimate concern since mafia thought things were up to date.

In a pure svn environment I have seen this before in two cases. One is where svn doesn't really understand that something was renamed or that something was deleted. The cause was almost always operator error when checking in. (More later). The other case is when svn was being asked to manage an archive or a bundle that was subsequently unpacked. It was quite possible to change the contents in a way that svn did not detect as a file change and act accordingly.

The operator error may be something in the wrapper that maps between svn and git. Given the reluctant support for git in mafia it may also be that there is something that needs to be tweaked in SVNKit or maybe there is a update to SVNKit mafia needs to install. Perhaps, with mafia's new found willingness to use someone elses jar file we should investigate pulling SVNKit source out of lib?

In any event, I agree there is a problem, I am not sure I would describe it as a kolmafia caching problem, and I would first look at git->svn->mafia in hopes that it can be fixed by a change in process instead of code.
 

ikzann

Member
When updated, scripts that use file_to_buffer to load data files from disk will continue to load old versions until Mafia is closed, because the cache isn't cleared until Mafia is restarted. The shorts GUI uses a data file to store the HTML snippet it inserts into the page. If that's outdated, people won't see updates until they restart Mafia. This is mostly an annoyance for me while I develop the script, but has confused people in the past.

I'm not sure what's going on with the SVN stuff, although I have heard reports from folks of files not being updated correctly. The file replace pattern is due to the way I'm using (abusing?) the web development framework preact to build this extension. Looking over it, the git state is being recorded correctly as far as I can tell. It may be that the git-svn stuff is not working quite right as you suggest.
 

fronobulax

Developer
Staff member
OK. There are definitely cases where KoLmafia not obsessively looking for changes in disk files that aren't under mafia's control and reloading is a feature, not a bug. The discussions I recall centered about editing a script that is a dependency while a running script is using it and some cases where there were performance issues with the underlying OS.

I confess I am not easily following the caching code which is bothersome since I take some of the blame. It would be nice to know whether what you are seeing is a Feature, a bug in the existing process to invalidate the cache or a new case given that the files are not in /data.

But if you get a patch before I figure it out, share it :)
 

Xande1

Member
For what it's worth, I'm certain that every time I've encountered the "you have to delete and reinstall certain scripts for them to update correctly" it's been with scripts stored on github. Also, it persists even over multiple closings and re-openings of mafia. So basically I concur with fronobulax that that problem lives somewhere in the git->svn->mafia pipeline. That's my $0.02, on the subject, anyway.
 

Magus_Prime

Well-known member
For what it's worth I've seen the same behavior as Xande1, and fronobulax, over multiple days and restarts of KoLmafia. In addition I've never seen a difference between the in-run display of Cargo Shorts GUI and aftercore, even days after breaking the prism. Until today that is. I deleted the script and reinstalled while in aftercore. Now I see the expanded interface.
 
Last edited:

fronobulax

Developer
Staff member
1) Would someone please post a screen shot of the non-expanded interface (or portion thereof) so I can confirm that is the version I have NOT seen?

2) KoLmafia's SVN support comes from SVNKit which is an open source project. We generally do not update code until there is a problem. But there is an October 2020 release which means something could have been fixed and we are not using it. I am looking at an alternative way for Kolmafia to "include" SVNKit and, whether my new way works or we stay with the old way, KoLmafia will end up with the newer version.
 

Xande1

Member
1) Would someone please post a screen shot of the non-expanded interface (or portion thereof) so I can confirm that is the version I have NOT seen?
This is the in-run UI from the current version of the script. I'll be able to get the aftercore UI tomorrow and can post that then.
 

Attachments

  • Screenshot from 2020-11-22 09-26-27.png
    Screenshot from 2020-11-22 09-26-27.png
    265.1 KB · Views: 21

Boesbert

Member
This is a really welcome addition. I suggest adding the monsters to fight, though (not sure if these show up in-run; I am in aftercore but as these are all free fights, they are valuable in either case).
 

hesuchia

Member
It lists some of the useful in-run ones when you're in run, but I'd suggest adding the war orc for people who don't have calculate the universe
 

VladYvhuce

Member
It would be nice if it didn't hide the in-run items when it switches to Aftercore mode, as I sometimes do softcore runs and it treats that as aftercore, making me have to go back and look up pockets I need early on in the run.
 

philmasterplus

Active member
It looks like this project is beset by the behavior that overwrites identically-named files. If you install Cargo Shorts GUI and the recent version of OCD-Cleanup (in whatever order), index.html from one project would overwrite the other, despite being placed under separate subdirectories. This breaks one or both relay scripts, depending on whether you hit "Yes" or "No" during the install/update process.

I'm working on a workaround for OCD-Cleanup that will hopefully be pushed out within 24 hours. In the meantime, if you already have both the Cargo Shorts UI and OCD-Cleanup installed, please uninstall both and then install the one you need to use. Fixed

@ikzann I expect this will be a recurring problem with relay scripts bootstrapped with create-react-app, Vue CLI, Preact CLI, etc. These boilerplate generators typically expect or enforce the entrypoint file to be index.html. I can resolve the immediate conflict by renaming OCD's index.html, but it would be prudent for Cargo Shorts UI to rename its own index.html as well in order to avoid future conflicts.

Edit: Fixed wording
 
Last edited:

fronobulax

Developer
Staff member
It looks like this project is beset by the bug that overwrites identically-named files.

I'm "in a mood". It is not a bug. It is a feature doing exactly what it was designed to do. The fact that the design should be reconsidered because of the way script authors want to deploy JavaScript does not make it a bug. Words are important as anyone who has used "annoy" to describe a KoLmafia behavior should have learned.
 

VladYvhuce

Member
I'm "in a mood". It is not a bug. It is a feature doing exactly what it was designed to do. The fact that the design should be reconsidered because of the way script authors want to deploy JavaScript does not make it a bug. Words are important as anyone who has used "annoy" to describe a KoLmafia behavior should have learned.
In that case, it's a very irritating feature.
 

fronobulax

Developer
Staff member
In that case, it's a very irritating feature.

You are welcome to join the discussion elsewhere. I will add "irritating" to the list of words that suggest the poster has an attitude of entitlement concerning free software that means my mental health will be improved by ignoring them.
 

Hoover889

New member
Can someone ELI5 how to modify this script to add additional pockets? I love the interface but there are a few additional pockets i want to add for myself (not optimal so most others will probably not want them). I already know the technical stuff (like how to clone the repo to my own github account, and I am a good programmer) but there are so many files... I want to know which ones I need to modify without going through everything.
 

fronobulax

Developer
Staff member
If you wish you can also edit the local versioned copy which will be in (or below) "svn\phulin-shorts-ui-branches-master-build". That will preserve your local changes if the author updates the script and will avoid any of the current issues where two repositories share file names. The latter is a bug being worked but at present file names collide if they are the same name, regardless of subdirectory.
 
Top