Commit Graph

37 Commits

Author SHA1 Message Date
Ben Marsh
5e955f8f8b BuildGraph: Fix labels having empty list of included nodes.
#preflight none

[CL 21061685 by Ben Marsh in ue5-main branch]
2022-07-12 15:52:23 -04:00
Ben Marsh
074e08da2b BuildGraph: Fix labels not getting passed through from the aggregate into the bytecode.
#preflight none

[CL 21060760 by Ben Marsh in ue5-main branch]
2022-07-12 14:59:18 -04:00
Ben Marsh
b198fd4a3c BuildGraph: Fix test cases with recent changes to storing graph structures as BG objects.
#preflight 62cc695dad490b52dad4efc9

[CL 21044414 by Ben Marsh in ue5-main branch]
2022-07-11 14:24:04 -04:00
Ben Marsh
38f3bc55ef BuildGraph: Various VM improvements.
* Added support for deserializing BgObject types directly into native classes.
* Removed opcodes for creating graph structures. These are now created in user code from BgObject types.
* Removed BgNodeSpecBuilder. BgNode objects can now be modified directly (returning a modified copy).
* Added concrete types for option parameters. The VM now keeps track of any parameters for evaluated options, allowing them to be added into the graph definition.
* Order dependencies now take nodes rather than outputs.
* Added explicit support for native thunks, whose bindings are saved to a sideband channel during compilation and referenced in bytecode as an index. This generalizes code that was previously specific to node definitions.
* Added a name table to bytecode, to optimize situations where we reference the same string mulitple times.

#preflight 62bf3c583f0d6beee2e8f4a6

[CL 20918762 by Ben Marsh in ue5-main branch]
2022-07-01 14:47:54 -04:00
Ben Marsh
cbd0f5ea19 Add a common interface for reading/writing to memory (IMemoryReader/IMemoryWriter), which is implemented by the legacy MemoryReader/MemoryWriter classes as well as the newer ByteArrayBuilder.
Also moves VarInt into EpicGames.Core.
#preflight 62bb5e3efd06251187efd3d7

[CL 20863839 by Ben Marsh in ue5-main branch]
2022-06-28 16:14:51 -04:00
Ben Marsh
b049f4ad82 BuildGraph: Add handler for int options.
#preflight none

[CL 20830794 by Ben Marsh in ue5-main branch]
2022-06-27 10:48:39 -04:00
Ben Marsh
c32dfb7acb BuildGraph: Move option classes alongside their underlying types, and fix up a lot of namespaces.
#preflight none

[CL 20819013 by Ben Marsh in ue5-main branch]
2022-06-24 19:08:20 -04:00
Ben Marsh
bb0e506aac BuildGraph: Rename classes to reduce boilerplate when writing scripts.
* Expression classes (nodes, aggregates, graphs, etc...) are now called BgNode, BgAggregate, etc...
* Evaluated and instantiated objects used by BuildGraph internals are now called BgNodeDef, BgAggregateDef, etc...

#preflight 62b6374161016695a6545b08

[CL 20818158 by Ben Marsh in ue5-main branch]
2022-06-24 18:30:51 -04:00
Ben Marsh
50a74d20ce BuildGraph: Add bytecode compiler and interpreter to allow graph evaluation outside UAT.
#preflight 62b606546067f280916744c8

[CL 20814909 by Ben Marsh in ue5-main branch]
2022-06-24 15:18:50 -04:00
Ben Marsh
601781e498 BuildGraph: Fix exception passing Bg* value types to methods. Need to construct a constant Bg* type rather than passing the wrapped value.
#preflight 62b367ccd76167320e368af6

[CL 20793974 by Ben Marsh in ue5-main branch]
2022-06-23 09:57:56 -04:00
Ben Marsh
fe2c895552 Add build steps for static analysis of UBT and UAT, and to test project file generation.
#preflight 62b37e6ad76167320e3a224d

[CL 20781813 by Ben Marsh in ue5-main branch]
2022-06-22 17:12:30 -04:00
Ben Marsh
ff46dfcfce BuildGraph: Various refactorings prior to adding bytecode executor.
* Moved XML script parsing into UAT. We don't need to evaluate this in Horde.
* Added custom node types for script and expression nodes, rather than wrapping native nodes with a custom script task.
#preflight 62b31b76650c9d58579b2ea6

[CL 20773724 by Ben Marsh in ue5-main branch]
2022-06-22 09:56:45 -04:00
Ben Marsh
ad092b8fef BuildGraph: Decouple diagnostics from the nodes and agents that contain them.
#preflight 62b1ee341b2d3b6cafcdd33a

[CL 20759421 by Ben Marsh in ue5-main branch]
2022-06-21 12:20:43 -04:00
Ben Marsh
ad3ba4ab43 BuildGraph: Allow use of absolute paths in Include elements.
#jira UE-152589
#preflight 6282aa6fc57a894cf697049d

[CL 20230392 by Ben Marsh in ue5-main branch]
2022-05-16 16:02:27 -04:00
Ben Marsh
deb457e523 BuildGraph: Allow specifying annotations directly on the node declaration.
#preflight 626bfb635c220f34aceb493c

[CL 19979508 by Ben Marsh in ue5-main branch]
2022-04-29 11:03:20 -04:00
Ben Marsh
030034bb05 Horde: Add a generic way of attaching key/value settings to different nodes via BuildGraph.
The <Annotate> attribute allows specifying settings in the format "Key1=Value1;Key2=Value2" to be applied to individual nodes or entire targets, and this data is propagated through to Horde and stored on the job template.

#jira UE-150213
#preflight 62681589dd35c0d6cab2b984

[CL 19922586 by Ben Marsh in ue5-main branch]
2022-04-26 12:30:58 -04:00
Ryan Hummer
4dc8759cbe BuildGraph - Fix Switch statements always executing Default
#rnx
#jira none
#rb ben.marsh
#preflight none

[CL 19760966 by Ryan Hummer in ue5-main branch]
2022-04-14 15:07:07 -04:00
Ben Marsh
c72605bcc7 Fix some analyzer warnings.
#preflight none

[CL 19535012 by Ben Marsh in ue5-main branch]
2022-03-28 18:54:42 -04:00
Ben Marsh
508c144999 Horde: Last batch (hopefully) of static analysis fixes/suppressions.
#preflight 623e144c8073508cfc117a87

[CL 19517822 by Ben Marsh in ue5-main branch]
2022-03-25 15:35:47 -04:00
Ben Marsh
d9651a6f14 Horde: Fix build errors after BuildGraph refactor.
#preflight none

[CL 19511746 by Ben Marsh in ue5-main branch]
2022-03-25 09:46:16 -04:00
Ben Marsh
5e8a45eab2 Reformat EpicGames.BuildGraph according to style guidelines.
#preflight 623cdba70a073579730cf22b

[CL 19502617 by Ben Marsh in ue5-main branch]
2022-03-24 17:05:58 -04:00
Ryan Durand
97c2bbabc5 Add support for per platform FilterPlugin inis for plugins which was originally in a code review for CL 18874143.
#rnx
#jira UE-125146
#rb ryan.hummer
#preflight 62169f2b104496cff8a2c4e8

[CL 19122049 by Ryan Durand in ue5-main branch]
2022-02-24 14:48:24 -05:00
Ben Marsh
8a67c4acaf Horde: Move generic functionality for hosting different commands within an application into EpicGames.Core. Simplifies command line parsing, error handling, help output, etc...
#preflight 620c005c615db7478d393b1e

[CL 19001122 by Ben Marsh in ue5-main branch]
2022-02-15 14:41:10 -05:00
Ben Marsh
a59ef99c07 BuildGraph: New mechanism for declaring graphs using C# code (WIP).
Nodes can now be implemented by arbitary C# methods. Graph structure is specified through expression trees implemented using Bg* types, which are not substituted with values until execution time. Doing so allows determination of node and option dependencies for a particular target, allowing us to generate dynamic UI for presenting relevant settings to the user.

Includes partial implementation of Installed Build script as an example implementation.

#preflight 61bb85d46c2686e86322eec9

[CL 18477305 by Ben Marsh in ue5-main branch]
2021-12-16 13:55:22 -05:00
Ben Marsh
2960dad878 BuildGraph: Separate out a base class for the script parser, allowing the structure of a script to be examined without processing anything.
[CL 18302815 by Ben Marsh in ue5-main branch]
2021-11-26 20:24:26 -05:00