Cargo Shorts GUI

fronobulax

Developer
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
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

Active 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
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: 6
Top