This repository has been archived by the owner on Oct 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
NameGenerator now honors the RegisterAttribute #482
Open
zgramana
wants to merge
7
commits into
mono:main
Choose a base branch
from
zgramana:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
86e4d8c
NameGenerator now honors the RegisterAttribute
zgramana e90825d
More robust handling of RegisterAttribute.
zgramana 31f9613
Added back missing null check in GetObjCName.
zgramana cd93f96
Errors.md: edits incorporating review feedback
zgramana 4f09d71
Merge branch 'master' of https://github.com/mono/Embeddinator-4000
zgramana 7d0135c
Merge branch 'master' of https://github.com/mono/Embeddinator-4000
zgramana 4f4eb77
Merge branch 'master' of https://github.com/mono/Embeddinator-4000
zgramana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,6 +217,53 @@ Selectors on the [NSObjectProtocol](https://developer.apple.com/reference/object | |
|
||
Note: The list of reserved selectors will evolve with new versions of the tool. | ||
|
||
<h3><a name="EM1060"/>Invalid `RegisterAttribute` found on class `T`. Expected the first constructor parameter to be of type `string` but found type `U` instead.</h3> | ||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
When either one or two arguments are passed into the constructor, the first must be of type `System.String` but in this case, some other type was provided instead. For this to happen, the `RegisterAttribute` did not come from Xamarin.iOS or Xamarin.Mac. | ||
|
||
If an argument was not also passed for named parameter "Name" then the class will be named according to the default convention. | ||
|
||
<h3><a name="EM1061"/>Invalid `RegisterAttribute` found on class `T`. Expected a constructor with either 1 or 2 parameters but found {argsCount} instead..</h3> | ||
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. Typo: two periods at the end of the sentence. |
||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
Either one or two arguments are passed into the constructor, the first must be of type `System.String`. In this case, {argsCount} were found instead. For this to happen, the `RegisterAttribute` did not come from Xamarin.iOS or Xamarin.Mac. | ||
|
||
If an argument was not also passed for named parameter "Name" then the class will be named according to the default convention. | ||
|
||
<h3><a name="EM1062"/>Invalid `RegisterAttribute` found on class `T`. Conflicting values specified for `Name`, using value of named parameter: '{propVal}' instead of constructor parameter: '{name}'.</h3> | ||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
However, two conflicting values were given for 'Name': one as a positional argument, the other as a named parameter. For example, consider: `[Register("myFoo", Name = "foo")]`. | ||
|
||
The value of the named parameter, 'foo' will be used instead of value provided to the positional parameter: 'myFoo'. If that is not the value intended, remove the named argument. | ||
|
||
<h3><a name="EM1063"/>Invalid `RegisterAttribute` found on class `T`. Named parameter `SkipRegistration` is not supported and will be ignored.</h3> | ||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
Users already familiar with the `RegisterAttribute` might expect `SkipRegistration` to function is it does in Xamarin.iOS or Xamarin.Android. However, this is unsupported and the value of `SkipRegistration` will be ignored. | ||
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. I'm not sure 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. Yes, I did, thanks for catching that. My fingers seem to have their own L4 cache… |
||
|
||
This warning is informational only. If a custom class name was also passed either via positional argument or a named argument, then the value provided will still be used. | ||
|
||
<h3><a name="EM1064"/>Invalid `RegisterAttribute` found on class `T`. Named parameter {propName} is not supported and will be ignored.</h3> | ||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
The `RegisterAttribute` decorating class `T` included named parameters which were unexpected and unsupported. For this to happen, the `RegisterAttribute` did not come from Xamarin.iOS or Xamarin.Mac. | ||
|
||
This warning is informational only. If a custom class name was also passed either via positional argument or a named argument, then the provided value will still be used. | ||
|
||
<h3><a name="EM1065"/>Invalid `RegisterAttribute` found on class `T`. No name argument for was provided to the constructor via positional or named parameters. Will use the default class naming convention instead.</h3> | ||
|
||
This is a **warning** that the class `T` was decorated with a `RegisterAttribute`, indicating the author wishes to rename the name of generated objective-c class. | ||
|
||
However, no value was actually provided to the attribute. This can happen when an attribute is provided without any arguments (`[Register]`). | ||
|
||
The class will be named as if it had not been decorated with `RegisterAttribute` to begin with. | ||
|
||
<!-- 2xxx: code generation --> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Minor: use proper casing
Objective-C
instead of all lowercase (there are also more cases below).