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

135 Коммитов

Автор SHA1 Сообщение Дата
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 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 ce895603a5
[autoformat] Add the rest of tools. (#16801) 2022-11-17 17:18:34 -05: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
Rolf Bjarne Kvinge 581d6b4218 Merge remote-tracking branch 'origin/main' into main-net7.0-xcode14.1 2022-11-03 09:34:32 +01:00
Rolf Bjarne Kvinge 1171587edc
[apidiff] Change to use dl.internalx.com with a GitHub PAT for API reference downloads. (#16548)
Update the download of API references to:

* Use `dl.internalx.com` links instead of `bosstoragemirror.blob.core.windows.net`
  links (the relative path stays the same).
* Require a GitHub PAT in order to download from dl.internalx.com. This PAT
  can either be provided through a file (recommended for local use) or through
  the environment.
* Document these changes.
2022-11-03 09:07:22 +01:00
Rolf Bjarne Kvinge cdc62aeae9 Merge remote-tracking branch 'origin/net7.0-xcode14.1' into main-net7.0-xcode14.1 2022-11-03 08:21:55 +01:00
Rolf Bjarne Kvinge 13e16e864f
[apidiff] Fix when to compare Microsoft.iOS.dll vs Microsoft.MacCatalyst.dll. (#16492)
We can only compare Microsoft.iOS.dll and Microsoft.MacCatalyst.dll when all of the following are true:

* .NET is enabled.
* iOS is enabled.
* Mac Catalyst is enabled.

So adjust (and simplify a bit) our logic accordingly.
2022-10-27 17:18:48 +02:00
VS MobileTools Engineering Service 2 a24847cca2
[net7.0] [api-diff] Add api-diff.md to the all-markdowns target. (#16392)
Backport of #16380

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-10-20 08:18:26 +02:00
Rolf Bjarne Kvinge e7a8314f3a
[api-diff] Add api-diff.md to the all-markdowns target. (#16380) 2022-10-19 14:39:51 +02:00
Rolf Bjarne Kvinge a79e2f87d3 Merge main into net7.0. 2022-10-18 08:12:46 +02:00
Rolf Bjarne Kvinge 46eb7ec267
[apidiff] Don't try to update legacy refs unless legacy is enabled. (#16363) 2022-10-18 08:11:24 +02:00
Rolf Bjarne Kvinge 5975ffd6f1 Merge main into net7.0. 2022-10-17 10:21:24 +02:00
Rolf Bjarne Kvinge 2069d6e28a
[apidiff] Skip more logic when legacy Xamarin isn't enabled. (#16347) 2022-10-17 09:26:48 +02:00
Rolf Bjarne Kvinge 15e9683a53 Bump main in net7.0. 2022-09-22 07:55:18 +02:00
VS MobileTools Engineering Service 2 306a00bb42
[main] [release/6.0.4xx-xcode14] [apidiff] Don't compare to legacy platforms that aren't included in the build. Fixes #16011. (#16032)
Don't try to compare legacy vs .NET for platforms that aren't included in the build, because this happens:

> make: *** No rule to make target 'output/diff/dotnet/legacy-diff/Microsoft.macOS.Ref/ref/net6.0/Microsoft.macOS.html', needed by 'output/api-diff.html'.  Stop.

We do this by not hardcoding the list of legacy platforms, but instead starting with DOTNET_PLATFORMS variable (which won't contain platforms that aren't included in the build), and then removing any .NET-only platforms (i.e. Mac Catalyst).

Also fix the `update-refs` target to not try to update refs for platforms that aren't enabled.

Fixes https://github.com/xamarin/xamarin-macios/issues/16011.


Backport of #16029

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-09-21 14:24:13 +02:00
Rolf Bjarne Kvinge 222c0ea824
[apidiff] Fix apidiff for .NET 7. (#15736)
This involved:

* Make the mono-api-info and mono-api-diff tools run with .NET 7 (instead of
  requiring .NET 6).
* Make the code cope with the fact that we're comparing .NET 6 assemblies (in
  a net6.0 directory) with .NET 7 assemblies (in a net7.0 directory).

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-08-24 11:47:41 +02:00
Rolf Bjarne Kvinge 414c5bf99e
Improve the API diff (#15020) 2022-06-09 15:47:00 +02:00
Rolf Bjarne Kvinge a1d0b6eba9
Make our local .NET the default .NET for the build. (#15086)
Make our local .NET the default .NET (in the root's global.json), and then if
a directory wants to use the system .NET, then that directory would have to
opt-in (using its own global.json).

This way we don't have to copy global.json/NuGet.config files around to run
tests with the correct .NET setup.
2022-06-07 10:11:02 +02:00
Rolf Bjarne Kvinge 009bd4ac01
[apidiff] Simplify code a bit to use templates and iterate over the selected platforms. (#15006) 2022-05-13 20:44:15 +02:00
Rolf Bjarne Kvinge 0caa8166c3
[apidiff] Remove detection of empty diffs for cases we know that will never happen. (#15007)
There will always be an API diff between:

* legacy Xamarin.*.dll assemblies and .NET Microsoft.*.dll assemblies.
* Microsoft.iOS.dll and Microsoft.MacCatalyst.dll

so don't bother with logic to detect empty diffs, just assume they will never be empty.
2022-05-13 20:43:39 +02:00
Rolf Bjarne Kvinge adb56501da
[apidiff] Switch to getting mono-api-[info|html] from rolfbjarne/api-tools. (#14965)
Switch to getting mono-api-[info|html] from a newly created repository we
control and where we can easily fix issues, since mono/mono isn't getting many
fixes anymore. In the past I know I've been reluctant to look at these tools,
just because of the hassle of setting things up to debug, and then the
paperwork to get the fixes in mono/mono, and then backported to the branch
where we need them.

This repo has a few other benefits:

* The tools are built using normal projects, which means they're easy to debug
  in an IDE (mono/mono's code has generated project files, which used in-tree versions
  of the BCL, and it got quite complex quite fast).
* One fewer dependency on the mono archive, so we're getting closed to be able
  to drop it completely when we drop support for legacy Xamarin.
* #13669 is already fixed there.
* It contains a few other misc fixes.

Fixes https://github.com/xamarin/xamarin-macios/issues/13669.
2022-05-11 22:01:39 +02:00
Rolf Bjarne Kvinge 1be1d746d6
[apidiff] Fix comparison of assemblies with different names. (#14964)
When we compare assemblies with different names (such as Xamarin.iOS vs
Microsoft.iOS, or Microsoft.iOS vs Microsoft.MacCatalyst), we need to adjust
one the xml definitions to match the other with regards to the assembly name.
2022-05-10 14:22:30 +02:00
Rolf Bjarne Kvinge 69662c94e6
[apidiff] Ignore inherited interfaces. (#14960)
We only care about what each type does, not what any base types might have
done (nothing we can do about that anyway).
2022-05-10 09:04:20 +02:00
Rolf Bjarne Kvinge b08a0f91db
[apidiff] Use variables to reduce code duplication. (#14935)
This also makes it easier to switch to .NET 5(+) versions of mono-api-info and mono-api-html
when that happens.
2022-05-09 22:12:03 +02:00
Rolf Bjarne Kvinge 8074f20aec
[apidiff] Pass full paths to mono-api-info and mono-api-html. (#14917)
Makes it easier to copy-paste commands to debug them with an IDE.
2022-05-09 09:06:46 +02:00
Rolf Bjarne Kvinge 06e76a61e7
[apidiff] Use DOTNET_TFM instead of hardcoding 'net6.0'. (#14909) 2022-05-06 08:15:37 +02:00
TJ Lambert 188a35d879
[ApiDiffs] More renaming to enable ApiDiffs (#14187)
There was a large change to rename a lot of our Xamarin assemblies to Microsoft
ie) Xamarin.iOS -> Microsoft.iOS

There is a mismatch with some of the prerequisites in our tools/apidiff/Makefile where dependencies 
are looking for ...Microsoft.iOS... but they are still named ...Xamarin.iOS...

This PR takes any remaining "Xamarin" names and changes them to "Microsoft" for all dotnet related rules.
We will also change other dotnet rules to use the new naming convention of "macOS" and "tvOS"

The only exception is to the Xamarin.PLATFORM.dll's coming from the zip - those remain as Xamarin.iOS.dll

We should expect to see the gists showing up in ApiDiffs from this PR!

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-02-21 10:39:07 +01:00
Rolf Bjarne Kvinge e25163f573
[.NET] Rename our product assemblies. Fixes #13748. (#13847)
Rename our product assemblies to:

* Microsoft.iOS.dll
* Microsoft.tvOS.dll
* Microsoft.macOS.dll
* Microsoft.MacCatalyst.dll

This makes it easy to distinguish between legacy Xamarin and .NET whenever the
product assembly is mentioned, and I've also chosen the platform part of the
name to match how the platforms are named elsewhere (this also makes it
possible to simplify our build logic, since we can remove a lot of special
casing).

Fixes https://github.com/xamarin/xamarin-macios/issues/13748.
2022-02-16 21:30:32 +01:00
TJ Lambert b72ef031f7
[ApiDiff] Add Current PR Diffs in a similar style as API Diffs (#13512) 2021-12-14 22:19:36 -06:00
Manuel de la Pena 598261e73d
[Make] Remove targets that are not longer needed and dependencies. (#13485) 2021-12-03 11:37:01 -05:00
Rolf Bjarne Kvinge 006bb5a7a0
[apidiff] Remove logic referencing the Mac Catalyst version of Xamarin.iOS.dll. (#13476)
We don't create a Mac Catalyst version of Xamarin.iOS.dll anymore, so there's
nothing to run an api diff on.
2021-12-01 17:27:18 +01:00
Rolf Bjarne Kvinge 6ce8ac93c0 Merge remote-tracking branch 'origin/main' into src-remove-legacy-maccatalyst 2021-11-25 08:11:32 +01:00
tj_devel709 0865c816ce [ApiDiff] Remove other MacCatalyst references 2021-11-09 10:58:10 -06:00
Rolf Bjarne Kvinge ce132f781e
[api-diff] Bump to latest stable (xcode13.1 branch) + add support for different reference api urls for legacy iOS and Mac. (#13292)
* Update README with new releases.

* [api-diff] Bump to latest stable (xcode13.1 branch) + add support for different reference api urls for legacy iOS and Mac.

Also fix make logic to only have a single rule per hash, which avoids a few
make warnings about duplicate targets.
2021-11-08 16:15:58 +01:00
Rolf Bjarne Kvinge f0b72a004d
[apidiff] Fix rule to download reference assemblies. (#13174)
Make seems to ignore pattern rules without a recipe, so just add an empty
recipe for this pattern rule.

Fixes:

> make: *** No rule to make target `temp/downloads/dotnet-iOS-5315390/Microsoft.iOS.Ref/ref/net6.0/Xamarin.iOS.dll', needed by `references/dotnet/Microsoft.iOS.Ref/ref/net6.0/Xamarin.iOS.xml'.  Stop.
2021-10-29 15:51:55 +02:00
Rolf Bjarne Kvinge 8062817500 [apidiff] Remove API diff for legacy Xamarin.MacCatalyst. 2021-10-28 18:29:28 +02:00
TJ Lambert 560d777b92
[ApiDiffs] Applying the New Dotnet ApiDiffs to Github (#13027) 2021-10-22 10:25:33 -05:00
TJ Lambert 5819dc7a10
[ApiDiffs] Creating Api Diffs for the Dotnet Assemblies (#12886) 2021-10-15 12:04:35 -05:00
Manuel de la Pena 993c744347
[CI] Re-enable API and Generator diff. (#11187)
Use the jenkins script as a base to get the PAI & generator from stable
diff back to the CI. Comment is not perfect, but does provide the
required information. The comment can be improve in a later commit since
this is getting too large.
2021-04-29 17:53:06 -04:00
Sebastien Pouliot 3298f3b0b9
[apidiff] Skip _removed_ types when comparing Xamarin.iOS.dll between Catalyst and iOS assemblies (#10949)
We already have the _removed_ namespaces and listing all their types is
quite noisy which does not help reviewing changes/diff between the
assemblies.
2021-03-24 09:03:48 -04:00
Sebastien Pouliot 70c6154298
[apidiff] Compare Xamarin.iOS between iOS and MacCatalyst (#10924)
Xamarin.MacCatalyst ships a `Xamarin.iOS.dll` assembly that contains
forwarders (to `Xamarin.MacCatalyst.dll`) and stubs that throws
`PlatformNotSupportedException`.

This is used to help code compatibility between both platforms - but
that requires exposing an identical surface and the best way to ensure
this is to compare (and report) them using `apidiff`

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-22 15:04:30 -04:00
Sebastien Pouliot 500b3af912
[catalyst][tools] Add Xamarin.MacCatalyst to API diff (#10762)
This is now possible since our reference is now `d16-9` which has (very
early versions of) the Xamarin.MacCatalyst (and Xamarin.iOS stubs)
assemblies.

This will become more useful when
1. bots resume the generation of commit-by-commit API diff; and
2. a real baseline is defined for the catalyst API coverage

* Add the new links to the comment done by VSTS.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-03 19:41:00 -05:00
Rolf Bjarne Kvinge a6b55083ab
[apidiff] Fix range expression. (#8827)
The C# range expression is somewhat confusing: the lower bound is inclusive,
but the upper bound is exclusive. This means that [0..15] is 15 characters,
not the 16 characters we want here.

Fixes this during API comparison:

    System.ArgumentException: Byte array for GUID must be exactly 16 bytes long.
    Parameter name: b
      at System.Guid..ctor (System.ReadOnlySpan`1[T] b) [0x00111] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Guid.cs:66
      at System.Guid..ctor (System.Byte[] b) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Guid.cs:45
      at Merger.Process (System.String platform, System.String path, System.String os) [0x001d1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/apidiff/merger.cs:60
      at Merger.Main (System.String[] args) [0x00002] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/apidiff/merger.cs:94
    make[2]: *** [tvos-markdown] Error 1
2020-06-11 11:44:39 +02:00
Sebastien Pouliot 97d2504d51
[tools] Remove MD5 from tooling (#8769)
Note: affected tools are not included in the code shipping inside the SDK

Usage of deprecated cryptographic algorithms is not approved anymore,
even if not used for cryptographic purpose.

MD5 was used to create immutable GUID since it's output is 128bits which
is just what a GUID wants as it's input (16 bytes). The same can be
achieved (even if a bit slower) with a newer/longer hash function

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1128148
2020-06-04 22:14:13 -04:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge a495077533
[xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393)
This includes:

* 32-bit version of Xamarin.Mac.dll and OpenTK.dll
* XamMac.dll and XamMac.CFNetwork.dll
* 32-bit versions of the runtime libraries (libxammac.a and friends).
* 32-bit version of the partial static library for Xamarin.Mac.
* Classic support in the generator.

We still ship a few Classic files so that Visual Studio for Mac continue to detect that Xamarin.Mac is installed (otherwise VSfM won't open Classic projects, which makes it impossible to use the migration wizard).

This makes our build slightly faster.

Partial fix for #6300.
2019-07-15 10:19:24 -07:00
Rolf Bjarne Kvinge 72d7a8ad9b Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 07:25:03 +02:00
Rolf Bjarne Kvinge 0029417b31
[apidiff] Create the directory for the stamp file before trying to create files in it. (#6156)
Fixes this:

	[...]
    Updating apidiff references...
    /Applications/Xcode102.app/Contents/Developer/usr/bin/make -C ../../builds download
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    touch: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp: No such file or directory
    make: *** [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp] Error 1
    Failed to update apidiff references

from https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/10093/consoleText.
2019-05-29 05:58:38 -07:00