cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.87k stars 727 forks source link

SolutionParser.Parse - add support for parsing out configurations map #4079

Open tapika opened 1 year ago

tapika commented 1 year ago

Prerequisites

Cake runner

Cake Frosting

Cake version

2.3.0

Operating system

Windows

Operating system architecture

64-Bit

CI Server

No response

What are you seeing?

SolutionParser.Parse should be able to parse also configurations map, so everything starting after GlobalSection(ProjectConfigurationPlatforms) line.

It's also possible that some configurations are not harmonic - for example if solution has 3 main configurations: Debug, Release, RelDebug. Then with higher percentage probability RelDebug configuration will be misconfigured for some of the projects.

General intention is that if project does not have it's own RelDebug configuration - then solution would use Release configuration instead. But solution's RelDebug can be mapped also to Debug causing misconfigurations in solution to happen.

There could be also other ways to misconfigure configurations - if for example solution uses project's AnyCPU and x64 - then solution may map them more or less randomly causing compilation is skipped (e.g. if project does not have specific configuration) or end up with further errors.

It would be nice if Cake would provide original map of all configurations so it would be possible to report an error about such misconfigurations on solution level.

What is expected?

Configuration map can be parsed out.

Steps to Reproduce

Use SolutionParser.Parse

Output log

No response