Skip to content

Generated NotImplementedAttribute does not contain specific platform on types #4893

Closed

Description

@jeromelaban

Current behavior

The SymbolIcon type is marked as not implemented, even if members are implemented.

Expected behavior

The SymbolIcon is not marked as not implemented.

How to reproduce it (as minimally and precisely as possible)

Workaround

Anything else we need to know?

The API generator should determine if inner elements have been implemented and include the proper not implemented list, like the #if statement above.

Note for contributors

The code locations to update are referencing this block:

public void AppendIf(IndentedStringBuilder b)
{
var defines = new[] {
IsNotDefinedByUno(AndroidSymbol) ? AndroidDefine : "false",
IsNotDefinedByUno(IOSSymbol) ? iOSDefine : "false",
IsNotDefinedByUno(net461ymbol) ? net461Define : "false",
IsNotDefinedByUno(WasmSymbol) ? WasmDefine : "false",
IsNotDefinedByUno(SkiaSymbol) ? SkiaDefine : "false",
IsNotDefinedByUno(NetStdReferenceSymbol) ? NetStdReferenceDefine : "false",
MacOSSymbol == null ? MacDefine : "false",
};
b.AppendLineInvariant($"#if {defines.JoinBy(" || ")}");
}

Activity

  1. added
    kind/bug
    triage/untriaged
    project/core-tools 🛠️
    and removed
    triage/untriaged
    on Jan 13, 2021
  2. added
    difficulty/tbd
    on Feb 15, 2021
  3. added
    difficulty/starter 🚀
    and removed
    difficulty/tbd
    on Jun 2, 2021
  4. Youssef1313 commented on Aug 15, 2021

    @Youssef1313
    Member

    @jeromelaban @MartinZikmund Was this fixed in #6118?

  5. jeromelaban commented on Aug 23, 2021

    @jeromelaban
    MemberAuthor

    #6118 was specific to SymbolIcon, there a larger case for determining the platform list to include the fact that any of the members have been implemented.

  6. Youssef1313 commented on Aug 23, 2021

    @Youssef1313
    Member

    @jeromelaban I'm unable to run UWPSyncGenerator locally to be able to test and debug this. Here is the output:

    Generating for Uno.Foundation Windows.Foundation.FoundationContract
    Loading for : Uno.UWPSyncGenerator.Reference.csproj
    Searching for [Microsoft.CodeAnalysis.Features, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.CodeAnalysis.CSharp.Features, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.CodeAnalysis.VisualBasic.Features, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Loaded [Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/Microsoft.Build.Framework.dll]
    Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Loaded [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/Microsoft.Build.dll]
    Searching for [Microsoft.Build.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.Build.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Searching for [Microsoft.Build.Tasks.Core.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Users\PC\Desktop\uno\src\Uno.UWPSyncGenerator\bin\Debug]
    Loading for xamarinios10: Uno.Foundation.csproj
    [Failure] Msbuild failed when processing the file 'C:\Users\PC\Desktop\uno\src\Uno.Foundation\Uno.Foundation.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\Users\PC\.nuget\packages\msbuild.sdk.extras\3.0.22\Sdk\Sdk.props
    C:\Users\PC\.nuget\packages\msbuild.sdk.extras\3.0.22\Sdk\Sdk.props(7,3): warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildSdkResolver" failed to run. An item with the same key has already been added.
    C:\Users\PC\.nuget\packages\msbuild.sdk.extras\3.0.22\Sdk\Sdk.props(7,31): error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.

    Any idea what's going wrong?

  7. Youssef1313 commented on Aug 23, 2021

    @Youssef1313
    Member

    Edit: Editing the comment since I was incorrect :)

    Bug seems to be here:

    b.AppendLineInvariant($"[global::Uno.NotImplemented]");

    @jeromelaban Any instructions to run and debug the generator locally?

  8. jeromelaban commented on Aug 25, 2021

    @jeromelaban
    MemberAuthor

    @Youssef1313 you may find those here: #6856 (there's a small fix to get the generator running on VS2022 as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/starter 🚀kind/bugproject/core-tools 🛠️

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions