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

3207 Коммитов

Автор SHA1 Сообщение Дата
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
Manuel de la Pena d307589ebb
[DevOps] Use the correct hash for the comment. (#16766)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-16 06:55:45 -05:00
Rolf Bjarne Kvinge 0140122668
[autoformat] Add the Security, SensorKit, Social, SpriteKit, StoreKit, SystemConfiguration, TVServices, VideoToolbox, Vision and WKWebKit frameworks. (#16763) 2022-11-16 07:38:18 +01:00
Manuel de la Pena 58a14e9231
[DevOps] Do not use ta vm for the pkgs upload due to its hdd size. (#16765)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-15 18:15:36 -05:00
Rolf Bjarne Kvinge ad55eb6efc
[devops] Skip a few steps if something goes wrong. (#16756)
There's no need to:

* Check for HD space.
* Make mlaunch verbose.
* Reset launchctl.

if something else already went wrong in a test run.
2022-11-15 18:20:27 +01:00
Rolf Bjarne Kvinge 8a62813e32
[dotnet-linker] Give a better exception message when unable to resolve an assembly reference. (#16750) 2022-11-15 17:43:28 +01:00
Rolf Bjarne Kvinge 4a626c2ac5
[autoformat] Add the IOSurface, ImageCaptureCore, ImageIO, ImageKit, Intents, JavaScriptCore, LocalAuthentication, MLCompute, MapKit, MediaAccessibility, MediaLibrary, MediaPlayer and MediaToolbox frameworks. (#16755) 2022-11-15 17:41:59 +01:00
Rolf Bjarne Kvinge 76c6c67fa8
[autoformat] Add the GLKit, GameController, GameKit, GameplayKit, HealthKit and HomeKit frameworks. (#16716) 2022-11-15 07:34:27 +01:00
Manuel de la Pena 0ed4ad3a26
[DevOps] Allow to pass extra dependencies for the build stage. (#16736)
Allow to add a dependency before our build. This is used in the unified
pipeline to try to download the binaries if it can rather than building
from scratch.

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-11-14 23:35:00 -05:00
Manuel de la Pena 363b6727ed
[DevOps] Forward forgotten parameters. (#16737)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-11-14 23:34:43 -05:00
Manuel de la Pena fc1b421f82
[DevOps] Write comments in the correct repo when we are not in self. (#16730)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-14 11:56:00 -05:00
Rolf Bjarne Kvinge 3b839e1551
[autoformat] Add msbuild tests. (#16717) 2022-11-14 08:58:59 +01:00
Rolf Bjarne Kvinge 6905e0b176
[apidiff] Fix comparison vs previous commit for .NET. (#16681)
When comparing with the previous commit, we can't use the TFM for the
stable version of .NET, since it may not be the same TFM used in the
previous commit.

Instead fetch the actual TFM from the checkout, and use that during the
api comparison.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-11-14 08:44:08 +01:00
Rolf Bjarne Kvinge a5a7f23494
[apidiff] Fix typo when loading AUTH_TOKEN_GITHUB_COM from a file. (#16722) 2022-11-14 08:06:12 +01:00
Manuel de la Pena 80c0e76218
[DevOps] Checkout the yaml repos to fix an issue with the working dir. (#16715)
Azure pipelines has this terrible design in which the path of the
checkout is different depending if you checkout a single repo or
several.

In this case, we have no issues on macios because we do know we have not
been checkout with anyother repo in the upload step, that is not the
case when working on the unified pipeline. Rather than adding some
complicated logic, we are going to be checking out the yaml templates so
that we have the same working directory structure.
2022-11-11 14:02:06 -05:00
Rolf Bjarne Kvinge 9fb6a4b309
[devops] Augment the install-workloads.sh script to make it easier to run locally. (#16698)
It's often desired to run the install-workloads.sh script locally, in order to
diagnose problems with it.

So improve it a bit by:

* Adding a few comments explaining things.
* Don't assume we're in the correct directory.
* Figure out BUILD_SOURCESDIRECTORY if it's not already set.
* Validate a bit and show more helpful errors.

Hopefully future me will be grateful!
2022-11-11 13:42:35 +01:00