-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build bgen and the product assemblies using/referencing netcore3.1. #8070
Changes from 14 commits
0500cd8
eef4ea7
5135ce2
d242066
d659a86
72626bd
11fb1fd
4648db4
9b65dd5
342e60c
36db0dd
2fa6989
7a1a8bb
1fc2f8e
0c10206
398989a
7bef994
d7d9bae
5c323ce
187a5d7
7108f59
2f2c8c3
1acba86
53b54fa
dac68f3
067c88e
f56fe80
5dda97a
800d63b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,20 @@ download-mono: downloads/$(basename $(MONO_IOS_FILENAME)) downloads/$(basename $ | |
|
||
downloads/$(basename $(MONO_IOS_FILENAME)): MONO_URL=$(MONO_IOS_URL) | ||
downloads/$(basename $(MONO_MAC_FILENAME)): MONO_URL=$(MONO_MAC_URL) | ||
downloads/$(DOTNET_BCL_REF_NAME): MONO_URL=$(DOTNET_BCL_REF_URL) | ||
|
||
include $(TOP)/mk/colors.mk | ||
|
||
DOWNLOADS = \ | ||
downloads/$(MONO_IOS_FILENAME) \ | ||
downloads/$(MONO_MAC_FILENAME) \ | ||
downloads/$(DOTNET_BCL_REF_NAME) \ | ||
|
||
# This target downloads the mono archives, there's one for Xamarin.iOS and one for Xamarin.Mac. | ||
# If doing many clean builds, it's possible to copy the downloaded zip file to ~/Library/Caches/xamarin-macios | ||
# to avoid having to download it every time. The zip files have to be copied manually, otherwise | ||
# we'd end up filling up a lot of hard drives around the world. | ||
downloads/$(MONO_IOS_FILENAME) downloads/$(MONO_MAC_FILENAME): | ||
$(DOWNLOADS): | ||
$(Q) mkdir -p downloads | ||
$(Q) echo "Downloading $(MONO_URL)..." | ||
$(Q) if test -f ~/Library/Caches/xamarin-macios/$(notdir $@); then \ | ||
|
@@ -49,9 +55,25 @@ downloads/%: downloads/%.7z | |
$(Q) mv [email protected] $@ | ||
$(Q) echo "Unzipped $*." | ||
|
||
downloads/%: downloads/%.nupkg | ||
$(Q) echo "Unzipping $*..." | ||
$(Q) rm -Rf [email protected] | ||
$(Q) unzip -d [email protected] $< | ||
$(Q) find [email protected] -exec touch {} + | ||
$(Q) mv [email protected] $@ | ||
$(Q) echo "Unzipped $*." | ||
|
||
.stamp-download-mono: download-mono $(TOP)/Make.config $(TOP)/mk/mono.mk | ||
$(Q) touch $@ | ||
|
||
DOTNET_DOWNLOADS = \ | ||
downloads/$(basename $(DOTNET_BCL_REF_NAME)) \ | ||
|
||
dotnet: $(DOTNET_DOWNLOADS) | ||
ifdef ENABLE_DOTNET | ||
all-local:: $(DOTNET_DOWNLOADS) | ||
endif | ||
|
||
clean-local:: | ||
$(Q) rm -Rf downloads .stamp-download-mono | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,11 +300,19 @@ private static void ThrowCannotWriteToDeflateStreamException() | |
throw new InvalidOperationException ("Writing to the compression stream is not supported."); | ||
} | ||
|
||
#if !DOTNET_TODO | ||
// DOTNET_TODO: TaskToApm is internal API in mscorlib, so we can't use it. | ||
// Although I'm not sure if we even need to override these methods, | ||
// the base class implementation works (but synchronously), | ||
// and the documentation recommends using ReadAsync instead. | ||
// If we decide to implement this, we could just copy the TaskToApm implementation: | ||
// https://github.com/microsoft/referencesource/blob/a7bd3242bd7732dec4aebb21fbc0f6de61c2545e/mscorlib/system/threading/Tasks/TaskToApm.cs | ||
public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) => | ||
TaskToApm.Begin(ReadAsync (buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); | ||
|
||
public override int EndRead (IAsyncResult asyncResult) => | ||
TaskToApm.End<int> (asyncResult); | ||
#endif // !DOTNET_TODO | ||
|
||
public override Task<int> ReadAsync (byte[] array, int offset, int count, CancellationToken cancellationToken) | ||
{ | ||
|
@@ -547,10 +555,13 @@ protected override void Dispose (bool disposing) | |
} | ||
} | ||
|
||
#if !DOTNET_TODO | ||
// DOTNET_TODO: See comment about TaskToApm elsewhere in this file. | ||
public override IAsyncResult BeginWrite (byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState) => | ||
TaskToApm.Begin(WriteAsync (array, offset, count, CancellationToken.None), asyncCallback, asyncState); | ||
|
||
public override void EndWrite (IAsyncResult asyncResult) => TaskToApm.End (asyncResult); | ||
#endif // !DOTNET_TODO | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, I think it is safe to remove since we do not change the API. is less efficient but users should have moved (if we do have any of them in this API). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the base implementation works then let's add |
||
|
||
public override Task WriteAsync (byte[] array, int offset, int count, CancellationToken cancellationToken) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this was a similar implementation to what it was done back in the day in the compression implementations of mono for zips. The APIs is not very used. If the base class implementation works (sync) is not a big issues since they should be using the Task version. I think it might be a good opportunity to get this out as outdated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is actually problematic. Sorry I didn't notice your comment and started new thread below.