-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Tizen backend #1546
Add Tizen backend #1546
Conversation
Howdy @rookiejava thank-you so much for your contribution. I've noticed on your github profile that you have done some work on the tizen platform before. How well do you know the platform? Do you work at Samsung? We are looking for a platform lead. I'm happy to work with you, pair with you and video call with you to discuss the broader picture. Last I was aware was that .net ++ tizen was immature and it wasn't possible to actually target the platform with nuget (even though the tfm is defined) - has this changed? |
@ghuntley Yes. The latest vesrion of Tizen (Tizen 4.0 M2), that offially supports .NET, was released in the last month. For more details, see https://developer.tizen.org/tizen/release-notes/tizen-4.0-public-m2. |
@rookiejava and @ideallee we are looking for two people (you?!) to join the core team of ReactiveUI and help shape the future of Tizen. See https://reactiveui.net/team/ for specifics and if this is of interest to please join us over in https://reactiveui.net/slack at https://reactivex.slack.com/archives/CAK67UA7M/p1526040674000046 Tizen is something we really want to add in Splat, ReactiveUI and Akavache. Let's do it (soon - like next release?)
|
This branch has been updated and is almost ready for merge. I'm having some difficulties with EventGenerator and tizen. Any help would be appreciated. Parking this for now. Repro:
|
@ghuntley As for this issue, I and my colleague (@WonyoungChoi) took a look inside what happend. And we found there is a bug on ReactiveUI/src/EventBuilder/Cecil/EventTemplateInformation.cs Lines 39 to 47 in 10b7797
According to above logic, if real type name contains kvp name ('T', 'U', 'R'), it replaced into real type name. As a result, the below 2 cases replaced unintended.
Obviously, this is not a bug on only for Tizen, but everywhere. So, I'd like to recomend a) fix EventTemplateInformation correctly for generic instance type |
I've tweaked it a little bit and build successfully. |
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.
One extra little change I think is worth doing, can you add to the Directory.build.targets
an entry for tizen, even if it doesn't do anything at the moment?
{"System.Boolean`1", "Boolean"}, | ||
|
||
|
||
{"System.EventHandler", "EventHandler"}, |
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.
I'm not sure the tizen40 comment is that clear, or necessarily adds that much
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.
Well, I did not make this change, but I've fixed unnecessary blanks and comments.
{"Tizen.NUI.EventHandlerWithReturnType`1", "Tizen.NUI.EventHandlerWithReturnType"}, | ||
{"Tizen.NUI.EventHandlerWithReturnType`2", "Tizen.NUI.EventHandlerWithReturnType"}, | ||
{"Tizen.NUI.EventHandlerWithReturnType`3", "Tizen.NUI.EventHandlerWithReturnType"}, | ||
|
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.
Bonus whitespace
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.
I did not make this change, but I've fixed unnecessary blanks and comments.
}; | ||
|
||
private static string RenameBogusWinRTTypes(string typeName) | ||
private static string RenameBogusTypes(string typeName) |
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.
👍
@@ -43,7 +65,12 @@ private static string GetEventArgsTypeForEvent(EventDefinition ei) | |||
type.GenericParameters.Zip(generic.GenericArguments, (name, actual) => new { name, actual })) { | |||
var realType = GetRealTypeName(kvp.actual); | |||
|
|||
ret = ret.Replace(kvp.name.FullName, realType); | |||
var temp = ret.Replace(kvp.name.FullName, realType); |
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.
I'm not sure I quite get this change, shouldn't we be replacing type names for multiple generic type arguments?
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.
This is a fix to resolve the potential issues (to avoid unintended replacement) mentioned above with minimal changes. It's nothing more, nothing less.
src/EventBuilder/Platforms/Tizen.cs
Outdated
|
||
var elmSharp = Directory.GetFiles(packageUnzipPath, "ElmSharp*.dll", SearchOption.AllDirectories); | ||
|
||
foreach (var assembly in elmSharp) { |
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.
Assemblies.AddRange(elmSharp);
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.
I did not make this change, but I've updated it anyway.
src/EventBuilder/Platforms/Tizen.cs
Outdated
(exception, timeSpan, context) => { | ||
Log.Warning( | ||
"An exception was thrown whilst retrieving or installing {packageName}: {exception}", | ||
_packageName, exception); |
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.
The string interpolations here (and ln22 and ln42) need a $ at the start of the string, e.g. ln 58.
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.
I did not make this change, but I've fixed anyway.
@olevett I've also added tizen to |
@ghuntley could you review and merge this? |
Thanks @rookiejava! |
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
There is no tizen as a backend platfom of ReactiveUI
What is the new behavior (if this is a feature change)?
Tizen has been added as a backend platform of ReactiveUI
What might this PR break?
None
Please check if the PR fulfills these requirements
Other information:
This PR is a latest revision of #1387. And, this PR contains only the minumum requrirements to support Tizen. So, implementations that need to work correctly (like android, iOS), should be required through different PRs.