Runtime: Remove python from the coreclr build

Created on 29 Jun 2020  路  7Comments  路  Source: dotnet/runtime

Currently this is only used in a few places. We can easily translate the scripts which use it to either powershell or msbuild to drop the build dependency.

area-Infrastructure-coreclr

All 7 comments

Given that the generation also needs to work in the native build, msbuild and powershell might not be the best candidates. How often do the generated sources change? (or how often do the inputs change)

@sywhang @josalem

This may increase difficulty of porting to new OSes and architectures where one could build natives parts without .NET presence and build managed assemblies on supported platforms.
@am11 @janvorli

Agreed. Considering python scripts which are responsible to run coreclr tests; from portability viewpoint:

  • powershell is not a good candidate because in addition to the set of dependencies required to build dotnet/runtime, it depends on OMI and other native components which are not available on all platforms.
  • msbuild is not a good candidate because it depends on parts of class libraries, which might not be implemented on target system at the time when developer needs to run tests. (especially System.Diagnostics.Process and System.IO.File could be the tough ones depending on the platform..)

Note that today we need to even patch those python scripts to skip calling SDK (which is used for determining whether or not to rebuild the test project); in order to run the tests from pre- cross-compiled packages and assume there is no SDK or auxiliary dotnet library present. I think this is something which can be properly implemented in runtest.py and friends to not look for SDK at all. If we instead switch to MSBuild for running tests, then it will simply become impossible to run coreclr tests on a new platform, before porting all libraries that SDK and MSBuild depend on.

I also don't like moving to powershell or msbuild because of the reason that @am11 mentioned.

Just use the system shell, what complex works needs to be done?

Stop parsing YML and just do things like normal people...

There is sed, awk, grep, what else do you need? On windows you have powershell.

@juliusfriedman unlike shell scripts, Python works on all platforms.

Please be careful with your tone.

@juliusfriedman unlike shell scripts, Python works on all platforms.

Please be careful with your tone.

Not all, and also corclr does also by virtue of the same fact? n/m moot point.

Look at the other comments in this thread, compared to mine what did I say that was so bad?

Please, Show me 1 script I can't rewrite using pure cmd or bash and I will watch my tone, rather observe the extent of my written words such they hopefully not be interpreted with tone as you have.

I bet its the YML related ones and I bet I could make something to split them up easily enough... here... or here
Heres another
I think we want new lines up to the point we reach the token which was at line 1 or the last parsed line for the YML 馃摝

Heres some for other systems besides windows: Specifically for yml

sed -e 's/:[^:\/\/]/="/g;s/$/"/g;s/ *=/=/g' file.yaml > file.sh
Was this page helpful?
0 / 5 - 0 ratings