Skip to content

[XABT] Refactor marshal methods and type map generation out of GenerateJavaStubs. #9850

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

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 26, 2025

Context: #9827

Continue breaking down the <GenerateJavaStubs> task into smaller, more manageable pieces by moving the marshal methods and type map generation steps into separate tasks. Once this is complete, we should be able to start moving these steps that require Cecil assembly scanning into linker steps (or equivalent), eventually saving a Cecil assembly scan per build.

@jpobst jpobst force-pushed the dev/jpobst/separate-typemaps branch 3 times, most recently from 89fd040 to 4ba113e Compare February 28, 2025 20:26
@jpobst jpobst force-pushed the dev/jpobst/separate-typemaps branch from 4ba113e to 0d79ba4 Compare February 28, 2025 21:09
@jpobst jpobst marked this pull request as ready for review March 3, 2025 07:58
@jpobst jpobst requested a review from jonpryor March 3, 2025 07:58
@dellis1972 dellis1972 requested a review from grendello March 3, 2025 08:17
Comment on lines +1557 to +1564
<GenerateTypeMappings
AndroidRuntime="$(_AndroidRuntime)"
Debug="$(AndroidIncludeDebugSymbols)"
GenerateNativeAssembly="$(_AndroidGenerateNativeAssembly)"
IntermediateOutputDirectory="$(IntermediateOutputPath)"
SkipJniAddNativeMethodRegistrationAttributeScan="$(_SkipJniAddNativeMethodRegistrationAttributeScan)"
TypemapOutputDirectory="$(_NativeAssemblySourceDir)">
</GenerateTypeMappings>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the whole task be skipped in some cases?

		bool useMarshalMethods = !Debug && EnableMarshalMethods;

		if (!useMarshalMethods)
			return true;

I think it would be clearer if a Condition did this part, since it's refactored into one task now. 👍

The Condition would also be logged in a build log, where the existing code doesn't log.

@jpobst jpobst force-pushed the dev/jpobst/separate-typemaps branch from 01ae9ae to e07546c Compare March 3, 2025 19:25
@jonpryor jonpryor merged commit a28230c into main Mar 3, 2025
56 of 58 checks passed
@jonpryor jonpryor deleted the dev/jpobst/separate-typemaps branch March 3, 2025 21:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants