Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into mono-2018-08
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdageek committed Oct 10, 2018
2 parents d063c53 + 6f2ebed commit cef512d
Show file tree
Hide file tree
Showing 151 changed files with 2,977 additions and 1,948 deletions.
26 changes: 9 additions & 17 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@ include $(TOP)/mk/subdirs.mk
-include $(TOP)/Make.config.inc
$(TOP)/Make.config.inc: $(TOP)/Make.config
@rm -f $@
@printf "IOS_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.config HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
@printf "MAC_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.config HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
@printf "IOS_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep IOS_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
@printf "MAC_COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep MAC_PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
@if which ccache > /dev/null 2>&1; then printf "ENABLE_CCACHE=1\nexport CCACHE_BASEDIR=$(abspath $(TOP)/..)\n" >> $@; echo "Found ccache on the system, enabling it"; fi
@if test -d $(TOP)/../maccore; then printf "ENABLE_XAMARIN=1\n" >> $@; echo "Detected the maccore repository, automatically enabled the Xamarin build"; fi

include $(TOP)/Make.versions

PACKAGE_HEAD_REV=$(shell git rev-parse HEAD)

#
# /!\ README /!\
#
# A release branch requires updating:
#
# IOS_PACKAGE_VERSION (major/minor #)
# MAC_PACKAGE_VERSION (major/minor #)
# PACKAGE_VERSION_REV (set to 0 and increment for service releases or previews)
# (and updating the same on master as well, to next version)
# A release branch requires updating some variables.
# This is done in Make.versions, not here.
#

ifeq ($(BRANCH_NAME),)
Expand All @@ -30,19 +28,14 @@ else
CURRENT_BRANCH:=$(BRANCH_NAME)
endif

# TODO: reset to 0 after major/minor version bump (SRO) and increment for service releases and previews
# Note: if not reseted to 0 we can skip a version and start with .1 or .2
PACKAGE_VERSION_REV=0

IOS_PRODUCT=Xamarin.iOS
IOS_PACKAGE_NAME=Xamarin.iOS
IOS_PACKAGE_NAME_LOWER=$(shell echo $(IOS_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")
# NEVER customize IOS_PACKAGE_VERSION itself, other parts (mtouch, web updater) are using the IOS_PACKAGE_VERSION_* variables
IOS_PACKAGE_VERSION=12.3.$(PACKAGE_VERSION_REV).$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_REV:=$(word 3, $(subst ., ,$(IOS_PACKAGE_VERSION)))
IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=10.0
Expand Down Expand Up @@ -264,10 +257,9 @@ MAC_PRODUCT=Xamarin.Mac
MAC_PACKAGE_NAME=xamarin.mac
MAC_PACKAGE_NAME_LOWER=$(shell echo $(MAC_PACKAGE_NAME) | tr "[:upper:]" "[:lower:]")

MAC_PACKAGE_VERSION=5.1.$(PACKAGE_VERSION_REV).$(MAC_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION_MAJOR=$(word 1, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MINOR=$(word 2, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_REV=$(PACKAGE_VERSION_REV)
MAC_PACKAGE_VERSION_REV=$(word 3, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_BUILD=$(word 4, $(subst ., ,$(MAC_PACKAGE_VERSION)))
MAC_PACKAGE_VERSION_MAJOR_MINOR=$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR)
MAC_PACKAGE_UPDATE_ID=$(shell echo $(subst ., ,$(MAC_PACKAGE_VERSION).$(MAC_PACKAGE_VERSION_BUILD)) | awk '{printf "2%02d%02d%02d%03d",$$1,$$2,$$3,$$4}')
Expand Down
47 changes: 47 additions & 0 deletions Make.versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# A release branch requires updating the following two variables at the bottom of this file:
#
# IOS_PACKAGE_VERSION (major/minor/revision #)
# MAC_PACKAGE_VERSION (major/minor/revision #)
#
# Update version numbers on master as well, to the next version
#

#
# ** Version numbers **
#
# Versions are defined as: Major.Minor.Revison.Build
#
# Major/minor (first/second numbers - max 2 digits each):
# - Bump for major/minor releases.
#
# Revision (third number - max 2 digits):
# - Reset to 0 after a major or minor bump (do not use 99 for Xcode preview
# branches (use 0 instead), because otherwise we can't bump it further if
# needed).
# - Bump for service releases and previews.
# - Bump if commit distance becomes > 999.
# - Can also be bumped for other reasons (in particular there's no correlation
# between Preview/Service Release #X and Revision #Y).
# - Bumping revision to a high enough number to make it clear that there's
# no correlation is a valid reason to bump.
# - The revision must be bumped at the same time for both iOS and Mac
# (otherwise the commit distance will differ).
# - Also bump if the [IOS|MAC]_PACKAGE_VERSION lines change for any other
# reason (otherwise we end up with repeating version numbers, since the
# commit distance would restart at 0, while the other numbers wouldn't
# change).
# - Any other problem can also usually be solved by bumping the revision.
# - Do not refactor the revision to a separate variable, because the reason
# bumping the revision is a general solution for many problems is that it
# also resets the commit distance (which wouldn't happen if the revision was
# refactored to a separate variable).
#
# Build (fourth number - max 3 digits):
# - Automatically calculated as the number of commits since the last time any
# of the other three numbers changed (technically since the corresponding
# line changed in git).
#

IOS_PACKAGE_VERSION=12.5.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=5.5.1.$(MAC_COMMIT_DISTANCE)
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,19 @@ world: check-system

.PHONY: check-system
check-system:
@if [[ "x$(IOS_COMMIT_DISTANCE)" != "x$(MAC_COMMIT_DISTANCE)" ]]; then \
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are different.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
exit 1; \
elif (( $(IOS_COMMIT_DISTANCE) > 999 || $(MAC_COMMIT_DISTANCE) > 999 )); then \
echo "$(COLOR_RED)*** The commit distance for Xamarin.iOS ($(IOS_COMMIT_DISTANCE)) and/or Xamarin.Mac ($(MAC_COMMIT_DISTANCE)) are > 999.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** To fix this problem, bump the revision (the third number) for both $(COLOR_GRAY)IOS_PACKAGE_NUMBER$(COLOR_RED) and $(COLOR_GRAY)MAC_PACKAGE_NUMBER$(COLOR_RED) in Make.versions.$(COLOR_CLEAR)"; \
echo "$(COLOR_RED)*** Once fixed, you need to commit the changes for them to pass this check.$(COLOR_CLEAR)"; \
exit 1; \
fi
@./system-dependencies.sh
@echo "Building Xamarin.iOS $(IOS_PACKAGE_VERSION) and Xamarin.Mac $(MAC_PACKAGE_VERSION)"

$(DIRECTORIES):
$(Q) mkdir -p $@
Expand Down
25 changes: 14 additions & 11 deletions builds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1179,17 +1179,15 @@ $(eval $(call DeviceBuildTemplate,arm64,target64,target64,$(ARM64_ARCH_CONFIGURE
endif

ifdef INCLUDE_DEVICE
ifdef INCLUDE_IOS
iphoneos:: setup-iphoneos build-iphoneos install-iphoneos
device:: iphoneos
clean-device: clean-iphoneos
install-device: install-iphoneos

# this needs to be here because the normal usage of this makefile is "make all install", but nothing actually lists the -iphoneos targets as dependencies.
ifdef INCLUDE_IOS
install-local:: install-iphoneos
all-local:: install-iphoneos
endif
endif

LIBMONO_PROFILER_IPHONEOS_DYLIB=$(IOS_DESTDIR)$(IPHONEOS_PREFIX)/lib/libmono-profiler-log.dylib

Expand Down Expand Up @@ -1244,6 +1242,9 @@ $(IOS_DESTDIR)$(IPHONEOS_SDK)/Frameworks/Mono.framework/Info.plist: Mono.framewo

install-iphoneos:: $(IPHONEOS_TARGETS)

endif # INCLUDE_IOS
endif # INCLUDE_DEVICE

#
# Watch device build
#
Expand All @@ -1262,8 +1263,6 @@ targetwatch: build-targetwatch install-watchos
watchos:: targetwatch

.PHONY: targetwatch
endif
endif

.stamp-build-targetwatch: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targetwatch $(SDK_ARGS)
Expand Down Expand Up @@ -1356,6 +1355,9 @@ $(BUILD_DESTDIR)/targetwatch/tmp-lib/Mono: $(BUILD_DESTDIR)/targetwatch/lib/libm

install-watchos: $(WATCHOS_TARGETS)

endif # INCLUDE_DEVICE
endif # INCLUDE_WATCH

#
# TV device build
#
Expand All @@ -1374,8 +1376,6 @@ targettv: build-targettv install-tvos
tvos:: targettv

.PHONY: targettv
endif
endif

.stamp-build-targettv: $(MONO_PATH)/configure $(SDK_CONFIG) $(MONO_DEPENDENCIES)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-targettv $(SDK_ARGS)
Expand Down Expand Up @@ -1467,6 +1467,9 @@ $(BUILD_DESTDIR)/targettv/tmp-lib/Mono: $(BUILD_DESTDIR)/targettv/lib/libmonosge

install-tvos: $(TVOS_TARGETS)

endif # INCLUDE_DEVICE
endif # INCLUDE_TVOS

#
# Cross compilers
#
Expand Down Expand Up @@ -1563,17 +1566,13 @@ offsets-tool: $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe
##
define iOSCrossTemplate

ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
$(1): build-$(1) install-$(1)

.PHONY: build-$(1) install-$(1)

build:: build-$(1)
install-local:: install-$(1)
clean-local:: clean-$(1)
endif
endif

.stamp-build-$(1): .stamp-build-llvm $(MONO_PATH)/configure $(MONO_PATH)/tools/offsets-tool/MonoAotOffsetsDumper.exe $(MONO_DEPENDENCIES) $(SDK_CONFIG)
$(MAKE) -C $(SDK_BUILDDIR) package-ios-$(1) $(SDK_ARGS) $(if $(5), XCODE_DIR=$(5))
Expand All @@ -1597,6 +1596,10 @@ clean-$(1): $(SDK_CONFIG)

endef

ifdef INCLUDE_IOS
ifdef INCLUDE_DEVICE
$(eval $(call iOSCrossTemplate,cross32,llvm32,arm-darwin-mono-sgen,arm-darwin-mono-sgen,$(XCODE94_DEVELOPER_ROOT)))
$(eval $(call iOSCrossTemplate,cross64,llvm64,arm64-darwin-mono-sgen,aarch64-darwin-mono-sgen))
$(eval $(call iOSCrossTemplate,crosswatch,llvm32,armv7k-unknown-darwin-mono-sgen,armv7k-unknown-darwin-mono-sgen,$(XCODE94_DEVELOPER_ROOT)))
endif
endif
34 changes: 17 additions & 17 deletions docs/website/generator-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dateupdated: 2017-06-26
E.g. parameters, environment

<!-- 0xxx: the generator itself, e.g. parameters, environment -->
### <a name="BI0000"/>BI0000: Unexpected error - Please fill a bug report at https://bugzilla.xamarin.com
### <a name="BI0000"/>BI0000: Unexpected error - Please fill a bug report at https://github.com/xamarin/xamarin-macios/issues/new

An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with as much information as possible, including:
An unexpected error condition occurred. Please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with as much information as possible, including:

* Full build logs, with maximum verbosity
* A minimal test case that reproduce the error
Expand All @@ -37,7 +37,7 @@ An invalid target framework was passed using the --target-framework argument. Pl

### <a name='BI0086'/>BI0086: A target framework (--target-framework) must be specified when building for *.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

# BI1xxx: code generation

Expand Down Expand Up @@ -100,7 +100,7 @@ Please go to [[FieldAttribute]](https://developer.xamarin.com/guides/cross-platf

### <a name='BI1027'/>BI1027: Support for ZeroCopy strings is not implemented. Strings will be marshalled as NSStrings.

### <a name='BI1028'/>BI1028: Internal sanity check failed, please file a bug report (http://bugzilla.xamarin.com) with a test case.
### <a name='BI1028'/>BI1028: Internal sanity check failed, please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1029'/>BI1029: Internal error: invalid enum mode for type '*'

Expand Down Expand Up @@ -134,39 +134,39 @@ Please go to [[FieldAttribute]](https://developer.xamarin.com/guides/cross-platf

### <a name='BI1046'/>BI1046: The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}.

### <a name='BI1047'/>BI1047: Unsupported platform: *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
### <a name='BI1047'/>BI1047: Unsupported platform: *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1048'/>BI1048: Unsupported type * decorated with [BindAs].

### <a name='BI1049'/>BI1049: Could not unbox type * from * container used on * member decorated with [BindAs].

### <a name='BI1050'/>BI1050: [BindAs] cannot be used inside Protocol or Model types. Type: *

### <a name='BI1051'/>BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
### <a name='BI1051'/>BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1052'/>BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.
### <a name='BI1052'/>BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1053'/>BI1053: Internal error: unknown target framework '*'.

### <a name='BI1054'/>BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
### <a name='BI1054'/>BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1055'/>BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.
### <a name='BI1055'/>BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1056'/>BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
### <a name='BI1056'/>BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1057'/>BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://bugzilla.xamarin.com) with a test case.
### <a name='BI1057'/>BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1058'/>BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.
### <a name='BI1058'/>BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case.
This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.

### <a name='BI1059'/>BI1059: Found * * attributes on the member *. At most one was expected.

Expand Down
Loading

0 comments on commit cef512d

Please sign in to comment.