Commit Graph
27 Commits
Author SHA1 Message Date
DrSmugleaf 49b89d5bde Source generate NeedsUpdate and NeedsFrameUpdate for entity systems 2026-08-09 02:40:17 -07:00
DrSmugleafandGitHub 435247539e Make ComponentRegistrySerializer.Read 3.7 times faster (#6913) 2026-08-05 18:04:27 +10:00
DrSmugleafandGitHub 4d7e060eff Serialization source gen edge case fixes (#6875) 2026-08-01 15:11:48 +10:00
metalgearslothandGitHub 45f3caaac4 Fastpath EntityManager.IsDefault (#6735)
* Slim it down

Had the spawn mess included.

* fixes

* build fix
2026-07-24 01:07:57 +10:00
metalgearslothandGitHub dfb3976479 Omit .Collect() for sourcegen (#6803) 2026-07-16 19:52:07 +10:00
metalgearslothandGitHub a60d2df5b0 Cache datadef types (#6801) 2026-07-16 17:56:05 +10:00
metalgearslothandGitHub 423ca3ba1b Filter datadef types by attributes (#6798)
datadef
2026-07-16 16:54:18 +10:00
metalgearslothandGitHub 7454c6b316 Fix serialization normalize performance (#6797) 2026-07-16 16:34:56 +10:00
CentroniasandGitHub 62e3bdbd2c Replace overly restrictive (and sometimes wrong?) cast in serialization generator (#6796) 2026-07-16 15:17:13 +10:00
metalgearslothandGitHub dcadd34389 Serv5 fixes (#6761) 2026-07-09 00:08:10 +10:00
34ce2ba534 serv5 (#6496)
* Add source generator for DataDefinition validation

* Add source generator for reading

* Add source generator for writing

* Include prototypes and other meansdatadefinition types

* Target ISerializationGenerated in data definitions

* Murder

* Use array, struct, enum methods

* Source generate get field definitions

* serv5

* Fix and pray

* Fix release compile

* Tayrtahn review

* a

* Generator bugfix

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2026-07-08 22:18:35 +10:00
pathetic meowmeowandGitHub 1046bc9a73 More comprehensively tag auto-generated code (#6541) 2026-04-27 08:43:18 -04:00
7d9a039252 add: Dictionary<T, TimeSpan> OnUnpaused generator (#6119)
* add: Dictionary<T, TimeSpan> OnUnpaused generator

* fix

* add: test

* Fix compiler warning from duplicate using

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-08-02 16:57:43 +02:00
PJB3005 be0189748b Fix serialization source gen with partial types
This fixes RMC compilation
2025-03-22 06:09:48 +01:00
PJB3005 c463fc5e78 Make source generators emit EditorBrowsable(Never)
This hides the generated types from intellisense if you have the relevant option in Rider enabled.

Good because honestly these just bloat IntelliSense, and if you want to show them there's an IDE setting for it.
2025-01-18 01:23:35 +01:00
PJB3005 f0306b593a Optimize Robust.Serialization.Generator
Slightly less bad use of incremental generators.

Remove format of generated code, it was taking most of the CPU time.

This seems to significantly cut compile time cost of this generator. Nice. I'm seeing 20 -> 5 seconds on my system.
2025-01-15 02:41:57 +01:00
9837c33de7 Add sourcegenned field deltas (#5155)
* Remove full "delta" states

* Update MapGridComponentState

* abstract ComponentState

* Release notes

* Fix tests

* Fix nullable errors

* A

* Sourcegen component deltas

* Audio deltas + methids

* Also eye

* Optimise out the dictionary

* Minor fixes

* Physics deltas

* Also this

* Fix field deltas

* remove old release notes

* Make IComponentDelta implement IComponent

* add sourcegen launch settings

* make silent error loud

* Review

* UI deltas

* Slimmer

* Sourcegen bandaid

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2024-12-21 15:48:33 +11:00
DrSmugleafandGitHub f0b45d95cb Fix serialization source generator error when multiple partials of the same definition are user-defined (#5160) 2024-05-23 22:48:40 +02:00
Pieter-Jan BriersandGitHub ae6cebbfbb Source gen reorganizations + component unpause generator. (#4896)
* Source gen reorganizations + component unpause generator.

This commit (and subsequent commits) aims to clean up our Roslyn plugin (source gens + analyzers) stack to more sanely re-use common code

I also built a new source-gen that automatically generates unpausing implementations for components, incrementing attributed TimeSpan field when unpaused.

* Fix warnings in all Roslyn projects
2024-02-20 10:15:32 +01:00
Pieter-Jan BriersandGitHub 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
DrSmugleafandGitHub 4666a87aa5 Add obsoletion warnings to serialization source generated methods, xmldocs (#4364) 2023-09-11 20:15:07 +10:00
DrSmugleafandGitHub 0f06423b7a Remove RobustAutoGenerated from partials generated by serialization (#4338) 2023-09-06 10:23:28 +10:00
Pieter-Jan Briers 409fe1a125 Some warning fixes 2023-08-27 15:35:15 +02:00
DrSmugleafandGitHub aeeaaaefc5 Fix not running hooks when copying non-byref data definition fields without a custom serializer (#4324) 2023-08-26 15:20:46 -07:00
DrSmugleafandGitHub d66f7c7c06 Disable obsoletion and inherited member hidden warnings in serialization source generated code (#4302) 2023-08-24 13:04:32 +10:00
DrSmugleafandGitHub b2d121e780 Fix serialization sharing instances when copying data definitions and not assigning null when the source is null (#4295) 2023-08-22 23:59:03 -07:00
DrSmugleafandGitHub 66239d23ea Refactor serialization copying to use source generators (#4286) 2023-08-22 17:37:13 -07:00