Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert genRuntimeEventSources.py script to msbuild task #45733

Open
ViktorHofer opened this issue Dec 8, 2020 · 4 comments
Open

Convert genRuntimeEventSources.py script to msbuild task #45733

ViktorHofer opened this issue Dec 8, 2020 · 4 comments

Comments

@ViktorHofer
Copy link
Member

ViktorHofer commented Dec 8, 2020

Initial cost estimate: 2 man-weeks
Initial contacts: @ViktorHofer, @trylek

In response to #688, we should remove the python dependency from the build and a good starting point for that would be the event source file generation in CoreLib. This should be done via an msbuild task (installer.tasks) as pure msbuild presumably isn't powerful enough.

Also note that #39052 (comment) indicates that the msbuild task should also have a boolean to allow stubbing the event source file out for new OS bring-up.

@jkotas for new device/OS bring-up, how does CoreLib itself get compiled without msbuild (as the discussion in the other thread suggested that msbuild might now work initially)?

cc @dotnet/runtime-infrastructure (coreclr folks especially)

@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Dec 8, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 8, 2020
@trylek trylek removed the untriaged New issue has not been triaged by the area owner label Dec 8, 2020
@akoeplinger
Copy link
Member

akoeplinger commented Dec 10, 2020

In response to #688, we should remove the python dependency from the build

note that the Mono portion of the build uses python too, so if you want to remove it completely we should coordinate that.

@ericstj
Copy link
Member

ericstj commented Dec 11, 2020

This could also be done with a C# source generator.

@hoyosjs
Copy link
Member

hoyosjs commented Dec 11, 2020

The file used to generate the events is a manifest, and it generates native headers and c sharp code. Not sure if source generators are the best bet here given we don't need as much information on the c# side (might be worth thinking about it though with the portable thread pool).

@hoyosjs hoyosjs closed this as completed Dec 11, 2020
@hoyosjs hoyosjs reopened this Dec 11, 2020
@ericstj
Copy link
Member

ericstj commented Dec 11, 2020

There is a scenario in the cookbook that maps to this: https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md#additional-file-transformation

it generates native headers and c sharp code

I noticed that https://github.com/dotnet/runtime/blob/master/src/coreclr/scripts/genRuntimeEventSources.py generated C# but I didn't see the native headers. Agree that if you need to generate native headers C# source generator isn't appropriate.

@agocke agocke modified the milestones: 6.0.0, Future Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

7 participants