Commit Graph

49 Commits

Author SHA1 Message Date
metalgearsloth
41ea10083d Fix ResPath CanonPath (#5452)
* Fix ResPath CanonPath

Apparently this is supposed to standardise to / but this isn't always the case. Alternatively we could just assert for performance reasons I'm good with either. The comment as written says this should happen.

* assert

* Fix bad respath input

* review
2025-03-08 15:02:46 +11:00
Pieter-Jan Briers
0094040d68 Dependency update / fixes / skrungle bungle (#4825)
* Move to Central Package Management.

Allows us to store NuGet package versions all in one place. Yay!

* Update NuGet packages and fix code for changes.

Notable:

Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.

* Remove dotnet-eng NuGet package source.

I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.

* Fix double loading of assemblies due to ALC shenanigans.

Due to how the "sideloading" code for the ModLoader was set up, it would first try to load Microsoft.Extensions.Primitives from next to the content dll. But we already have that library in Robust!

Chaos ensues.

We now try to forcibly prioritize loading from the default ALC first to avoid this.

* Remove Robust.Physics project.

Never used.

* Remove erroneous NVorbis reference.

Should be VorbisPizza and otherwise wasn't used.

* Sandbox fixes

* Remove unused unit test package references.

Castle.Core and NUnit.ConsoleRunner.

* Update NUnit to 4.0.1

This requires replacing all the old assertion methods because they removed them 🥲

* Mute CA1416 (platform check) errors

TerraFX started annotating APIs with this and I can't be arsed to entertain this analyzer so out it goes.

* Fine ya cranky, no more CPM for Robust.Client.Injectors

* Changelog

* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.

* Central package management for remaining 2 robust projects

* Ok that was a bad idea let's just use NUnit 3 on the analyzer test project

* Oh right forgot to remove this one

* Update to a newer version of RemoteExecutor

* Disable RemoteExecutor test

https://github.com/dotnet/arcade/issues/8483 Yeah this package is not well maintained and clearly we can't rely on it.

* Fix immutable list serialization
2024-01-12 22:59:52 +01:00
Pieter-Jan Briers
177ca6b627 Sandboxing performance improvements.
Don't leave file handles dangling.
Prefetch verifying assembly images to speed stuff up.
2023-07-15 18:09:57 +02:00
Pieter-Jan Briers
e71f1cc8a5 Warning fixes (#4160)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-01 22:02:12 +10:00
Pieter-Jan Briers
4a27df0166 Add clientAssemblies list to resource manifest.
Allows whitelisting only certain assemblies to be loaded. Intended to be used with the new content bundle stuff that's incoming launcher-side.
2023-06-03 13:48:34 +02:00
metalgearsloth
8a6cadd38f Revert "Revert "Replace ResourcePath with ResPath (#3926)" (#3949)" (#3950) 2023-04-20 20:15:57 +10:00
metalgearsloth
d646403068 Revert "Replace ResourcePath with ResPath (#3926)" (#3949) 2023-04-20 11:43:51 +10:00
Ygg01
d6a3e1e286 Replace ResourcePath with ResPath (#3926) 2023-04-19 23:37:46 +10:00
Pieter-Jan Briers
3fa7d25ecd Fix exception on server shutdown. 2023-02-18 21:53:34 +01:00
Pieter-Jan Briers
ed6b73c413 Fix C# interactive outside content-start. 2023-02-18 15:49:55 +01:00
Pieter-Jan Briers
3d1545c0b9 Fix incorrect unsubscription to AssemblyLoadContext.Default.Resolving.
+= instead of -=.
2022-04-17 18:02:35 +02:00
Pieter-Jan Briers
68f89c8958 SkipIfSandboxedAttribute
Should allow something like OpenDream to provide unsandboxed-only DLLs easily.
2022-04-15 00:31:17 +02:00
Pieter-Jan Briers
adee05b009 Make client start with non-seekable streams.
Not marking #2439 as fixed yet due to lack of thorough testing.
2022-02-21 11:23:37 +01:00
Pieter-Jan Briers
7c90da0402 Correctly load mismatching versions from Robust modules. 2021-12-31 09:35:34 +01:00
Pieter-Jan Briers
ca59cff07f WiP launcher CEF loading. (#2376) 2021-12-28 17:37:54 +01:00
Pieter-Jan Briers
fa0d4da6d1 Implement subscription ordering into EventBus. (#1823)
* Implement subscription ordering into EventBus.

* Topological helpers, rest of code uses shared topological sort, fix bugs.

* Fix tests.

Didn't realize that multi-subscriptions are allowed on input handlers like that??

* Improve and use topological sort helpers more.
2021-06-14 21:34:30 +02:00
Pieter-Jan Briers
e48f4027e5 Probably fix running Robust directly for some people. 2021-03-23 21:28:36 +01:00
Pieter-Jan Briers
e2675271d0 Parallelize assembly sandbox checking harder. 2021-03-03 16:02:12 +01:00
Acruid
2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
Pieter-Jan Briers
ecbb32b70b Clean up various cases of failing to dispose file streams. 2020-12-29 03:58:16 +01:00
Pieter-Jan Briers
7473b6dae1 Optimize assembly type checking.
It's now parallelized which cuts off ~200ms on its own for me.
Config is now shared between multiple loads which saves a lot as well.

All in all, pretty good.
2020-12-14 16:34:33 +01:00
Pieter-Jan Briers
f15c1c7a95 Allow engine to be loaded from a zip file itself. 2020-12-12 11:12:37 +01:00
Pieter-Jan Briers
a4206882f2 Make error on duplicate loading assembly names more clear.
This is extremely inconsequential but I ran into this because I made a mess of my bin folder testing zip mounting SO...
2020-12-04 00:42:28 +01:00
Pieter-Jan Briers
247ca0c911 Fix C# interactive when modloader is using load contexts.
This fixes it on prod.
2020-11-27 16:56:09 +01:00
Pieter-Jan Briers
a41f64f30e sandboxing (#1408) 2020-11-26 23:37:31 +01:00
DrSmugleaf
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
DrSmugleaf
9963d01a27 Allow multiple module testing callbacks (#1367) 2020-11-13 01:06:10 +01:00
Pieter-Jan Briers
7de08ac592 Define CVars in a central location.
Instead of a bunch of RegisterCVar<> calls, it's now similar to Key Functions.
2020-09-25 21:21:18 +02:00
Pieter-Jan Briers
af261d32ef Load PDBs even on FULL_RELEASE. 2020-08-14 23:54:24 +02:00
Pieter-Jan Briers
ec0f4b35f7 Enable nullable reference types on Robust.Shared and fix all warnings. (#1109) 2020-06-08 01:13:01 +02:00
Pieter-Jan Briers
4020f55f5f Unhardcode culture and provide hook for content to set it. 2020-05-02 19:59:48 +02:00
Pieter-Jan Briers
76005b0706 Fix assembly loading issues on release builds. 2020-04-19 11:13:03 +02:00
Pieter-Jan Briers
a21bad1f1b Fix server failing to start.
Damn I'm dumb.
2020-03-25 08:35:45 +01:00
Pieter-Jan Briers
d057fdf74f Disable assembly load context on content-start client. 2020-03-25 02:13:23 +01:00
Pieter-Jan Briers
e7d5604889 Fix assemblies not being loaded into correct load context in certain circumstances. 2020-02-21 12:18:53 +01:00
Pieter-Jan Briers
a07c068a8c Implement lsasm command.
Just something I needed to debug something.
2020-02-15 21:53:56 +01:00
Pieter-Jan Briers
44c7ff552e Optimizations.
Removed use of ConcurrentDictionary. It was slow.
Other minor optimizations around the codebase.
Added option for parallel game state generation. Seems slower than doing it single-threaded so off by default for now.
2020-02-15 17:22:32 +01:00
Pieter-Jan Briers
2a3624c89c Add debugging to ModLoader.cs 2020-01-25 23:16:16 +01:00
Pieter-Jan Briers
62b31d36a4 Uhhh try to figure out why the public server is brokn. 2020-01-25 22:41:10 +01:00
Pieter-Jan Briers
467dd0dc28 Fix threaded lazy loading of content assembly dependencies.
This is necessary because content now loads the preferences database from the thread pool. This causes the assembly loads for that (they're lazy by the runtime) to run in that thread, which means that the resolver callback we set up in ModLoader did not work (it has to do an IoC resolve).

This change creates a new AssemblyLoadContext for every ModLoader and as such we can tie the loading in said context to a specific ModLoader, thus cutting out the need for a static IoC resolve.

This also paves the way to assembly unloadability a bit.
2020-01-25 20:39:07 +01:00
Pieter-Jan Briers
3d11cf2f87 No running AssemblyTypeChecker unless necessary, use less dumb byte copies. 2020-01-25 16:27:30 +01:00
Pieter-Jan Briers
47d4a8f628 Improve ModLoader to fix loading issues for Dapper.dll 2019-12-24 02:52:38 +01:00
Pieter-Jan Briers
d3b8a07350 Try to fix weird integration tests issues. 2019-08-22 10:21:36 +02:00
Pieter-Jan Briers
0a41ef3c9a Unified those messy FrameEventArgs. 2019-08-04 01:08:44 +02:00
Pieter-Jan Briers
85a4375905 Various performance optimizations. 2019-08-01 00:10:20 +02:00
Pieter-Jan Briers
ae42a3e3fa Integration testing improvements.
They no longer load system-wide config or user data.
User data is emulated through a VFS.

Also added more hooks to improve the customizability of the test,
for example allowing content to hijack their IoC registrations.
2019-06-29 01:51:40 +02:00
Pieter-Jan Briers
67f433aeb2 Maybe fix loading on Windows 2019-06-23 11:29:17 +02:00
Pieter-Jan Briers
413680b602 Try to figure out why the launcher doesn't work with better logs. 2019-06-23 11:08:18 +02:00
Pieter-Jan Briers
9115610d2f Integration testing v2 (#826)
* Rewrite Integration testing, add support for the client.

* Rewrite AssemblyLoader to not be static.

* Adds ability to post messages into thread.
2019-06-04 19:05:16 +02:00