Commit Graph

59 Commits

Author SHA1 Message Date
ben marsh
595309196c Merging NET 8 upgrades from Main.
[CL 36755991 by ben marsh in 5.5 branch]
2024-10-01 19:12:37 -04:00
joe kirchoff
d7545f3496 Fix requring UnrealBuildTool.Tests be output to the binaries directory
#rnx

[CL 35775434 by joe kirchoff in ue5-main branch]
2024-08-23 13:25:35 -04:00
ben marsh
e7c08e189f Fix static analysis warning in test.
#rnx

[CL 35769340 by ben marsh in ue5-main branch]
2024-08-23 08:57:46 -04:00
joe kirchoff
62ff26f588 Update test nuget packages
#rnx

[CL 35761425 by joe kirchoff in ue5-main branch]
2024-08-22 20:39:13 -04:00
julian gamble
5481c29823 ModifyConfig action in buildgraph is not preserving quotations on original value.
#jira UES-7505
#rb Joe.Kirchoff

[CL 35727989 by julian gamble in ue5-main branch]
2024-08-21 19:49:50 -04:00
joe kirchoff
1651473244 csproj update coverlet.collector -> 6.0.2
#rnx

[CL 35679581 by joe kirchoff in ue5-main branch]
2024-08-20 19:58:48 -04:00
ben marsh
54326e1212 Horde: Fix some static analysis warnings in tests.
#rnx

[CL 34910591 by ben marsh in ue5-main branch]
2024-07-18 14:55:12 -04:00
ben marsh
813a71edcf Horde: Fix inconsistent nullability annotations in LogEvent/MessageTemplate classes, and add tests for round tripping log events to/from JSON.
[CL 34910036 by ben marsh in ue5-main branch]
2024-07-18 14:42:02 -04:00
joe kirchoff
a20c9fbb9e UnrealBuildTool: Format documents, remove and sort usings
#rnx

[CL 32700883 by joe kirchoff in ue5-main branch]
2024-04-03 12:22:43 -04:00
joe kirchoff
e013ff00f7 Add Analyze config to C# projects
#rnx

[CL 32645113 by joe kirchoff in ue5-main branch]
2024-04-01 14:02:34 -04:00
joe kirchoff
d2fa79e476 UnrealBuildTool: Fix tests
#rnx

[CL 32336401 by joe kirchoff in ue5-main branch]
2024-03-19 15:39:53 -04:00
joe kirchoff
5362ccaa8e UnrealBuildTool.Tests: Fix nuget packages
#rnx

[CL 32335203 by joe kirchoff in ue5-main branch]
2024-03-19 15:15:59 -04:00
joe kirchoff
22c169e963 UnrealBuildTool.Tests: Fix naming convention
#rnx

[CL 32289166 by joe kirchoff in ue5-main branch]
2024-03-15 21:33:05 -04:00
joe kirchoff
f6a2b5e35e Fix some dotnet warnings
#rnx

[CL 31114076 by joe kirchoff in ue5-main branch]
2024-02-01 20:01:12 -05:00
ben marsh
ae57e1c7ab Fix warnings being parsed as errors (due to "Warning" appearing capitalized).
#jira

[CL 29653177 by ben marsh in ue5-main branch]
2023-11-10 15:38:33 -05:00
Ben Marsh
8684b930ed Remove implicit conversions from string to Utf8String. This conversion is not free, and recent versions of the MongoDB driver do not handle implicit conversions correctly at runtime.
[CL 28456358 by Ben Marsh in ue5-main branch]
2023-10-04 10:49:04 -04:00
leon huang
721ed16c42 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.
- Ensured that keys for the JsonObject are processed in a case insensitive and culture independent way.

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 26920712 by leon huang in ue5-main branch]
2023-08-08 12:52:41 -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
Ben Marsh
900d7fbb01 Change artifact tests to be async, so callstacks are correct while debugging.
[CL 26023954 by Ben Marsh in ue5-main branch]
2023-06-15 16:05:52 -04:00
tim smith
e452362386 Cleaned up naming of structures and classes to reduce the overuse of the word Mapping.
#rb self

[CL 25815125 by tim smith in ue5-main branch]
2023-06-06 10:01:44 -04:00
joe kirchoff
36d266e932 UnrealBuildTool: Automated code cleanup
#rnx
#preflight 6476799e947ff6973c225619

[CL 25693241 by joe kirchoff in ue5-main branch]
2023-05-30 18:38:07 -04:00
tim smith
cf626105dd 1) Replaced bCanCache with new artifact mode flags
2) Added support in artifacts for relative paths
3) Modified ISPC header generation to be cached

At this time, only MSVC compiles are cached and -deterministic must be specified when building.

#rb josh.adams
#preflight 6470a172054af2576a2bd4b9

[CL 25647092 by tim smith in ue5-main branch]
2023-05-26 12:48:45 -04:00
tim smith
c4e58dd394 Implementation of the action artifact cache.
#rb ben.marsh
#preflight 645a299fa73096fab761de62

[CL 25386005 by tim smith in ue5-main branch]
2023-05-09 08:29:47 -04:00
Ben Marsh
0ede5eada2 UBT: Match engine-style script errors in logs.
#preflight none

[CL 25330216 by Ben Marsh in ue5-main branch]
2023-05-03 21:04:34 -04:00