7,945 Commits over 3,745 Days - 0.09cph!
Better generic method resolution, fixes #996
Possible fix for sboxgame/issues#3227
Warn about missing input actions once
Fixed documentation of Compiler.Name
Failing test reproducing #996
Warn about missing input actions once
Fixed documentation of Compiler.Name
Failing test reproducing #996
Voxel shader texture scale tweak
Blob tool keeps editing at distance of first ray on click
Consistent indentation
Fixed VoxelChunk bounds
Addon packages should reference package.base too
When loading multiple packages, sort by references
Make sure that a referenced package is loaded before the packages that reference it.
Possible fix for #996
Added test for Package.SortByReferences()
Initial commit
Added default material
Allow resolving newer versions of assemblies in AccessControl
Fixed publishing addons referencing libraries
* Added helper DistinctReferences / DistinctPackageReferences properties to include all system / package references respectively.
* For addon packages, DistinctPackageReferences will include the parent package.
Package reference fixes (#965)
* Use PackageReference for referencing packages, References for referencing assemblies
* Fixed test passing for the wrong reason
* Rename Compiler.PackageReference to PackageReferences
* Don't fast hotload if a referenced assembly has changed
* More assembly / package reference strictness
* Made generic method resolving / comparing stricter
* We need to re-resolve all member references in fast-hotloaded methods
* More precise logic when deciding if a referencing assembly can be fast-hotloaded
* Constructor resolution regression fix
* Some cleanup in ILGeneratorExtensions
* Hotload.GetMethods helper now matches name
* Access control now caches assembly definitions by name + version
* Assert that the correct assembly definition version is resolved
* Keep exactly the outgoing assembly definition cached, but dispose older versions
* Clean up AccessControl.Resolve a bit
* WIP referencing fast-hotloaded assembly fix
* Fixed unloading IsolatedAssemblyContexts during fast hotload
* Remove some logging
* Fix menu breaking after hotload
* WIP force-reload assemblies that depend on a changed package
* Allow resolving newer assembly versions
* PackageLoader.LoadAssemblyFromPackage cleanup
* Only force an assembly reload if dependent package did a full hotload
* Fix exception in ContextTools.DetermineContext in fast hotloaded methods
* Init TypeLibrary in TestUI.Panels.PanelTests
* Description codegen: just allow multiple [Description] instead of being non-deterministic
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Don't fast hotload if a referenced assembly has changed
More assembly / package reference strictness
Made generic method resolving / comparing stricter
We need to re-resolve all member references in fast-hotloaded methods
This fixes references to types from fast-hotloaded referenced assemblies
More precise logic when deciding if a referencing assembly can be fast-hotloaded
Constructor resolution regression fix
Some cleanup in ILGeneratorExtensions
Hotload.GetMethods helper now matches name
Access control now caches assembly definitions by name + version
Fixes issues where hotload requires a specific old version
Assert that the correct assembly definition version is resolved
Keep exactly the outgoing assembly definition cached, but dispose older versions
Clean up AccessControl.Resolve a bit
WIP referencing fast-hotloaded assembly fix
Fixed unloading IsolatedAssemblyContexts during fast hotload
In a fast hotload, DON'T unload outgoing, but DO unload incoming after the fast hotload
Remove some logging
Fix menu breaking after hotload
WIP force-reload assemblies that depend on a changed package
Allow resolving newer assembly versions
PackageLoader.LoadAssemblyFromPackage cleanup
Only force an assembly reload if dependent package did a full hotload
Fix exception in ContextTools.DetermineContext in fast hotloaded methods
Init TypeLibrary in TestUI.Panels.PanelTests
Description codegen: just allow multiple [Description] instead of being non-deterministic
Partial class declarations were being handled by the first worker to process them, which generated code non-deterministically. This meant fast-hotload would often detect changes it couldn't handle when doing syntax tree comparisons.
Description codegen: just allow multiple [Description] instead of being non-deterministic
Partial class declarations were being handled by the first worker to process them, which generated code non-deterministically. This meant fast-hotload would often detect changes it couldn't handle when doing syntax tree comparisons.
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Don't fast hotload if a referenced assembly has changed
More assembly / package reference strictness
Made generic method resolving / comparing stricter
We need to re-resolve all member references in fast-hotloaded methods
This fixes references to types from fast-hotloaded referenced assemblies
More precise logic when deciding if a referencing assembly can be fast-hotloaded
Constructor resolution regression fix
Some cleanup in ILGeneratorExtensions
Hotload.GetMethods helper now matches name
Access control now caches assembly definitions by name + version
Fixes issues where hotload requires a specific old version
Assert that the correct assembly definition version is resolved
Keep exactly the outgoing assembly definition cached, but dispose older versions
Clean up AccessControl.Resolve a bit
WIP referencing fast-hotloaded assembly fix
Fixed unloading IsolatedAssemblyContexts during fast hotload
In a fast hotload, DON'T unload outgoing, but DO unload incoming after the fast hotload
Remove some logging
Fix menu breaking after hotload
WIP force-reload assemblies that depend on a changed package
Allow resolving newer assembly versions
PackageLoader.LoadAssemblyFromPackage cleanup
Only force an assembly reload if dependent package did a full hotload
Fix exception in ContextTools.DetermineContext in fast hotloaded methods
Init TypeLibrary in TestUI.Panels.PanelTests
Only force an assembly reload if dependent package did a full hotload
Fix exception in ContextTools.DetermineContext in fast hotloaded methods
Fix menu breaking after hotload
WIP force-reload assemblies that depend on a changed package
Allow resolving newer assembly versions
PackageLoader.LoadAssemblyFromPackage cleanup
Fixed unloading IsolatedAssemblyContexts during fast hotload
In a fast hotload, DON'T unload outgoing, but DO unload incoming after the fast hotload
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Don't fast hotload if a referenced assembly has changed
More assembly / package reference strictness
Made generic method resolving / comparing stricter
We need to re-resolve all member references in fast-hotloaded methods
This fixes references to types from fast-hotloaded referenced assemblies
More precise logic when deciding if a referencing assembly can be fast-hotloaded
Constructor resolution regression fix
Some cleanup in ILGeneratorExtensions
Hotload.GetMethods helper now matches name
Access control now caches assembly definitions by name + version
Fixes issues where hotload requires a specific old version
Assert that the correct assembly definition version is resolved
Keep exactly the outgoing assembly definition cached, but dispose older versions
Clean up AccessControl.Resolve a bit
WIP referencing fast-hotloaded assembly fix
Add Filter property to SkipHotloadAttribute
Allow skipping to be conditional on realm (tools / menu / server / client / test)
Don't skip IMenuAddon.Current during menu hotloads
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Don't fast hotload if a referenced assembly has changed
More assembly / package reference strictness
Made generic method resolving / comparing stricter
We need to re-resolve all member references in fast-hotloaded methods
This fixes references to types from fast-hotloaded referenced assemblies
More precise logic when deciding if a referencing assembly can be fast-hotloaded
Constructor resolution regression fix
Some cleanup in ILGeneratorExtensions
Hotload.GetMethods helper now matches name
Access control now caches assembly definitions by name + version
Fixes issues where hotload requires a specific old version
Assert that the correct assembly definition version is resolved
Keep exactly the outgoing assembly definition cached, but dispose older versions
Clean up AccessControl.Resolve a bit
More assembly / package reference strictness
Made generic method resolving / comparing stricter
We need to re-resolve all member references in fast-hotloaded methods
This fixes references to types from fast-hotloaded referenced assemblies
More precise logic when deciding if a referencing assembly can be fast-hotloaded
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Don't fast hotload if a referenced assembly has changed
Don't fast hotload if a referenced assembly has changed
Fixed test passing for the wrong reason
Rename Compiler.PackageReference to PackageReferences
Use PackageReference for referencing packages, References for referencing assemblies
The fuzzy search in FindCompilerByName was getting messy, so that's replaced with FindCompilerByAssemblyName / FindCompilerByPackageName.
Also this fixes changed library packages not marking dependent compilers for recompile (#956)
Test for Assembly.GetExecutingAssembly()
Failing test reproducing #957
Fix variable types
Although this seems to be non-deterministic, with some cache breaking later replacements
Stricter GenericReference2 test
Fixed #957 by clearing MonoMod's reflection cache
Fix variable types
Although this seems to be non-deterministic, with some cache breaking later replacements
Stricter GenericReference2 test
Fixed #957 by clearing MonoMod's reflection cache
Test for Assembly.GetExecutingAssembly()
Failing test reproducing #957
Don't sort generated code blocks inside class groups!
Whoops
Failing test involving generics causing EntryPointNotFoundException
Fixed resolving generic methods
Fixed possible stack overflow when fixing references
Expanded GenericReference test to help investigate
Replacing method now thinks it's inside the original assembly
Fixed references to the wrong assembly in fast hotload
Don't need to relink variable types
Expanded GenericReference test to help investigate
Replacing method now thinks it's inside the original assembly
Failing test involving generics causing EntryPointNotFoundException
Fixed resolving generic methods
Fixed possible stack overflow when fixing references
Added failing test for changing the body of a lambda
Fixed not being able to resolve private nested types
Fixed #947
Failing test for async methods
#947
Fixed #947 for state machine types
Some safety if ILHotload AST processing throws during Parallel.ForEach
Only run ILHotload AST processing when hotload_fast >= 1
Fixed #947 for state machine types
Failing test for async methods
#947
Added failing test for changing the body of a lambda
Fixed not being able to resolve private nested types
Fall back to normal hotload if exception is thrown during FixReferences
Fast method body hotload (#931)
* 0ms hotload fast path poc when only method bodies change using MonoMod
* Print individual changes during compile, show node paths
* WIP check if all changes are in method bodies
* Add attributes to package assemblies describing changed methods
* SupportsILHotloadAttribute is added if only method bodies change
* MethodBodyChangeAttribute is added for each changed method
* ILHotload looks for SupportsILHotload and MethodBodyChange attributes
* Fixed methods with identical IL not being replaced by ILHotload
* ILHotload should never run with a debugger attached
* Clean up dead code
* Detour using a generated dynamic method copy from the replacing method
* Documentation for Compiler.SyntaxTree.cs
* Added CompilerSettings.SourcePathFilter predicate
* Boilerplate for writing ILHotload tests
* Fixed how file changes are emulated in FastPathTest
* A bit more flexibility in fast path test case code preprocessing
* Added failing fast path hotload test for changing method signatures
* ILHotload: changes must be specifically within a BlockSyntax of a method
* Added Compiler.UpdateParseOptions() for tests to use
* Don't use ILHotload if a preprocessor define changed
* Incremental syntax tree parsing
* Throw when trying to debug an ILHotload swap during a test
* Basic incremental compilation
* Make generated code more deterministic, nicer for incremental compile
* Keep track of which assembly types are actually loaded from
* Re-use compiler options where possible
* Changed fast hotload log to a trace
* Make OnlyMethodBodiesChanged multithreaded, fixed multiple changes in one file
* Failing test for property body changes
* Cleanup ILHotload tests, failing test for overloaded method
* Refactor AST processing for ILHotload
* Fixes after refactor, a bit ugly at the moment
* Support fast hotload for property accessors
* NoticeWidget shows ms if duration < 1s
* Call UISystem.OnHotload after an ILHotload
* ILHotload test for nested blocks
* Fixed ILHotload change detection for nested blocks
* Added hotload_fast engine convar to enable / disable IL hotload
* Added failing test of typeof(T) in method body hotloads
* Failing test for static references
* Fix references to members / types in fast-hotloaded method bodies
* Allow debugging ILHotload in Sandbox.Test
* Test for fast-hotloaded methods with parameter / return types defined in the changed module
* Added failing fast hotload test for compiler-generated type changes
* Don't attempt fast hotload if any compiler-generated type definitions change
* Record event when we ILHotload, matches naming of existing hotloads so we can derive % easily
* Remove defunct code about using cecil as the DMDType, not needed since we fix the references ourselves
---------
Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
Don't attempt fast hotload if any compiler-generated type definitions change
Will happen if you change / add / remove things like lambda methods
Added failing fast hotload test for compiler-generated type changes
0ms hotload fast path poc when only method bodies change using MonoMod
Biggest flaw of this is detecting the changes, Ziks has some good ideas with comparing the AST
https://files.facepunch.com/matt/1b2611b1/sbox-dev_My23jH4uYG.mp4
Print individual changes during compile, show node paths
WIP check if all changes are in method bodies
Add attributes to package assemblies describing changed methods
* SupportsILHotloadAttribute is added if only method bodies change
* MethodBodyChangeAttribute is added for each changed method
Yet to properly support nested declaring types and methods with overloads.
ILHotload looks for SupportsILHotload and MethodBodyChange attributes
Fixed methods with identical IL not being replaced by ILHotload
ILHotload should never run with a debugger attached
Clean up dead code
Detour using a generated dynamic method copy from the replacing method
Documentation for Compiler.SyntaxTree.cs
Added CompilerSettings.SourcePathFilter predicate
Boilerplate for writing ILHotload tests
Fixed how file changes are emulated in FastPathTest
A bit more flexibility in fast path test case code preprocessing
Added failing fast path hotload test for changing method signatures
ILHotload: changes must be specifically within a BlockSyntax of a method
Added Compiler.UpdateParseOptions() for tests to use
Don't use ILHotload if a preprocessor define changed
Incremental syntax tree parsing
Throw when trying to debug an ILHotload swap during a test
Basic incremental compilation
Make generated code more deterministic, nicer for incremental compile
Keep track of which assembly types are actually loaded from
Re-use compiler options where possible
Changed fast hotload log to a trace
Make OnlyMethodBodiesChanged multithreaded, fixed multiple changes in one file
Failing test for property body changes
Cleanup ILHotload tests, failing test for overloaded method
Refactor AST processing for ILHotload
Moved to Sandbox.Generator, and now tags changed methods with an attribute rather than referencing them from assembly-level attributes
Fixes after refactor, a bit ugly at the moment
Support fast hotload for property accessors
NoticeWidget shows ms if duration < 1s
Call UISystem.OnHotload after an ILHotload
ILHotload test for nested blocks
Fixed ILHotload change detection for nested blocks
Added hotload_fast engine convar to enable / disable IL hotload
Added failing test of typeof(T) in method body hotloads
Failing test for static references
Fix references to members / types in fast-hotloaded method bodies
Allow debugging ILHotload in Sandbox.Test
Test for fast-hotloaded methods with parameter / return types defined in the changed module
Test for fast-hotloaded methods with parameter / return types defined in the changed module
Fix references to members / types in fast-hotloaded method bodies
Allow debugging ILHotload in Sandbox.Test
Added failing test of typeof(T) in method body hotloads
0ms hotload fast path poc when only method bodies change using MonoMod
Biggest flaw of this is detecting the changes, Ziks has some good ideas with comparing the AST
https://files.facepunch.com/matt/1b2611b1/sbox-dev_My23jH4uYG.mp4
Print individual changes during compile, show node paths
WIP check if all changes are in method bodies
Add attributes to package assemblies describing changed methods
* SupportsILHotloadAttribute is added if only method bodies change
* MethodBodyChangeAttribute is added for each changed method
Yet to properly support nested declaring types and methods with overloads.
ILHotload looks for SupportsILHotload and MethodBodyChange attributes
Fixed methods with identical IL not being replaced by ILHotload
ILHotload should never run with a debugger attached
Clean up dead code
Detour using a generated dynamic method copy from the replacing method
Documentation for Compiler.SyntaxTree.cs
Added CompilerSettings.SourcePathFilter predicate
Boilerplate for writing ILHotload tests
Fixed how file changes are emulated in FastPathTest
A bit more flexibility in fast path test case code preprocessing
Added failing fast path hotload test for changing method signatures
ILHotload: changes must be specifically within a BlockSyntax of a method
Added Compiler.UpdateParseOptions() for tests to use
Don't use ILHotload if a preprocessor define changed
Incremental syntax tree parsing
Throw when trying to debug an ILHotload swap during a test
Basic incremental compilation
Make generated code more deterministic, nicer for incremental compile
Keep track of which assembly types are actually loaded from
Re-use compiler options where possible
Changed fast hotload log to a trace
Make OnlyMethodBodiesChanged multithreaded, fixed multiple changes in one file
Failing test for property body changes
Cleanup ILHotload tests, failing test for overloaded method
Refactor AST processing for ILHotload
Moved to Sandbox.Generator, and now tags changed methods with an attribute rather than referencing them from assembly-level attributes
Fixes after refactor, a bit ugly at the moment
Support fast hotload for property accessors
NoticeWidget shows ms if duration < 1s
Call UISystem.OnHotload after an ILHotload
ILHotload test for nested blocks
Fixed ILHotload change detection for nested blocks
Added hotload_fast engine convar to enable / disable IL hotload
Handle encountering MethodBase operands in GetStackDelta