Commit Graph

1349 Commits

Author SHA1 Message Date
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
jamie dale
1f56e8f917 Honor the editor-only state of sparse class data properties in their accessors
#jira
#rb Tim.Smith
#rnx

[CL 26049642 by jamie dale in ue5-main branch]
2023-06-16 09:39:30 -04:00
Ben Marsh
08679323fd Horde: Allow spaces in P4 view filters.
[CL 26029815 by Ben Marsh in ue5-main branch]
2023-06-15 18:58:38 -04:00
Ben Marsh
a81922442f Horde: Fix un-flushed ref target being written to disk in file storage client.
Also add backoff/retry mechanism to writing refs.

[CL 26023902 by Ben Marsh in ue5-main branch]
2023-06-15 16:04:33 -04:00
Ben Marsh
1d8934b845 Horde: Move response classes for the secrets endpoint into EpicGames.Horde.
[CL 26013887 by Ben Marsh in ue5-main branch]
2023-06-15 10:29:13 -04:00
Ben Marsh
e65fb78777 Horde: Add a more detailed warning whenever there are no agents found matching the configured requirements during a remote execution lease.
[CL 26012577 by Ben Marsh in ue5-main branch]
2023-06-15 09:43:15 -04:00
Ben Marsh
1dd0c3c480 Horde: Start to move API definitions into EpicGames.Horde, starting with the /api/v1/projects endpoint. Exposing these classes to clients makes it much easier to write applications that communicate with the Horde server.
[CL 26002071 by Ben Marsh in ue5-main branch]
2023-06-14 22:18:34 -04:00
Ben Marsh
1d98b3ba78 UBT: Downgrade Horde compute errors to systemic warnings.
[CL 25996658 by Ben Marsh in ue5-main branch]
2023-06-14 17:24:55 -04:00
chris constantinescu
eaa0b0ae58 Allow plugins "Tests" folder that can include test target and module files.
#rb Jerome.Delattre, Dave.Haslam
#jira UE-188420

[CL 25985206 by chris constantinescu in ue5-main branch]
2023-06-14 13:23:01 -04:00
tim smith
02696889b0 Removed C++ UHT
#rb self

[CL 25928237 by tim smith in ue5-main branch]
2023-06-12 10:02:42 -04:00
Ben Marsh
e05f626f89 Horde: Fix OOB error when building directory tree.
[CL 25927091 by Ben Marsh in ue5-main branch]
2023-06-12 09:02:27 -04:00
Ben Marsh
cdadc13894 Horde: Remove unused code for creating bundles.
[CL 25911664 by Ben Marsh in ue5-main branch]
2023-06-10 19:32:01 -04:00
joe kirchoff
2d7cd8b814 EpicGames.Core: Prevent NullReferenceException in ThreadPoolWorkQueue
#rnx
#jira UE-184496

[CL 25908336 by joe kirchoff in ue5-main branch]
2023-06-09 19:28:22 -04:00
Ben Marsh
d5ffd173f9 Horde: Include a hash in node locators.
[CL 25903979 by Ben Marsh in ue5-main branch]
2023-06-09 16:45:51 -04:00
Ben Marsh
7d5e31784a Horde: Start merging implementations of blobs and nodes in IStorageClient.
* Rename NodeType -> BlobType, NodeData -> BlobData, and NodeHandle -> BlobHandle.
* Add methods to BlobHandle to allow partial reads of payload, and querying refs and type without fetching all data.

[CL 25895881 by Ben Marsh in ue5-main branch]
2023-06-09 11:57:14 -04:00
Ben Marsh
f2149f678c Horde: Remove IStorageClient accessor from IStorageWriter. Add a method to flush the current ref instead.
[CL 25893634 by Ben Marsh in ue5-main branch]
2023-06-09 10:49:02 -04:00
Ben Marsh
f7fdb54c9c Horde: Fix paths within bundles having an additional directory.
[CL 25892482 by Ben Marsh in ue5-main branch]
2023-06-09 10:17:46 -04:00
Ben Marsh
caa966223a Horde: Fix server tests.
[CL 25890560 by Ben Marsh in ue5-main branch]
2023-06-09 08:54:54 -04:00
Ben Marsh
4adaacc9ed Horde: Remove the EnumerateRefs() method from the base Node class. The new immutable NodeRefs do not require two passes to serialize from user code; user code will have to sequence the serialization itself.
[CL 25887471 by Ben Marsh in ue5-main branch]
2023-06-08 22:42:16 -04:00
Ben Marsh
de377a2ee7 Horde: Move extension methods for serializing bundles into an implementation-specific file.
[CL 25887435 by Ben Marsh in ue5-main branch]
2023-06-08 22:28:26 -04:00
Ben Marsh
13d1051dee Horde: Remove bundle-specific options object from IStorageClient.
[CL 25887329 by Ben Marsh in ue5-main branch]
2023-06-08 22:14:12 -04:00
Ben Marsh
aac9ad7880 Horde: Missing files.
[CL 25887311 by Ben Marsh in ue5-main branch]
2023-06-08 22:11:33 -04:00