468 Commits over 1,338 Days - 0.01cph!
Added failing test for hotloading constructed generic MethodInfos
Fixed hotloading generic MethodInfos
Added extra test for MethodInfos with generic declaring types
Added more delegate hotloading tests, one failing
Fixed hotload case with lambdas in generic declaring type
Fixes #759
Stop watching assemblies swapped with null
More compiler name consistency fixes
Skip assemblies that depend on a swapped assembly
Warn when two versions of the same named assembly are watched
Log all hotload messages if hotload_log >= 2
Include build number in runtime compiled assemblies
To help with debugging
Made Hotload.WatchedAssemblies / Hotload.WatchedInstances private
Clear invalidated cached fields in DefaultUpgrader on hotload start
Hotload logging tweaks, package assembly names include version
Simplify auto-watching logic when replacing assemblies
Fixed failing hotload test, better swapped asm reference check
Unwatch assemblies swapped with null
Added hotload tests for auto-watching assemblies
Check substitute types don't inherit from a swapped-out type
If type substitution fails in DefaultUpgrader, just substitute null
Fixed possible NRE in ReflectionUpgrader.GetMatchingMember
Fixed recompiling addons that reference a changed addon
Use namespace alias operator in hotload tests
Failing test involving resolving method with namespaceless parameter
Fixed resolving methods with namespaceless parameter types
Fixed VarClass sometimes getting stuck rebuilding every frame
NeedsRebuild was getting set to true during the rebuild, so it'd keep doing it every tick
Failing async method test
Better support for parsing generated names with generic parameter count
Hotload generated name refactor, fixing async state machine types
Failing test for lambdas declared in non-swapped generic methods
But with swapped type parameters
Fixed test in 8a2bb255285d1e47c1314b70cd47f5ef92a2b21d
Log error when encountering unhandled generated types
Implemented a simple assembly resolver for Tools
Allows hotload to make more valid substitutions
Cleanup
Failing hotload tests for lambdas in static constructors
Fixed finding scope method ordinals of static constructors
Stop expecting every method to have a scope ordinal
Fixed IsMatchingType(typeRef, type) with nested types
Fixed ResolveMethod() with a static constructor ref
Fix upgrading lambda display class instances that are found in the wild
GetNewType consistency
Now returns null to mean a substitution couldn't be found
Added failing generic delegate test
Organised and documented delegate hotloading tests
Fixed AreEqualTypes when exactly one param is null
AreEquivalentTypes(old, new) refactor
Fixed finding substitutions for generic parameters
Always use addon map list for map leaderboards in menu
Add scrolling to leaderboard list in menu
Limit main menu leaderboard list to 5 items for now
Show all leaderboards in menu again
Basic support for {map} leaderboard name substitution
Only supported for MapSelect.Official
Added hotload_log engine convar
Whitelist TextWriter and StringWriter
StringWriter only writes to memory. I'm leaving StreamWriter forbidden for now.
Allow sending compiled shaders to clients
Added test for adding properties with default values
Support for log value histograms
https://files.facepunch.com/ziks/2022-10-10/sbox-dev_YnroiYzjt5.png
Add Hotload.AssemblyResolver, warn if not assigned when needed
Set HotloadManager.AssemblyResolver for client / menu / server
Fixed some histograms being offset horizontally
Only show histogram markers that are in range
Fall back to fetching top scores if no scores around user
Added Leaderboard.GetHistogram()
Basic leaderboard histogram drawing
Show markers on friend scores in histogram
Check type inits before loading an assembly Facepunch/sbox-issues#2313
In-game leaderboard UI tweaks with title / player count
https://files.facepunch.com/ziks/1b1011b1/sbox_zdvdjjzfiN.png
New Leaderboards API wraps Steam Leaderboards
Fixed ambiguous property match in HasSkipHotloadAttribute
Fixed PropertySheet AmbiguousMatchException
Would happen if a subclass redeclared a property with "new"
Added TrustedBinaryStream
* Required by AssemblyRegistation
* Only created by AccessControl
Rename `AssemblyRegistation` to `AssemblyRegistration`
Move TrustedBinaryStream to Sandbox.Access, so it's hidden from users
▅▍▌▌ ▉▉▄▍▍▉▇▆▋▍▇ #▊█▋
! ▄▊▋▉▌ ▊█▆▌▌▇ ▉▌▋▆▉▇█ ▇▊▇ ▊▄▌▆▊▄ ▋▆ ▆▉▅▄▌▇▋▋, ▊▅▆▇▇ #▊▅▊
Allow loose .txt and .csv files in published addons
Added TypeDescription.GetAttributes<T>()
Fixed -tools not starting if `ServerAddons.TryAdd()` returns null
Added Color[32].FromRgb[a]
Color[32] property consistency cleanup
Added some Color[32] tests
Move hotload unsupported warnings to Sandbox.Generator
Added warning for static fields in generic types
Fixed some addon DLLs not getting watched
Introduced by bb5359a20
Added failing hotload static primitive field test
Repros Facepunch/sbox-issues#1918
Fixed hotloading static fields of auto-skipped types
Fixes Facepunch/sbox-issues#1918
Fixed hotloading concurrent containers
EntityManager.OnHotloaded safety
Handle entities being added / removed during the event.
Fixed possible exception in ToTitleCase()
ToTitleCase(string) tests
Use memoization for short strings in ToTitleCase
More ToTitleCase tests
More persistent caching between hotloads
HotloadManager name consistency
Added failing hotload test for static initonly HashSets
Added ConcurrentQueueUpgrader
Fixed in-place hotload of a HashSet<T>
Allow individual types to be added to hotload SkipUpgrader
Skip hotload for types in System.Net.Http and System.Text.RegularExpressions
Fixed some false negatives when checking if a type is blittable
Added ConcurrentDictionaryUpgrader, fixed ConcurrentQueueUpgrader
Only start addon worker threads when first needed
Make sure hotload verbose log works with and without -tools
Cache which static fields need to be watched in hotload
Some extra timing info for hotload
Added InstanceUpgrader.GetUpgraderOrDefault<T>()
DefaultUpgrader field caching, now uses auto-skip
Fixed verbose hotload log formatting
Fix error in JsonSerializerOptionsUpgrader on hotload
Added HasSkipHotloadAttribute() helper method
ArrayUpgrader now checks AutoSkipUpgrader
Added SkipHotload to Arguments array in LogEvent
Fixed AutoSkipUpgrader check in ArrayUpgrader
Fixed DelegateUpgrader missing some replacements
AutoSkipUpgrader is now optional for ArrayUpgrader
Added failing test involving JsonSerializerOptions
Moved special handling hotload upgraders
Special json hotload handling, fixes #213
Fixed bug hotloading lambdas in generic methods
AsyncTasks tests stability
More helpful worker task yielding error
Merge branch 'master' of sbox
Expirable SyncContext refactor
* Rename MainThreadContext to ExpirableSynchronizationContext
* ExpirableSynchronizationContext supports having multiple live instances on different threads
* Added SyncContext static class to handle resetting on session end
* MainThreadContext.Instance is now SyncContext.MainThread etc
More control over addon tasks running on worker threads
* Added an ExpirableSynchronizationContext for worker tasks
* WorkerThread.Start() spawns a bunch of long running tasks to process addon tasks off the main thread
* WorkerThread.Stop() causes those worker tasks to exit, can be restarted later
* Stop worker threads during hotload
* Fixed case where addon tasks that refuse to cancel could keep running forever on a worker thread
Fixed errors after rebase
Exposed hotload skip attrib and callback interfaces
Deleted empty INotice.cs
Added cl_hotload_log and sv_hotload_log console vars
Fixed possible NRE when setting up console vars
SkipHotloadAttribute now supports properties
Fixed hotload test assemblies having wrong package ID
Replaced hotload callback interfaces with IHotloadManaged
Destroyed() returns a state dictionary that is passed to Created() in the new instance
Don't let Hotload see some sensitive fields
IHotloadManaged.Destroyed() now passes in a dictionary ready for use
Don't let Hotload see some sensitive fields
Allow menu tasks to persist between sessions