Skip to content
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

Generator - Add support for types with base type in another assembly #226

Merged

Conversation

TimLariviere
Copy link
Member

Add a cache of loaded assemblies in the generator to support types with one or more base types in other assemblies.
This allows for scenario where we want to use a custom type that extends the base Xamarin.Forms types.

"assemblies": [
    "packages/neutral/Xamarin.Forms/lib/netstandard1.0/Xamarin.Forms.Core.dll",
    "src/Fabulous.Core/bin/Release/netstandard2.0/Fabulous.Core.dll",
],
    {
      // Extends and replaces Xamarin.Forms.Entry
      "name": "Fabulous.DynamicViews.CustomEntry",
      "modelName": "Entry",
      "members": [
        {
          "name": "PropertyThatOnlyExistsInCustomEntry",
          "defaultValue": "null"
        },
        {
          "name": "Text",
          "defaultValue": "null"
        },

Currently if Mono.Cecil tries to load the base types of a custom control (Fabulous.Core.dll) that are found in another assembly (Xamarin.Forms.Core.dll), Mono.Cecil throws an exception because it can't find Xamarin.Forms.Core

The need comes from this issue: #225

@TimLariviere
Copy link
Member Author

Seems like Travis did not like my mistake when pushing the branch on fsprojects/Fabulous instead of my fork, and then deleting it.

@londospark
Copy link

Would it be worth me grabbing this fork for tonight's stream? I'm streaming in just over an hour and working with this would be really fun.

@TimLariviere
Copy link
Member Author

@garethhubball Yes, this would be a good way to validate these changes against a real example. :)

@TimLariviere TimLariviere merged commit 8328378 into fabulous-dev:master Nov 15, 2018
@TimLariviere TimLariviere deleted the generator-multi-assembly branch November 15, 2018 16:52
@TimLariviere TimLariviere mentioned this pull request Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants