Skip to content

Conversation

@dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Sep 1, 2017

We made an assumption when the test was written that the
old Resource.designer.cs was going to be deleted in
projects when using $(AndroidUseIntermediateDesignerFile).
The decision was changed so it would jsut be ignored.
So the existing check that is should not exist was wrong.

That said it did not fail because we did not include the Root
proeprty in the path so it always passed because that file
did not exist in the location we were checking.

The change to nunit3 changed that as because of the way the
working directory is set that check now failed. Because
the old incorrect path was not correct.. doh.

So a better check is to make sure that the old file is
just emtpy. We almost empty since the the project tools
write the file we end up with a Unicode marker.

We also update the XamarinAndroidApplicationProject so that
we can override the $(EmbedAssembliesIntoApk). This is
required for various unit tests. The way it currently worked
was that no matter what you set.. you always got the default.
This worked for the OSS repo as we don't use the shared-runtime.
But for the monodroid stuff, we need to be able to change that
value. This was stopping the test projects doing that.

We made an assumption when the test was written that the
old Resource.designer.cs was going to be deleted in
projects when using `$(AndroidUseIntermediateDesignerFile)`.
The decision was changed so it would jsut be ignored.
So the existing check that is should not exist was wrong.

That said it did not fail because we did not include the `Root`
proeprty in the path so it always passed because that file
did not exist in the location we were checking.

The change to nunit3 changed that as because of the way the
working directory is set that check now failed. Because
the old incorrect path was not correct.. doh.

So a better check is to make sure that the old file is
just emtpy. We almost empty since the the project tools
write the file we end up with a Unicode marker.

We also update the XamarinAndroidApplicationProject so that
we can override the `$(EmbedAssembliesIntoApk)`. This is
required for various unit tests. The way it currently worked
was that no matter what you set.. you always got the default.
This worked for the OSS repo as we don't use the shared-runtime.
But for the monodroid stuff, we need to be able to change that
value. This was stopping the test projects doing that.
"Resource.designer" + proj.Language.DefaultDesignerExtension)),
"{0} should not exists", designer);
var fi = new FileInfo (Path.Combine (Root, b.ProjectDirectory, designer));
Assert.IsFalse (fi.Length > 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

The designer file won't/can't contain <UTF-8 BOM><newline>? 5 might be a safer value, but new[]{0xef, 0xbb, 0xbf, 0x0d, 0x0a}.Length might be a more understandable value.

@jonpryor jonpryor merged commit 483f8b6 into dotnet:master Sep 1, 2017
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 18, 2021
Fixes: dotnet/java-interop#790

Changes: dotnet/java-interop@bba1f07...3824b97

  * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816)
  * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813)
  * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808)
  * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812)
  * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793)
  * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809)
  * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807)
  * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 18, 2021
Fixes: dotnet/java-interop#790

Changes: dotnet/java-interop@bba1f07...3824b97

  * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816)
  * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813)
  * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808)
  * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812)
  * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793)
  * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809)
  * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807)
  * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)

Note: dotnet/java-interop@3824b974 updated
Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`.
Define `_WINDOWS` when building for Windows as well.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 18, 2021
Fixes: dotnet/java-interop#790

Changes: dotnet/java-interop@bba1f07...3824b97

  * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816)
  * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813)
  * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808)
  * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812)
  * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793)
  * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809)
  * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807)
  * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)

Note: dotnet/java-interop@3824b974 updated
Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`.
Define `_WINDOWS` when building for Windows as well.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Mar 18, 2021
Fixes: dotnet/java-interop#790

Changes: dotnet/java-interop@bba1f07...3824b97

  * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816)
  * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813)
  * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808)
  * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812)
  * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793)
  * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809)
  * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807)
  * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)

Note: dotnet/java-interop@3824b974 updated
Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`.
Define `_WINDOWS` when building for Windows as well.
jonpryor added a commit that referenced this pull request Mar 23, 2021
Fixes: dotnet/java-interop#790

Changes: dotnet/java-interop@bba1f07...a3de91e

  * dotnet/java-interop@a3de91ef: [ci] Make VC++ toolchain optional (#820)
  * dotnet/java-interop@3824b974: [java-interop] Windows build system support (#816)
  * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (#813)
  * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (#808)
  * dotnet/java-interop@daec07b6: [build] Fix various warnings (#812)
  * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (#793)
  * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (#809)
  * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (#807)
  * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (#804)

Note: dotnet/java-interop@3824b974 updated
Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`.
Define `_WINDOWS` when building for Windows as well.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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.

3 participants