Skip to content

Conversation

@jonpryor
Copy link
Contributor

There is a philosophically confusing question due to the interaction
between the Java.Interop, xamarin-android, and mono repos:

Which repo "owns" Cecil?

The Java.Interop repo has a Cecil submodule.

The mono repo has a Cecil submodule. (Two, if you count the indirect
one from the Linker submodule, but that shouldn't be used.)

The xamarin-android repo references both Java.Interop & mono.

If we have a fix in Cecil, what all needs bumping?

A present, the answer is everything, because the mono reference is
included into a variety of mono-built utilities (as source, not an
assembly), while the Java.Interop reference built into
Xamarin.Android.Cecil.dll and used by the Xamarin.Android build
process.

This is somewhat confusing, and means that more work needs to be done
to apply fixes everywhere.

Try to simplify things by adding a new $(CecilSourceDirectory)
MSBuild property to Configuration.props. The intent is to allow a
xamarin-android checkout to override $(CecilSourceDirectory) so
that the Java.Interop build will the mono reference, thus permitting
a degree of consistency and understanding not previously available.

Thus, which repo "owns" Cecil? The mono repo will; the Java.Interop
reference will be ignored when building from xamarin-android.

There is a philosophically confusing question due to the interaction
between the Java.Interop, xamarin-android, and mono repos:

Which repo "owns" Cecil?

The Java.Interop repo has a Cecil submodule.

The mono repo has a Cecil submodule. (*Two*, if you count the indirect
one from the Linker submodule, but that shouldn't be used.)

The xamarin-android repo references both Java.Interop & mono.

If we have a fix in Cecil, what all needs bumping?

A present, the answer is *everything*, because the mono reference is
included into a variety of mono-built utilities (*as source*, not an
assembly), while the Java.Interop reference built into
`Xamarin.Android.Cecil.dll` and used by the Xamarin.Android build
process.

This is somewhat confusing, and means that more work needs to be done
to apply fixes everywhere.

Try to simplify things by adding a new `$(CecilSourceDirectory)`
MSBuild property to `Configuration.props`.  The intent is to allow a
xamarin-android checkout to *override* `$(CecilSourceDirectory)` so
that the Java.Interop build will the *mono* reference, thus permitting
a degree of consistency and understanding not previously available.

Thus, which repo "owns" Cecil?  The mono repo will; the Java.Interop
reference will be ignored *when building from xamarin-android*.
@jonpryor jonpryor requested a review from radekdoulik May 29, 2018 15:58
Copy link
Member

@radekdoulik radekdoulik left a comment

Choose a reason for hiding this comment

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

Looks OK to me. Lets wait for the build to finish.

Later we might consider replacing external/cecil with external/mono submodule, so that PR builder uses the same source version as XA?

OTOH we would have to keep that submodule synced with XA's mono submodule, so it wouldn't be a clear win from maintenance point of view.

@jonpryor
Copy link
Contributor Author

Later we might consider replacing external/cecil with external/mono submodule

Not only would it not be a "clear win," it would be a clear loss: cecil is (relatively) small. mono is relatively gigantic. Since we're using git submodule update --init --recursive, changing to mono would imply a significant increase in the amount of data downloaded and the amount of space consumed on the build machine.

@jonpryor jonpryor merged commit 168c94d into dotnet:master May 30, 2018
@radekdoulik
Copy link
Member

radekdoulik commented May 30, 2018

Yes, that is significant drawback. (I was looking at it from maintenance point of view - reduce number of bumps).

Maybe we might not use submodule for cecil at all? Rather clone and checkout it in the prepare phase of the build, to the same hash as XA/mono/cecil of the same XA branch as JI.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
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.

2 participants