Skip to content

Update Fat Albert to 1.1.1 (Linux clipboard fix from #379 review) - #384

Open
scotlandsyard wants to merge 1 commit into
StarCpt:mainfrom
scotlandsyard:hub-fatalbert-1.1.1
Open

scotlandsyard wants to merge 1 commit into
StarCpt:mainfrom
scotlandsyard:hub-fatalbert-1.1.1

Conversation

@scotlandsyard

Copy link
Copy Markdown
Contributor

Updates Fat Albert from e31f251 (#379) to 5c03cb2, version 1.1.1.

The only Fat Albert change is the Linux fix from the #379 review: PlanetNames.ReadClipboard now uses TrySetApartmentState, so Paste GPS list no longer throws on Linux (Pulsar Interim), and the csproj comment on CA1416 is reworded. git diff e31f251..5c03cb2 -- "Projects/Fat Albert" Shared covers it; Shared/ is unchanged. The same commit is the pin for #380.

Tested on Legacy and Interim (Windows), including a hub build of 5c03cb2 through a local hub source. The Linux path is not run-tested.

🤖 Generated with Claude Code

@viktor-ferenczi viktor-ferenczi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Fat Albert 1.1.1 bump

Scope: hub PR head 86ab03f0f525cb8a756e2b73f2310fd8ee71b218. Plugins/FatAlbert.xml moves scotlandsyard/SpaceEngineersPlugins from e31f251 to 5c03cb2, so this is a bump review of git diff e31f251..5c03cb2 (2 commits). The whole range is 25 files, +210/−36, but only 3 of them are in Fat Albert's SourceDirectories; the rest are the #380 plugins. I read those 3 files line by line. None of the five Shared/ files it compiles changed.

Summary: no blockers. The change is the fix asked for in the #379 review, and it does what it says. There is one Linux note below about what the clipboard read returns there, which is a LinuxCompat limitation and not something this PR can fix.

Manifest

  • test.py Plugins at the PR head passes (All files validated). Only <Commit> changed. Id, RepoId, SourceDirectories and description are the same as base, and no other manifest uses this Id.
  • No NuGetReferences, AssetFolder or dependencies, and none are needed.

Repository and pin provenance

  • 5c03cb2 is on main, and e31f251 is its ancestor. main HEAD is now be918a5, two commits ahead; they touch only Sacrificial Stockpile Manager, nothing Fat Albert compiles.
  • Project references: the only csproj change in scope is a comment. Packages in the hub manifest: none. Committed binaries, native files, submodules: none in the range.

Security

The in-scope delta is one call change, one comment and the assembly version (1.1.0.0 to 1.1.1.0). No networking, process, file, reflection or Harmony changes.

The #379 finding

Fixed. PlanetNames.ReadClipboard now calls thread.TrySetApartmentState(ApartmentState.STA). On .NET 10.0.11 on Linux a console check gives TrySetApartmentState=False, and the thread still starts and joins within the 2 s wait. The CA1416 comment now says why the suppression is safe, and that is accurate.

From-source build

I compiled the manifest's file set (Projects/Fat Albert/Source/**/*.cs plus the five Shared/ entries, 19 files) with Roslyn csc from SDK 10.0.400, -langversion:14 -unsafe+ -platform:x64, against SE 1.211.017 Bin64. Once with net48 reference assemblies and NETFRAMEWORK;PULSAR, once with the .NET 10.0.11 ref pack and NETCOREAPP;LINUX;PULSAR. Both builds: 0 errors, 0 warnings. Not load-tested in a game.

Non-blocking notes

  • Note (Linux only): Paste GPS list can read stale clipboard text. On Linux the MyVRage.Platform.System.Clipboard getter is patched by LinuxCompat (SdlClipboard.GetText, the pinned hub version). Called from any thread other than its SDL thread, it returns a cached string: the last text the game set, or the last text a game paste read through SDL. Fat Albert's worker thread is never the SDL thread, so text copied from Discord or a browser isn't seen until something in the game has pasted it. The button then reports an empty clipboard or imports an older GPS list. Vanilla's GPS "New from clipboard" works on Linux only because LinuxCompat replaces it with an async read on the SDL thread. Nothing for you to change here: a plugin has no fresh synchronous read on Linux. Until LinuxCompat offers one, a Linux player can paste the list into any game text box first, which refreshes the cache.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants