Commit Graph

1370 Commits

Author SHA1 Message Date
carl bystrom
615e66f5c0 EpicGames.Perforce: Replace thread pool queue with new async-based one (with concurrency limits)
This should address I/O issues seen during job batch init, where ManagedWorkspaces are set up and synced. Prior to this CL, ThreadPoolWorkQueue could monopolize the shared thread pool which would starve other I/O operations, such as network traffic. Now these operations have a max concurrency of 4.

[CL 26282087 by carl bystrom in ue5-main branch]
2023-06-28 08:12:37 -04:00
Josh Adams
cb55033c0a - Disallow SDK.json reading if the platform isn't enabled on the platform
- If no DDPI.ini exists, mark the SDK as not usable on the platform (default the UEBuildPlaformSDK to disabled until the DDPI.ini file is read)
#rb joe.kirchoff
#jira UE-189549

[CL 26271235 by Josh Adams in ue5-main branch]
2023-06-27 17:19:49 -04:00
Ben Marsh
2fb6142ee2 Horde: Disable max concurrency test. This is not thread safe (on the uniqueTaskIds set), nor deterministic (there is no guarantee that the same task ids will be used for each spawned task).
[CL 26271132 by Ben Marsh in ue5-main branch]
2023-06-27 17:15:22 -04:00
Ben Marsh
a0e00b2992 Horde: Fix IDE2001 warnings about multiple statements on one line.
#fyi Carl.Bystrom

[CL 26271060 by Ben Marsh in ue5-main branch]
2023-06-27 17:10:34 -04:00
carl bystrom
4c79f390eb EpicGames.Core: Add AsyncThreadPoolWorkQueue
[CL 26255939 by carl bystrom in ue5-main branch]
2023-06-27 09:32:14 -04:00
robert manuszewski
b5e73242e3 Experimental support for Incremental Reachability Analysis (second attempt)
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyNoUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26252569 by robert manuszewski in ue5-main branch]
2023-06-27 01:44:30 -04:00
Ben Marsh
6ee7312e16 Horde: Prevent exceptions being trapped and replaced with generic exceptions when reading from storage.
[CL 26238837 by Ben Marsh in ue5-main branch]
2023-06-26 13:57:14 -04:00
robert manuszewski
d5c2c7bc97 Undo changelist 26229717
#rb none

[CL 26237963 by robert manuszewski in ue5-main branch]
2023-06-26 13:26:02 -04:00
Thomas Sarkanen
ed25d80d16 Enable object pins in RigVM
#rb Helge.Mathee,Sara.Schvartzman,Nicholas.Frechette

[CL 26230325 by Thomas Sarkanen in ue5-main branch]
2023-06-26 05:58:36 -04:00
robert manuszewski
5800b6b608 Experimental support for Incremental Reachability Analysis
Disabled by default. gc.AllowIncrementalReachability controls if it's enabled or not.
gc.IncrementalReachabilityTimeLimit controls time limit (defaults to 0.005 = 5ms)
gc.VerifyUnrachableObjects (defaults to 0) controls additional GC assumption verification that no unreachable objects are reachable after RA is complete
gc.ContinuousIncrementalGC (defaults to 0) is a new GC stress test that runs incremental GC continuously
TObjectPtr barrier (Obj->MarkAsReachable()) is also currently disabled (compiled out with a macro) until we have all the places (ARO/BPVM) properly running barriers
EngineTest tests can and will run Incremental Reachability Analysis tests even if all the above is disabled

#rb Johan.Torp, Zousar.Shaker

[CL 26229728 by robert manuszewski in ue5-main branch]
2023-06-26 04:38:56 -04:00
Ben Marsh
31a83fc628 Horde: Move bundle implementation into a separate namespace.
[CL 26226699 by Ben Marsh in ue5-main branch]
2023-06-24 16:37:55 -04:00
Ben Marsh
b7f9afb66a Horde: Add a custom handle type for nodes stored in bundles, abstracting implementation details away from most clients.
[CL 26226673 by Ben Marsh in ue5-main branch]
2023-06-24 16:22:48 -04:00
Ben Marsh
db2e9baf50 Horde: Rename BlobLocator -> BundleLocator. The regular API does not allow directly fetching individual blobs by name any more.
[CL 26225915 by Ben Marsh in ue5-main branch]
2023-06-24 10:39:30 -04:00
Ben Marsh
ee56115397 Horde: Remove methods for reading and writing bundles from IStorageClient. This is now an implementation detail specific to types derived from BundleStorageClient.
[CL 26225812 by Ben Marsh in ue5-main branch]
2023-06-24 09:09:10 -04:00
Ben Marsh
eb3ecd4b8f Horde: Add a 'ping' message that can be used to keep the remote execution channel alive.
[CL 26221503 by Ben Marsh in ue5-main branch]
2023-06-23 19:06:19 -04:00
Ben Marsh
db16be3ab8 Horde: Change direct blob read methods to return bundle objects.
[CL 26183804 by Ben Marsh in ue5-main branch]
2023-06-22 11:28:36 -04:00
Ben Marsh
dcb955aaef Horde: Rename NodeLocator -> BundleNodeLocator.
[CL 26177183 by Ben Marsh in ue5-main branch]
2023-06-22 05:02:43 -04:00
Ben Marsh
2c12658c40 Horde: Remove HostId and BlobId classes from BlobLocators, and replace them with an opaque path. The backend can decide how to interpret this path as it sees fit.
[CL 26177089 by Ben Marsh in ue5-main branch]
2023-06-22 04:56:06 -04:00
jamie dale
71b5692d6a Updated UHT to use the real C++ type for USTRUCT properties using a template wrapper struct
#jira
#rb Tim.Smith
#rnx

[CL 26159405 by jamie dale in ue5-main branch]
2023-06-21 15:42:17 -04:00
josh adams
305c260069 - Moved SDK versions (MainVersion and Min/Max SDK version) from C# strings to SDK.json files in the Platform's Config folder
- Allow for per-project override in a project's platform's config folder (this is merging with my other work on per-project SDKs and validation of multi-target builds)
- More versions will move over after this
#rb david.harvey

[CL 26150552 by josh adams in ue5-main branch]
2023-06-21 11:21:01 -04:00
Ben Marsh
4110c83dab EpicGames.Perforce: Fix handling of opened command when a stream spec is opened for edit.
[CL 26136306 by Ben Marsh in ue5-main branch]
2023-06-20 17:59:28 -04:00
helge mathee
afa48d10e0 UHT: RigVM Make sure to rely on slice index for lazy values
#rb jaime.cifuentes

[CL 26118200 by helge mathee in ue5-main branch]
2023-06-20 07:34:44 -04:00
leon huang
e8c7cae7b2 [Backout] - CL26105383
[FYI] Leon.Huang
Original CL Desc
-----------------------------------------------------------------
Unreal Build Tool:
Update PluginDescriptor to have parity with FPluginDescriptor in terms of handling custom JSON fields. The order in which the original fields are written to disk is preserved.
When saving the PluginDescriptor to disk, the same order is followed and any new entries are added to the end of the plugin file.
Note: PluginDescriptor.Save and PluginDescriptor.Save2 will exist concurrently for now. There are still parts of UBT that use PluginDescriptor.Write and the refactor to create a unified Save function will come later as a lot of testing still needs to be done.
JsonObject:
- Introduced AddOrSetFieldValue() methods overloaded on value types to add/set fields in JsonObject.
- Changed the underlying data structure of JsonObject from Dictionary<string,Object?> to OrderedDictionary to guarantee that order of all .uplugin fields (default and custom) are preserved
- Made the JsonObject constructor that takes an OrderedDictionary private to ensure type safety of values passed to JsonObject
- Introduced ToJsonString() for JsonObject that serializes the JsonObject to match the formatting of .uplugin
IMPORTANT: The ToJsonString() method uses the JavaScriptEncoder.UnsafeRelaxedJsonEscaping encoder for Utf8JsonWriter.
This allows +,<,>,&,` etc characters to be written properly for .uplugins. As per MS docs, with this encoding, none of the contents should be written to HTML or a script.
- Introduced JsonObjectTests that unit tested JsonObject to ensure previous behavior was maintained.

PluginDescriptor
- Added a JsonObject field that acts as the cache of all fields that were read from a file or parsed from a json string.
- Cached JsonObject records the order of all fields that were read and captures custom fields in the .uplugin
- Introduced Save2(), the new save algorithm that writes all fields (default and custom) to disk.
- Deleted the private default constructor because it didn't seem to be used anywhere.
- Introduced PluginDescriptorTests to ensure previous behavior is maintained. In particular when dealing with a .uplugin with only default fields, results of Save() and Save2() are the same.

Descriptor Files:
- Introduced ToJsonObject() methods to replace the previous JsonWriter patterns of writing the descriptor data.
- Introduced the UpdateJsonObject pattern which mimics the old WriteArray pattern of writing data to a JsonWriter.

#rb: Mark.Winter, Joe.Kirchoff
#jira: none
#test: Developed this in a TDD style with unit tests for all the major functions. Also reviewed output of created .uplugins and diffed them.

[CL 26111662 by leon huang in ue5-main branch]
2023-06-19 21:11:08 -04:00
leon huang
82b1ba105d Unreal Build Tool:
Update PluginDescriptor to have parity with FPluginDescriptor in terms of handling custom JSON fields. The order in which the original fields are written to disk is preserved.
When saving the PluginDescriptor to disk, the same order is followed and any new entries are added to the end of the plugin file.
Note: PluginDescriptor.Save and PluginDescriptor.Save2 will exist concurrently for now. There are still parts of UBT that use PluginDescriptor.Write and the refactor to create a unified Save function will come later as a lot of testing still needs to be done.
JsonObject:
- Introduced AddOrSetFieldValue() methods overloaded on value types to add/set fields in JsonObject.
- Changed the underlying data structure of JsonObject from Dictionary<string,Object?> to OrderedDictionary to guarantee that order of all .uplugin fields (default and custom) are preserved
- Made the JsonObject constructor that takes an OrderedDictionary private to ensure type safety of values passed to JsonObject
- Introduced ToJsonString() for JsonObject that serializes the JsonObject to match the formatting of .uplugin
IMPORTANT: The ToJsonString() method uses the JavaScriptEncoder.UnsafeRelaxedJsonEscaping encoder for Utf8JsonWriter.
This allows +,<,>,&,` etc characters to be written properly for .uplugins. As per MS docs, with this encoding, none of the contents should be written to HTML or a script.
- Introduced JsonObjectTests that unit tested JsonObject to ensure previous behavior was maintained.

PluginDescriptor
- Added a JsonObject field that acts as the cache of all fields that were read from a file or parsed from a json string.
- Cached JsonObject records the order of all fields that were read and captures custom fields in the .uplugin
- Introduced Save2(), the new save algorithm that writes all fields (default and custom) to disk.
- Deleted the private default constructor because it didn't seem to be used anywhere.
- Introduced PluginDescriptorTests to ensure previous behavior is maintained. In particular when dealing with a .uplugin with only default fields, results of Save() and Save2() are the same.

Descriptor Files:
- Introduced ToJsonObject() methods to replace the previous JsonWriter patterns of writing the descriptor data.
- Introduced the UpdateJsonObject pattern which mimics the old WriteArray pattern of writing data to a JsonWriter.

#rb: Mark.Winter, Joe.Kirchoff
#jira: none
#test: Developed this in a TDD style with unit tests for all the major functions. Also reviewed output of created .uplugins and diffed them.

[CL 26105458 by leon huang in ue5-main branch]
2023-06-19 17:00:48 -04:00
tim smith
d21ac8a617 LazyObjectPtr and ObjectPtr are allowed as TMap keys in function arguments.
#rb self

[CL 26094079 by tim smith in ue5-main branch]
2023-06-19 12:44:13 -04:00