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

66 Коммитов

Автор SHA1 Сообщение Дата
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
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 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 2069d6e28a
[apidiff] Skip more logic when legacy Xamarin isn't enabled. (#16347) 2022-10-17 09:26:48 +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 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
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 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
Alexander Köplinger b8b79b03cb Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 21:43:52 +02:00
Rolf Bjarne Kvinge 285511b424
[apidiff] Make temporary / stamp paths depend on APIDIFF_DIR. (#6145)
This fixes an issue with the api comparison since the api comparison fails if
it detects unexpected modified files: https://github.com/xamarin/xamarin-macios/pull/6133#issuecomment-496283224.

Putting the temporary files in APIDIFF_DIR makes sure the api comparison
doesn't see those files as unexpectedly modified.
2019-05-28 02:42:57 -07:00
Alexander Köplinger 48b3b82410 Merge remote-tracking branch 'upstream/master' into binary-artifacts
# Conflicts:
#	builds/Makefile
#	external/mono
2019-05-22 20:07:18 +02:00
Rolf Bjarne Kvinge 4d4215e25c
[apidiff] Fix a few issues with the apidiff when the mono hash or api diff url changes. (#6084)
* [apidiff] Add rule to get mono-api-info.exe and mono-api-html.exe.

This fixes an issue when bumping mono: when bumping mono, the already
downloaded mono archive isn't applicable (because we've changed to the
previous commit, which has the previous mono hash, whose archive hasn't been
downloaded).

So add a rule to get mono-api-info.exe and mono-api-html.exe, by downloading
the current mono archive.

* [apidiff] Change the name of the unzip stamp and download dir to contain the hash.

This way the logic doesn't get confused when the hash changes (or there's an
old unzip stamp in the directory), and things are downloaded again as
expected.

* [apidiff] Make make not delete temporary files.

Things end up confused if temporary files have been removed by make, but our
stamp file that the temporary files are still there is present.

* [apidiff] No need to make everything depend on the bundled zip.

If everything that needs the bundled zip already depends on it.

* [apidiff] Restore original hash before calculating api diff.

This makes it less annoying when the api diff calculation changes, because
with the previous behavior they were impossible to test in a PR, since any
changes wouldn't take effect until after the PR was merged.
2019-05-22 05:41:18 -07:00
Alexander Köplinger 247a6bf551 Switch to mono archive and remove submodule 2019-05-21 22:16:02 +02:00
Sebastien Pouliot c481aac216
[apidiff] Add q quick'n'dirty script to produce a diff between any two bundle.zip (#6050)
Use for producing API diff for release notes without waiting for a PR,
bots and/or approvals...

Also useful to produce API diff between any versions, not just between
the current revision and a baseline (last stable).
2019-05-15 12:46:38 -05:00
Rolf Bjarne Kvinge fcac64ad6e
[apidiff] Use mono-api-[info|html].exe from the mono archive. (#5990) 2019-05-06 07:31:03 +02:00
Rolf Bjarne Kvinge 290899b983
[apidiff] Unzip downloaded files into a temporary subdirectory. (#5983)
Before we unzip, we remove the target directory. This is a bad idea if the
target directory is also used for other things: in particular it breaks
parallel make if some other target tries to write to the temporary directory.

Instead unzip downloaded files into a subdirectory exclusively used by those
unzipped files, which means we can remove at will before unzipping.
2019-05-03 17:41:40 +02:00
Rolf Bjarne Kvinge cb1ead3bed Revert "[builds] Make the tools build use mono's packaged logic instead of our own. (#5962)" (#5971)
This reverts commit b72a0d9bc1.
2019-04-30 19:58:12 -04:00
Rolf Bjarne Kvinge 8d004e617e
[builds] Add support for using cached downloads of the mono archives from ~/Library/Caches. (#5961)
* [builds] Add support for using cached downloads of the mono archives from ~/Library/Caches.

* [apidiff] Add support for using cached downloads of apidiff bundle from ~/Library/Caches.
2019-04-30 15:56:38 +02:00
Rolf Bjarne Kvinge b72a0d9bc1
[builds] Make the tools build use mono's packaged logic instead of our own. (#5962)
* [builds] Move the facade check targets down in the Makefile.

Move the facade check targets below the declaration of their prerequisite
variables (*_BCL_TARGETS), since otherwise the prerequisite variable will be
empty when the facade check targets are read by make, they end up with no
prerequisites at all, and the targets fail.

* [builds] Make the tools build use mono's packaged logic instead of our own.

Make the 'tools64' build use mono's packaged build logic instead of our own.
This is the first step to consuming the BCL from the mono archive.

Also completely refactor the 'tools64' build by removing everything we don't
need and renaming it to 'bcl' (since that's more representative of what it
does).

* [apidiff] Unzip downloaded files into a temporary subdirectory.

Before we unzip, we remove the target directory. This is a bad idea if the
target directory is also used for other things: in particular it breaks
parallel make if some other target tries to write to the temporary directory.

Instead unzip downloaded files into a subdirectory exclusively used by those
unzipped files, which means we can remove at will before unzipping.

* [apidiff] Use mono-api-[info|html].exe from the mono archive.
2019-04-30 07:33:16 +02:00
Rolf Bjarne Kvinge 4967d6f516
[apidiff] Make temporary / stamp paths depend on APIDIFF_DIR. Fixes maccore#1522. (#5895)
This fixes an issue with the api comparison since the api comparison fails if
it detects unexpected modified files. Putting the temporary files in
APIDIFF_DIR makes sure the api comparison doesn't see those files as
unexpectedly modified.

Fixes https://github.com/xamarin/maccore/issues/1522.
2019-04-12 15:31:27 +02:00
Sebastien Pouliot 2eb178c7cd
[apidiff] Remove the `_*` noise in XM diffs (#5721)
Fix comparison so the XM profiles do not report _inexistent_ changes for `_Attribute`, `_EventInfo` and `_Exception`. That noise makes it harder to review the diffs (for us) and is incorrect in our published API diffs (for release notes).

Also
* Delete .unzip.stamp on clean
* Skip classic XM diff (binaries won't change)
2019-03-06 11:02:50 -05:00
Sebastien Pouliot 78859b97b8
[apidiff] Fix location for XI (when comparing), otherwise we get the full (not PR) diff (#5700) 2019-03-03 12:46:47 -05:00
Sebastien Pouliot 507d37eef6
[apidiff] Fix the comparison with the previous commit (#5690)
The removal of the XML files broke the comparison with the previous
commit. It did NOT fail the original PR because the targets were
in the previous commit.

And it will fail this PR because the previous commit still does not
have the targets - but it _should_ be fine, once merged, for all
future PR.

Fixes https://github.com/xamarin/maccore/issues/1452
2019-02-28 20:49:10 -05:00
Sebastien Pouliot ad3b70e9c7
[api-diff] Remove apidiff XML reference files. Fixes #4891 (#5663)
Instead download the assemblies (part of existing bundle.zip) of the
current release and generate the XML locally (no storage in github)
before doing the diff against the newer, just built, assemblies.

reference: https://github.com/xamarin/xamarin-macios/issues/4891
2019-02-27 08:59:53 -05:00