Commit Graph

72 Commits

Author SHA1 Message Date
yoan stamant
58ff02e518 [UBT] added DeprecatedEngineVersion to plugin descriptor to be able to warn when a plugin is deprecated and will be removed in future engine versions.
#rb Joe.Kirchoff

[CL 34368728 by yoan stamant in ue5-main branch]
2024-06-14 08:54:28 -04:00
joe kirchoff
d7cc27c8ea UnrealBuildTool: Properly log AggregateExceptions
#rnx

[CL 33437611 by joe kirchoff in ue5-main branch]
2024-05-03 17:08:56 -04:00
joe kirchoff
65f7eab2cd UnrealBuildTool: Resolve CA2254, IDE0011, IDE0017, IDE0030, IDE0031, IDE0037, IDE0056, IDE0075, IDE2000, IDE2001
#rnx

[CL 32711093 by joe kirchoff in ue5-main branch]
2024-04-03 17:18:04 -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
89805bc149 UnrealBuildTool: Resolve IDE0008, IDE0049
#rnx

[CL 32687030 by joe kirchoff in ue5-main branch]
2024-04-02 20:29:22 -04:00
chris varnsverry
39fd940fa5 - Fix minor typos
[CL 30920606 by chris varnsverry in ue5-main branch]
2024-01-26 08:22:07 -05:00
will brown
e7f22140d6 Outputting the plugin filename with Json parse exceptions. Moved the JsonObject.Read call inside of the existing try block as the function throws JsonException when a parse error is detected
#rb Joe.Kirchoff

[CL 30639362 by will brown in ue5-main branch]
2024-01-16 14:08:18 -05:00
joe kirchoff
e5618b4c2d EpicGames.Core: Don't throw a new Exception when a JsonException occurs when parsing
#rnx
#jira UE-196461

[CL 30310003 by joe kirchoff in ue5-main branch]
2023-12-13 19:01:45 -05:00
bob tellez
2622494073 [Backout] - CL29418739, restoring 29416045
Original CL Desc
-----------------------------------------------------------------
New VerseScope "InternalUser" and renamed "User" to "PublicUser"

- new enumerator for VerseScope named "InternalUser"
- renamed existing VerseScope "User" to "PublicUser" - this is possible without breaking existing projects since the VerseScope is not written out to the uplugin file when it is set to "User"

#rb andrew.scheidecker
#rnx

[CL 29419291 by bob tellez in ue5-main branch]
2023-11-03 16:08:07 -04:00
bob tellez
08cd9760a6 [Backout] - CL29416045
[FYI] Markus.Breyer
Original CL Desc
-----------------------------------------------------------------
New VerseScope "InternalUser" and renamed "User" to "PublicUser"

- new enumerator for VerseScope named "InternalUser"
- renamed existing VerseScope "User" to "PublicUser" - this is possible without breaking existing projects since the VerseScope is not written out to the uplugin file when it is set to "User"

#rb andrew.scheidecker
#rnx

[CL 29418991 by bob tellez in ue5-main branch]
2023-11-03 16:01:34 -04:00
markus breyer
7e623a0aeb New VerseScope "InternalUser" and renamed "User" to "PublicUser"
- new enumerator for VerseScope named "InternalUser"
- renamed existing VerseScope "User" to "PublicUser" - this is possible without breaking existing projects since the VerseScope is not written out to the uplugin file when it is set to "User"

#rb andrew.scheidecker
#rnx

[CL 29416324 by markus breyer in ue5-main branch]
2023-11-03 14:58:25 -04:00
andrew scheidecker
91489e5c60 Add an optional Verse language version field to uplugins. There's currently only one valid version: 0.
#rb Markus.Breyer

[CL 29275425 by andrew scheidecker in ue5-main branch]
2023-10-31 10:57:17 -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
will brown
eaf2cd0dbe Fixing build warning 320113
[CL 26029561 by will brown in ue5-main branch]
2023-06-15 18:43:45 -04:00
will brown
c7a8be5cba Added a new DisallowedPlugins property to the PluginDescriptor that restricts which plugins can be used by this plugin.
[REVIEW] 25996005
[FYI] Eric.Carter

[CL 26029349 by will brown in ue5-main branch]
2023-06-15 18:36:30 -04:00
will brown
85fdba1a6b NoCode plugin descriptor property to prevent a plugin from containing any code or modules
[REVIEW] 25999534

[CL 26019360 by will brown in ue5-main branch]
2023-06-15 13:44:57 -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
will brown
6364a02056 UnrealBuildTool: Ensure that plugins do not have dependencies on any plugin that is sealed. Throw a build error if detected
#rb Joe.Kirchoff

[CL 25516847 by will brown in ue5-main branch]
2023-05-17 17:10:44 -04:00
David Harvey
c72f90087d Emit a warning when a plugin extension specifies an explictly empty platform allow list, suggesting the author expects some sort of inheritence.
#jira UE-161681
#rb Josh.Adams
#rnx
#preflight 63b7e67947321b9d890aa5b2

[CL 23596226 by David Harvey in ue5-main branch]
2023-01-06 04:23:16 -05:00
andrew scheidecker
1218625098 Changed boolean property bVersePublicApi on Build.cs and uplugin files to an enum named VerseScope with three states InternalAPI, PublicAPI and User.
Submitting on behalf of Markus.Breyer.

#rnx
#rb Markus.Breyer, Graeme.Thornton, Eric.Knapik
#preflight 62a74175af7ad033effb81ad

#ROBOMERGE-OWNER: andrew.scheidecker
#ROBOMERGE-AUTHOR: andrew.scheidecker
#ROBOMERGE-SOURCE: CL 20629231 via CL 20629334 via CL 20629474 via CL 20629523
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20636288 by andrew scheidecker in ue5-main branch]
2022-06-13 18:37:53 -04:00
markus breyer
45f42535a5 Added new properties to Build.cs and uplugin files to support Verse public API
- new property bVersePublicApi in Build.cs files that is set to expose the associated Verse code to public users
- new property "VersePublicApi" in uplugin files that is set to expose the associated Verse code to public users

#rb andrew.scheidecker, conan.reis
#rnx
#preflight 628c579c3b67edca7a615f57
#preflight 628fe09bf622d972b5f58a6e

#ROBOMERGE-OWNER: markus.breyer
#ROBOMERGE-AUTHOR: markus.breyer
#ROBOMERGE-SOURCE: CL 20386247 via CL 20386248 via CL 20386313 via CL 20386316
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)

[CL 20387729 by markus breyer in ue5-main branch]
2022-05-26 19:24:39 -04:00
markus breyer
83a1800927 Introduced new property "VersePath" in plugin descriptor and module rules
#rb jonathan.adamczewski, tim.tillotson
#rnx
#preflight 6216ef19104496cff8ae5564

#ROBOMERGE-AUTHOR: markus.breyer
#ROBOMERGE-SOURCE: CL 19224088 via CL 19227926 via CL 19237742 via CL 19237888 via CL 19238470
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19239355 by markus breyer in ue5-main branch]
2022-03-03 01:26:50 -05:00
markus breyer
1bd46f673d Do not write the CanContainVerse property for plugin descriptors when it is false
#jira UE-142055
#rb none
#rnx
#preflight none

#ROBOMERGE-AUTHOR: markus.breyer
#ROBOMERGE-SOURCE: CL 18948778 via CL 18949187 via CL 18949188 via CL 18949190 via CL 18952897 via CL 18953142
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18953161 by markus breyer in ue5-main branch]
2022-02-11 11:15:33 -05:00