-
Notifications
You must be signed in to change notification settings - Fork 564
Bump to xamarin/Java.Interop/master@f7ea4ed4 #4431
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
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/java.interop
that referenced
this pull request
Mar 20, 2020
Context: dotnet/android#4431 Commit e7c5f54 added `IdentifierValidator.IsValidIdentifier()`, replacing use of `CSharpCodeProvider.IsValidIdentifier()`, and this change caused a unit test failure within xamarin-android: // Xamarin.Android.Build.Tests.BuildTest.GeneratorValidateEventName obj/Debug/generated/src/Com.Xamarin.Testing.Test.cs(350,29,350,32): error CS1001: Identifier expected The line in question? public event EventHandler 123 { Oops. It Turns Out™ that `IdentifierValidator.IsValidIdentifier("123")` returned True, so we attempted to create an event named `123`, which the C# compiler Does Not Like. Fix `IdentifierValidator.IsValidIdentifier()` by using a new `IsValidIdentifierRegex` regex to match against identifiers, instead of attempting to reuse the `validIdentifier` regex, which matches for *invalid* characters (it negates the match via `[^...]`), and thus cannot differentiate between "starting" characters and everything else, which is fine for `CreateValidIdentifier()`, but not for `IsValidIdentifier()`. Add unit tests for `IsValidIdentifier()`.
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Mar 20, 2020
Context: dotnet/android#4431 Commit e7c5f54 added `IdentifierValidator.IsValidIdentifier()`, replacing use of `CSharpCodeProvider.IsValidIdentifier()`, and this change caused a unit test failure within xamarin-android: // Xamarin.Android.Build.Tests.BuildTest.GeneratorValidateEventName obj/Debug/generated/src/Com.Xamarin.Testing.Test.cs(350,29,350,32): error CS1001: Identifier expected The line in question? public event EventHandler 123 { Oops. It Turns Out™ that `IdentifierValidator.IsValidIdentifier("123")` returned True, so we attempted to create an event named `123`, which the C# compiler Does Not Like. Fix `IdentifierValidator.IsValidIdentifier()` by using a new `IsValidIdentifierRegex` regex to match against identifiers, instead of attempting to reuse the `validIdentifier` regex, which matches for *invalid* characters (it negates the match via `[^...]`), and thus cannot differentiate between "starting" characters and everything else, which is fine for `IdentifierValidator.CreateValidIdentifier()`, but not for `IdentifierValidator.IsValidIdentifier()`. Add unit tests for `IdentifierValidator.IsValidIdentifier()`. Update `make run-test-generator-core` tests so that we add a `View.setOn123Listener()` method, which prior to this commit would add a `View.123` event: partial class View { public event EventHandler 123 { add { … } remove { … } } } With a corrected `IdentifierValidator.IsValidIdentifier()`, this event is no longer generated.
jonpryor
added a commit
to jonpryor/java.interop
that referenced
this pull request
Mar 20, 2020
Context: dotnet/android#4431 Commit e7c5f54 added `IdentifierValidator.IsValidIdentifier()`, replacing use of `CSharpCodeProvider.IsValidIdentifier()`, and this change caused a unit test failure within xamarin-android: // Xamarin.Android.Build.Tests.BuildTest.GeneratorValidateEventName obj/Debug/generated/src/Com.Xamarin.Testing.Test.cs(350,29,350,32): error CS1001: Identifier expected The line in question? public event EventHandler 123 { Oops. It Turns Out™ that `IdentifierValidator.IsValidIdentifier("123")` returned True, so we attempted to create an event named `123`, which the C# compiler Does Not Like. Fix `IdentifierValidator.IsValidIdentifier()` by using a new `IsValidIdentifierRegex` regex to match against identifiers, instead of attempting to reuse the `validIdentifier` regex, which matches for *invalid* characters (it negates the match via `[^...]`), and thus cannot differentiate between "starting" characters and everything else, which is fine for `IdentifierValidator.CreateValidIdentifier()`, but not for `IdentifierValidator.IsValidIdentifier()`. Add unit tests for `IdentifierValidator.IsValidIdentifier()`. Update `make run-test-generator-core` tests so that we add a `View.setOn123Listener()` method, which prior to this commit would add a `View.123` event: partial class View { public event EventHandler 123 { add { … } remove { … } } } With a corrected `IdentifierValidator.IsValidIdentifier()`, this event is no longer generated.
jpobst
pushed a commit
to dotnet/java-interop
that referenced
this pull request
Mar 20, 2020
Context: dotnet/android#4431 Commit e7c5f54 added `IdentifierValidator.IsValidIdentifier()`, replacing use of `CSharpCodeProvider.IsValidIdentifier()`, and this change caused a unit test failure within xamarin-android: // Xamarin.Android.Build.Tests.BuildTest.GeneratorValidateEventName obj/Debug/generated/src/Com.Xamarin.Testing.Test.cs(350,29,350,32): error CS1001: Identifier expected The line in question? public event EventHandler 123 { Oops. It Turns Out™ that `IdentifierValidator.IsValidIdentifier("123")` returned True, so we attempted to create an event named `123`, which the C# compiler Does Not Like. Fix `IdentifierValidator.IsValidIdentifier()` by using a new `IsValidIdentifierRegex` regex to match against identifiers, instead of attempting to reuse the `validIdentifier` regex, which matches for *invalid* characters (it negates the match via `[^...]`), and thus cannot differentiate between "starting" characters and everything else, which is fine for `IdentifierValidator.CreateValidIdentifier()`, but not for `IdentifierValidator.IsValidIdentifier()`. Add unit tests for `IdentifierValidator.IsValidIdentifier()`. Update `make run-test-generator-core` tests so that we add a `View.setOn123Listener()` method, which prior to this commit would add a `View.123` event: partial class View { public event EventHandler 123 { add { … } remove { … } } } With a corrected `IdentifierValidator.IsValidIdentifier()`, this event is no longer generated.
Changes: dotnet/java-interop@cedf4d0...1a086ff * dotnet/java-interop@1a086ff: [Java.Interop.Tools.JavaCallableWrappers] Fix IsValidIdentifier() (dotnet#610) * dotnet/java-interop@f7ea4ed: [Xamarin.Android.Tools.Bytecode-Tests] Remove obsolete files (dotnet#603) * dotnet/java-interop@e070ce3: [build] Remove <Imports/> now covered by Directory.Build.props (dotnet#607) * dotnet/java-interop@e7c5f54: [generator] Add netcoreapp3.1 support (dotnet#606) * dotnet/java-interop@95f698b: [build] Build additional `$(TargetFramework)` values. (dotnet#605)
3955ac2 to
b6f2d04
Compare
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.
Changes: dotnet/java-interop@cedf4d0...f7ea4ed
autopointin $PATH" requirement #606)$(TargetFramework)values. ([create-vsix] Improve compatibility with commercial .vsix #605)