-
Notifications
You must be signed in to change notification settings - Fork 64
[Java.Interop] JavaTypeParametersAttribute only in net6 #929
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
jonpryor
merged 4 commits into
dotnet:main
from
jonpryor:jonp-JavaTypeParametersAttribute-only-in-net6
Dec 9, 2021
Merged
[Java.Interop] JavaTypeParametersAttribute only in net6 #929
jonpryor
merged 4 commits into
dotnet:main
from
jonpryor:jonp-JavaTypeParametersAttribute-only-in-net6
Dec 9, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 7, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 7, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 7, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
30f0c2b to
942df52
Compare
Context: dotnet/android#6549 When attempting to bump xamarin-android to use bc5bcf4, the build failed because bc5bcf4 added a "duplicate" type `Java.Interop.JavaTypeParametersAttribute`: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. The plan was to use type forwarders for this type from `Mono.Android.dll` to `Java.Interop.dll`, but in retrospect this sounds like a potential "forward-incompatible ABI break" (e56a8c8) as assemblies built against the newer `Mono.Android.dll` (with type forwarders) won't be usable on previous Xamarin.Android SDKs. Make `JavaTypeParametersAttribute` conditional on `NET`, so that it's only included in .NET 6 builds. .NET SDK for Android will then use type forwarders, which won't be an issue as there's no previous .NET release to be forward compatible with. Update `tests/generator-Tests` so that `JavaTypeParametersAttribute` is once again provided for non-`NET` builds.
942df52 to
20d6bcb
Compare
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 8, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 8, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
xamarin-android Windows PR builds can't build, because of: error CS8032: An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\analyzers\dotnet\cs\System.Text.Json.SourceGeneration.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [C:\a\_work\1\s\external\Java.Interop\build-tools\jnienv-gen\jnienv-gen.csproj] Ignore the CS8032 warning/error, so that xamarin-android Windows PR builds can *build*.
a2f5d0d to
e66b803
Compare
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
Dec 8, 2021
Context: dotnet/java-interop#929 See if dotnet/java-interop#929 + type forwarders fixes the build failure originally observed: error CS0433: The type 'JavaTypeParametersAttribute' exists in both 'Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' and 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' [C:\a\_work\1\a\TestRelease\12-07_04.08.15\temp\LibraryProjectZipWithLint\BindingsProject\BindingsProject.csproj]
Fixes Windows build failure: > C:\Users\cloudtest\android-toolchain\dotnet\dotnet "C:\a\_work\1\s\external\Java.Interop\bin\Release-net6.0\class-parse.dll" "C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.13-8\x64/jmods/java.base.jmod" "-o=obj\\Release-net6.0\/mcw/api.xml" Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled a built-in dotnet command. * You intended to execute a .NET program, but dotnet-C:\a\_work\1\s\external\Java.Interop\bin\Release-net6.0\class-parse.dll does not exist. * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. This is because `Java.Base.targets` should have been using `$(UtilityOutputFullPath)`, not `$(ToolOutputFullPath)`. Doh!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: dotnet/android#6549
When attempting to bump xamarin-android to use bc5bcf4, the build
failed because bc5bcf4 added a "duplicate" type
Java.Interop.JavaTypeParametersAttribute:The plan was to use type forwarders for this type from
Mono.Android.dlltoJava.Interop.dll, but in retrospect thissounds like a potential "forward-incompatible ABI break", as
assemblies built against the newer
Mono.Android.dll(with typeforwarders) won't be usable on previous Xamarin.Android SDKs.
Make
JavaTypeParametersAttributeconditional onNET, so that it'sonly included in .NET 6 builds. .NET SDK for Android will then use
type forwarders, which won't be an issue as there's no previous .NET
release to be forward compatible with.