From ef30b66aa9160b22aa4abfc0ce1c62c748cf1b31 Mon Sep 17 00:00:00 2001 From: Lambert Clara Date: Tue, 28 Sep 2021 10:12:37 +0200 Subject: [PATCH 1/4] Make the version unofficial. --- Sharpmake.Application/Properties/AssemblyInfo.cs | 2 +- Sharpmake.Generators/Properties/AssemblyInfo.cs | 2 +- .../Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs | 2 +- Sharpmake/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sharpmake.Application/Properties/AssemblyInfo.cs b/Sharpmake.Application/Properties/AssemblyInfo.cs index d88bb638a..fd923dc8a 100644 --- a/Sharpmake.Application/Properties/AssemblyInfo.cs +++ b/Sharpmake.Application/Properties/AssemblyInfo.cs @@ -43,4 +43,4 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.0")] +[assembly: AssemblyVersion("0.17.3.*")] diff --git a/Sharpmake.Generators/Properties/AssemblyInfo.cs b/Sharpmake.Generators/Properties/AssemblyInfo.cs index 95224fec5..668aa4fb2 100644 --- a/Sharpmake.Generators/Properties/AssemblyInfo.cs +++ b/Sharpmake.Generators/Properties/AssemblyInfo.cs @@ -44,6 +44,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.0")] +[assembly: AssemblyVersion("0.17.3.*")] [assembly: InternalsVisibleTo("Sharpmake")] diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs index e1a8544da..880633c01 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs @@ -44,6 +44,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.0")] +[assembly: AssemblyVersion("0.17.3.*")] [assembly: SharpmakeExtension] diff --git a/Sharpmake/Properties/AssemblyInfo.cs b/Sharpmake/Properties/AssemblyInfo.cs index 00d71b015..98c55ec4d 100644 --- a/Sharpmake/Properties/AssemblyInfo.cs +++ b/Sharpmake/Properties/AssemblyInfo.cs @@ -44,9 +44,9 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.0")] +[assembly: AssemblyVersion("0.17.3.*")] #pragma warning disable CS7035 -[assembly: AssemblyFileVersion("0.17.3.0 (LocalBuild)")] +[assembly: AssemblyFileVersion("0.17.3.* (LocalBuild)")] #pragma warning restore [assembly: InternalsVisibleTo("Sharpmake.Application")] From 6daac80bc55a5ecc803c548c298ad79beff45042 Mon Sep 17 00:00:00 2001 From: Lambert Clara Date: Wed, 29 Sep 2021 12:10:18 +0200 Subject: [PATCH 2/4] Prevent the same generation report from being merged from different threads This could lead to crashes when the lists are appended: "Destination array was not long enough. Check destIndex and length, and the array's lower bounds" --- Sharpmake/GenerationOutput.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Sharpmake/GenerationOutput.cs b/Sharpmake/GenerationOutput.cs index 153a901ac..15ae4aa53 100644 --- a/Sharpmake/GenerationOutput.cs +++ b/Sharpmake/GenerationOutput.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Ubisoft Entertainment +// Copyright (c) 2017, 2021 Ubisoft Entertainment // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,8 @@ public class GenerationOutput public List Generated = new List(); public List Skipped = new List(); + private object _lock = new object(); + public Exception Exception { get @@ -34,7 +36,7 @@ public Exception Exception set { _exception = value; - Console.WriteLine(_exception.Message); + Util.LogWrite(_exception.Message); } } @@ -47,10 +49,13 @@ public override string ToString() public void Merge(GenerationOutput other) { - Generated.AddRange(other.Generated); - Skipped.AddRange(other.Skipped); - if (_exception == null) - _exception = other._exception; + lock (_lock) + { + Generated.AddRange(other.Generated); + Skipped.AddRange(other.Skipped); + if (_exception == null) + _exception = other._exception; + } } } } From a184e66b5c1c0c124cb2ea2bb23a69a0832533a9 Mon Sep 17 00:00:00 2001 From: Lambert Clara Date: Wed, 29 Sep 2021 12:48:06 +0200 Subject: [PATCH 3/4] [Bff] Move the build only dependencies to the target alias instead of the prebuild of the node that outputs. --- Sharpmake.Generators/FastBuild/Bff.cs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Sharpmake.Generators/FastBuild/Bff.cs b/Sharpmake.Generators/FastBuild/Bff.cs index 2e2d3f3fb..92d314cf2 100644 --- a/Sharpmake.Generators/FastBuild/Bff.cs +++ b/Sharpmake.Generators/FastBuild/Bff.cs @@ -416,18 +416,17 @@ List skipFiles if (isExport) continue; + string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig); + if (depProjConfig.Output != Project.Configuration.OutputType.Exe && depProjConfig.Output != Project.Configuration.OutputType.Utility) { - string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig); if (!dependenciesInfo.IgnoredLibraryNames.Contains(depProjConfig.TargetFileFullNameWithExtension)) fastBuildProjectDependencies.Add(shortProjectName + "_LibraryDependency"); - fastBuildBuildOnlyDependencies.Add(shortProjectName); - } - else if (!depProjConfig.IsExcludedFromBuild) - { - fastBuildProjectExeUtilityDependencyList.Add(GetShortProjectName(depProjConfig.Project, depProjConfig)); } + + if (!depProjConfig.IsExcludedFromBuild) + fastBuildProjectExeUtilityDependencyList.Add(shortProjectName); } orderedProjectDeps = UtilityMethods.GetOrderedFlattenedBuildOnlyDependencies(conf); @@ -440,15 +439,8 @@ List skipFiles if (isExport) continue; - if (depProjConfig.Output != Project.Configuration.OutputType.Exe && - depProjConfig.Output != Project.Configuration.OutputType.Utility) - { - fastBuildBuildOnlyDependencies.Add(GetShortProjectName(depProjConfig.Project, depProjConfig)); - } - else - { - fastBuildProjectExeUtilityDependencyList.Add(GetShortProjectName(depProjConfig.Project, depProjConfig)); - } + string shortProjectName = GetShortProjectName(depProjConfig.Project, depProjConfig); + fastBuildProjectExeUtilityDependencyList.Add(shortProjectName); } } From b16c5fc35794b7efb18a72182b4cb280f6b7222d Mon Sep 17 00:00:00 2001 From: Lambert Clara Date: Thu, 30 Sep 2021 10:31:27 +0200 Subject: [PATCH 4/4] Bump version number to 0.17.4 --- Sharpmake.Application/Properties/AssemblyInfo.cs | 2 +- Sharpmake.Generators/Properties/AssemblyInfo.cs | 2 +- .../Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs | 2 +- Sharpmake/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sharpmake.Application/Properties/AssemblyInfo.cs b/Sharpmake.Application/Properties/AssemblyInfo.cs index fd923dc8a..9fa4104d8 100644 --- a/Sharpmake.Application/Properties/AssemblyInfo.cs +++ b/Sharpmake.Application/Properties/AssemblyInfo.cs @@ -43,4 +43,4 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.*")] +[assembly: AssemblyVersion("0.17.4.0")] diff --git a/Sharpmake.Generators/Properties/AssemblyInfo.cs b/Sharpmake.Generators/Properties/AssemblyInfo.cs index 668aa4fb2..0ced81b5c 100644 --- a/Sharpmake.Generators/Properties/AssemblyInfo.cs +++ b/Sharpmake.Generators/Properties/AssemblyInfo.cs @@ -44,6 +44,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.*")] +[assembly: AssemblyVersion("0.17.4.0")] [assembly: InternalsVisibleTo("Sharpmake")] diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs index 880633c01..06b4d25fc 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Properties/AssemblyInfo.cs @@ -44,6 +44,6 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.*")] +[assembly: AssemblyVersion("0.17.4.0")] [assembly: SharpmakeExtension] diff --git a/Sharpmake/Properties/AssemblyInfo.cs b/Sharpmake/Properties/AssemblyInfo.cs index 98c55ec4d..d908c5dca 100644 --- a/Sharpmake/Properties/AssemblyInfo.cs +++ b/Sharpmake/Properties/AssemblyInfo.cs @@ -44,9 +44,9 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.17.3.*")] +[assembly: AssemblyVersion("0.17.4.0")] #pragma warning disable CS7035 -[assembly: AssemblyFileVersion("0.17.3.* (LocalBuild)")] +[assembly: AssemblyFileVersion("0.17.4.0 (LocalBuild)")] #pragma warning restore [assembly: InternalsVisibleTo("Sharpmake.Application")]