Граф коммитов

3222 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert 7798c7c5f1
[Localization] Add flag to change line endings (#17422)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2023-02-02 13:27:31 -05:00
Rolf Bjarne Kvinge 614a16a358
[autoformat] Fix line endings for localization output. (#17407)
Ref: https://github.com/xamarin/xamarin-macios/pull/17403
2023-02-01 16:59:42 +01:00
Manuel de la Pena 8682ff8d56
[CI] Remove yaml lint issue. (#17412) 2023-01-31 16:01:48 -05:00
Rolf Bjarne Kvinge b654db9f2d
[tools] Fix MT1302 to show the correct path to the assembly. (#17362)
We used to show this:

> ILLINK warning MT1302: Could not extract the native library 'StaticLibrary.a' from '~/Downloads/BindingTest/obj/Debug/net7.0-ios/iossimulator-x64/linker-cache/StaticLibrary.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').

now we show the assembly:

> ILLINK warning MT1302: Could not extract the native library 'StaticLibrary.a' from '~/Downloads/BindingTest/obj/Debug/net7.0-ios/iossimulator-x64/linker-cache/BindingLibrary.dll'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').

Also increase diagnostics for this failure scenario to list all the resources
in the given assembly.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-01-26 17:01:41 +01:00
Rolf Bjarne Kvinge 41384c6af8
[tools] Add diagnostics when a native library turns off -dead_link support. (#17361)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-01-26 16:16:13 +01:00
Rolf Bjarne Kvinge 98819287cc
[runtime/generator] Add support for BindAs with CMVideoDimensions. (#17308)
This is required for some new iOS 16 APIs.
2023-01-25 15:34:28 +01:00
Rolf Bjarne Kvinge 6af8da73af
[tools] Try to fix #xamarin/maccore@2637 by making sure a file's timestamp changes. (#17352)
Try to fix #xamarin/maccore@2637 by making sure a file's timestamp changes
after make runs the corresponding target.

Otherwise it seems make may run into some sort of infinite loop.

Fixes https://github.com/xamarin/maccore/issues/2637.
2023-01-25 08:56:56 +01:00
Rolf Bjarne Kvinge ddda284da5
[tools] Enable the PushToTalk framework in the simulator. (#17274)
Apple provides the headers to target PushToTalk (so using PushToTalk in code
builds just fine for the simulator in Xcode), but it doesn't work at runtime.

I believe it's better to allow the same thing in our bindings, for two reasons:

* Apple prints out a helpful error message at runtime, instead of our rather
  incomprehensible build error.
* Apple might implement simulator support in the future, in which case we
  won't need to do anything else.
2023-01-18 18:55:04 +01:00
VS MobileTools Engineering Service 2 87f4b91f8d
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7198107 (#17246)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-01-17 12:14:36 -06:00
Manuel de la Pena 00219b952f
[CI] Move the upload to a hosted image. (#17192)
We have noticed that the azure upload steps fail when they are executed
in a on prem windows machine. The infra team does not know what this is
happening. To work around it we are taking the following stes:

- Move the upload to a hosted image, which does work.
- Donot download all artefacts, since hosted images only have a 10 gb
hdd. We download all but the not needed files using negative match
patterns.
2023-01-12 11:05:15 -05:00
Manuel de la Pena 5541f48180
[CI] Set extra parameters for the azure upload. (#17161) 2023-01-10 18:38:06 -05:00
Rolf Bjarne Kvinge 6c04f7621a
[tools] Update SdkVersions.cs after the latest Xcode 14.2 bump. (#17101)
* Update `SdkVersions.cs` after the latest Xcode 14.2 bump.
* Rename `[SdkVersions|ProductConstants].cs.in` to `[SdkVersions|ProductConstants].in.cs`.
  This way the autoformatter makes sure it's formatted correctly.
2022-12-21 17:44:27 +01:00
Rolf Bjarne Kvinge 83b0727967
[tests] Port and improve the availability attribute test from introspection. (#17083)
Port the availability attribute test from introspection to cecil-tests. It's much
easier and faster to test attributes using Cecil using a desktop executable than
having to execute a test app on each target platform.

This also means that we can make the ApiAvailabilityTest in introspection
legacy-only.

Ref: https://github.com/xamarin/xamarin-macios/issues/10834
2022-12-20 12:46:06 +01:00
Rolf Bjarne Kvinge d6cb31402f
[tools] Split tools/common/SdkVersions.cs in two files. (#17067)
We need parts of tools/common/SdkVersions.cs when building tests on Windows.
In order to simplify our Windows-life, we're going to check in the generated
SdkVersions.cs file, that way it won't have to be re-generated on Windows (the
logic is very make-based, and not easily executed on Windows).

However, parts of SdkVersions.cs would change every commit, which would make
the above solution rather annoying. So split out those parts into a new file
(ProductConstants.cs), which is still generated during the build (and not
checked in).
2022-12-16 15:25:53 +01:00
Rolf Bjarne Kvinge 8c6155d617
Bump API references to the Xcode 14.1 release. (#16710) 2022-12-14 09:52:40 +01:00
Rolf Bjarne Kvinge dc37be300e
Remove bitcode-related code, since bitcode is dead. (#16986) 2022-12-12 15:25:37 +01:00
Rolf Bjarne Kvinge 1031928ae1
[tools] Enable nullability in MachO.cs (#16982) 2022-12-07 18:07:53 +01:00
Rolf Bjarne Kvinge 0e0a71aa5d
[tools] Enable nullability in SdkVersions.cs (#16983) 2022-12-07 17:43:28 +01:00
Rolf Bjarne Kvinge cb28b21189
[tools/src] Enable nullability in a few error-related source files. (#16987) 2022-12-07 17:43:05 +01:00
Rolf Bjarne Kvinge 25fc6c84d1
[dotnet-linker] Handle null fields in BackingFieldDelayHandler as unmarked fields. Fixes #16957. (#16970)
The BackingFieldDelayHandler will temporarily remove the body of Dispose
methods, and then for every field accessed in the Dispose method that was
preserved by the linker, we'll keep the corresponding code in the Dispose
method (otherwise we'd remove the code).

This is a way to remove fields that are _only_ accessed (and nulled out) in
the Dispose method.

However, we were running into a problem with determining if a field was marked
by the linker: if the field is in a generic type, and that field was not
marked by the linker, the linker might have actually removed the field from
the containing type before we're processing the Dispose methods, and we'd find
a null field definition where no null field definition was expected
(eventually resulting in an ArgumentNullException).

Fix this by treating a null field definition as an unmarked field.

Also add a test.

Fixes https://github.com/xamarin/xamarin-macios/issues/16957.
2022-12-07 15:53:15 +01:00
Rolf Bjarne Kvinge 294314a518
[autoformat] Add the rest of the repository. (#16974) 2022-12-07 09:13:36 +01:00
Rolf Bjarne Kvinge aa5444ff2b
[autoformat] Add all of src/. (#16958) 2022-12-06 11:07:43 +01:00
VS MobileTools Engineering Service 2 a201c4b3af
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7046351 (#16955)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-12-05 09:10:55 -06:00
Rolf Bjarne Kvinge 1c80823582
[autoformat] Add all of tests/. (#16857) 2022-12-05 08:23:34 +01:00
Rolf Bjarne Kvinge 84dd56cd08
[devops] Become paranoid about making sure there are no artifacts around from previous builds. (#16903) 2022-12-01 18:25:40 +01:00
TJ Lambert af965ceddc
[Localization] Set OneLocBuild Task to not delete Lego Branch (#16909)
In our localization process, the Loc team builds the translations (in
the not-user-readable .lcl files) and merges them into the
'Localization' branch from a 'Lego/...' branch. After this happens, our
'Get Localization Translations' github action takes that commits and
creates a PR into main with those changes. It is really important that
this github action works because we will later delete the 'Localization'
branch and create a new one from the 'main' branch so that the branches
stay in sync.

There worked fine, but there is now a 'isDeletePrSourceBranchSelected'
input to the OneLocBuild task that defaults to true that deletes the
'Lego/...' branch right after the commit to 'Localization' is made. Due
to this, the github action cannot bring the commit to 'main' because the
'Lego/...' branch no longer exists.

The hope is that setting this input to false will successfully not
delete the 'Lego/...' branch allowing the rest of the flow to be
uninterrupted.

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-11-29 14:03:09 -06:00
Rolf Bjarne Kvinge 8ca5c8fb70
[tools] Rename a few lowercased types to fix compiler warning. (#16896)
Fixes:

    tools/common/PathUtils.cs(175,10): warning CS8981: The type name 'timespec' only contains lower-cased ascii characters. Such names may become reserved for the language.
    tools/common/PathUtils.cs(180,10): warning CS8981: The type name 'stat' only contains lower-cased ascii characters. Such names may become reserved for the language.
2022-11-29 09:57:37 +01:00
Rolf Bjarne Kvinge 5222ed4ba4
[dotnet-linker] Only enable ForceLoad for native binding libraries if that's actually requested in the binding library. Fixes #16861. (#16879)
We don't want to pass -force_load unnecessarily to the native linker, because
that defeats -dead_strip and makes apps bigger than necessary. So make sure to
honor the correct value for native libraries from binding libraries.

Ref https://github.com/xamarin/xamarin-macios/issues/16861.
2022-11-29 09:28:57 +01:00
Rolf Bjarne Kvinge 2c001cac1c
[tools] Exclude Driver.Concurrency from .NET. (#16898)
Fixes this compiler warning:

    tools/common/Driver.cs(302,14): warning CS0649: Field 'Driver.Jobs' is never assigned to, and will always have its default value 0
2022-11-29 08:35:02 +01:00
Rolf Bjarne Kvinge 5957b98085
[ObjCRuntime] Fix double dots in exception message. (#16890)
Don't add a dot after showing another exception message, because that another
exception message might also add a dot.

Example:

> An exception occurred while trying to invoke the function System.Void VisualStudioMac.AppDelegate.DidFinishLaunching (Foundation.NSNotification): Object of type 'CoreLocation.CLLocationManager' cannot be converted to type 'Foundation.NSNotification'..
2022-11-28 18:04:06 +01:00
Rolf Bjarne Kvinge 94c83d5595
[autoformat] Add the rest of the subdirectories in src/. (#16854) 2022-11-23 07:48:08 +01:00
VS MobileTools Engineering Service 2 96c39dcaf9
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 6990346 (#16843)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2022-11-22 10:35:04 -06:00
Rolf Bjarne Kvinge 09da0bdfeb
[autoformat] Add the MetalKit, MetalPerformanceShaders, MobileCoreServices, ModelIO, MultipeerConnectivity, NaturalLanguage and NearbyInteraction frameworks. (#16829) 2022-11-21 20:52:01 +01:00
Rolf Bjarne Kvinge 8ad6a27a12
[autoformat] Add the iAd, iTunesLibrary, WebKit, WatchKit and WatchConnectivity frameworks. (#16831) 2022-11-21 12:06:40 +01:00
Rolf Bjarne Kvinge 9ce7b75a42
[autoformat] Add the OpenGL framework. (#16833) 2022-11-21 12:05:46 +01:00
Rolf Bjarne Kvinge acca13229e
[apidiff] Generate a complete and valid html file for api-diff.html. (#16805)
This fixes an issue where emojis weren't rendered as such in some browsers,
because the browser would use a different character set than utf8.
2022-11-21 10:14:53 +01:00
Rolf Bjarne Kvinge 0076cd9920
[autoformat] Add .NET tests. (#16811) 2022-11-21 09:45:49 +01:00
Rolf Bjarne Kvinge 00e59771fe
[mtouch] Only package introspection dependencies if both iOS and legacy are enabled. (#16812)
Fixes this on the bots when iOS is not enabled even though legacy is:

    + make -C /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch package-introspection-dependencies.zip
    make: *** No rule to make target `../../runtime/.libs/iphonesimulator/libxamarin-debug.a', needed by `simlauncher32-sgen'.  Stop.
2022-11-21 09:45:21 +01:00
Rolf Bjarne Kvinge 1454fe6d13
[devops] Update according to renamed label. (#16813)
Also add 'run-packaged-macos-tests' to the labels we care about.

This fixes an issue where the label combination
'skip-all-tests,run-packaged-macos-tests' would not run any tests.
2022-11-21 09:43:25 +01:00
TJ Lambert ea74ef3396
[Localization] Change the Cron Job to trigger weekend scheduled build (#16835)
I have been testing these changes inside the xamarin-macios-translations
pipeline.
The last run was green (found
[here](https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=6984912&view=results)).
I had to use some placeholder code for the actual calls for the
OneLocBuild task that will communicate with the Loc Team but it reached
those points as expected!

This PR also rips out calls to the main-stage.yml template to only use
the stages necessary for the OneLocBuild run over the weekend!

I think these changes are set to see if the main branch can trigger the
OneLocBuild Task over the weekend build!

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-11-18 17:22:17 -06:00
Rolf Bjarne Kvinge ae140f245a
[autoformat] Add the PassKit, PdfKit, Photos, PhotosUI, PrintCore, QTKit, QuickLookUI, ReplayKit, SafariServices, ScreenCaptureKit, ScriptingBridge and SearchKit frameworks. (#16775) 2022-11-18 15:21:16 +01:00
Rolf Bjarne Kvinge 6812cc4b25
[static registrar] Handle metadata token lookup failure gracefully. (#16749)
Change the static registrar to fail gracefully if it can't compute a metadata token
for a given metadata item, and instead fall back to doing the lookup of whatever
we need at runtime.

This is a step towards making per-assembly static registrar working.

Ref: https://github.com/xamarin/xamarin-macios/issues/12067.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-18 08:00:36 +01:00
Rolf Bjarne Kvinge 0a53f3cd60
Add automatic support for not building iOS 32-bit stuff when min iOS version is >= 11.0 (#16746)
There are no changes for 32-bit watchOS, because watchOS support is likely to
go away completely anyways.
2022-11-18 07:59:46 +01:00
Rolf Bjarne Kvinge ce895603a5
[autoformat] Add the rest of tools. (#16801) 2022-11-17 17:18:34 -05:00
Rolf Bjarne Kvinge 2f538ba790
[autoformat] Add the Network, NetworkExtension and NotificationCenter frameworks. (#16795) 2022-11-17 17:12:32 -05:00
Rolf Bjarne Kvinge 8ad9df8523
[autoformat] Add generator tests. (#16800) 2022-11-17 17:04:21 -05:00
Rolf Bjarne Kvinge 3585c66844
[autoformat] Add common test files. (#16740) 2022-11-17 13:04:59 +01:00
Rolf Bjarne Kvinge 0a0076c6b0
[autoformat] Add the SceneKit framework. (#16780) 2022-11-17 13:04:46 +01:00
Rolf Bjarne Kvinge bd4394816a
[autoformat] Add UIKit. (#16779) 2022-11-17 13:02:14 +01:00
Rolf Bjarne Kvinge f8fcd0e827
[devops] Set BUILD_REVISION globally. (#16772)
A lot of code in our repo uses the presence of the BUILD_REVISION environment
variable to determine whether we're running in CI or not, so just set the
variable globally once so that it's always set - that way we never forget to
set it.

Note that the exact value of the variable doesn't matter, only that it's set.
Also change one place in the yaml that was depending on the contents of the
BUILD_REVISION to use the Azure Devops variable BUILD_SOURCEVERSION instead
(like we do everywhere else in our yaml code).
2022-11-16 15:08:48 +01:00