Coder Social home page Coder Social logo

Comments (8)

maxkatz6 avatar maxkatz6 commented on June 16, 2024 1

That's mostly by design, as we wanted to keep non-ref assemblies with no changes. Making it possible to access private APIs if needed (for example, if somebody writes a custom backend).

But that's not ideal situation. Yes.

Alternative idea was to use C# analyzers, which would work better in this scenario. But won't support F# or other non-C# languages.

from avalonia.

robloo avatar robloo commented on June 16, 2024

Personally, I think it's best to allow this usage. It's a good middle road: you get the warning telling you not to use the API. If you need it or know better you can override.

from avalonia.

colejohnson66 avatar colejohnson66 commented on June 16, 2024

I would be fine with that as well, but I'd expect an analyzer warning I can silence. With the current setup, Rider shows an error that I can't get rid of.

from avalonia.

maxkatz6 avatar maxkatz6 commented on June 16, 2024

With the current setup, Rider shows an error

As it should.

that I can't get rid of.

<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>

from avalonia.

colejohnson66 avatar colejohnson66 commented on June 16, 2024

I think my gripe is that it's an error, not a warning. Yet, it still behaves like a warning. I'm fine with Rider flagging usage, but not in a way that abuses ref assemblies.

For example, for #8266, I was told to try reimplementing LinearGradientBrush myself with some changes to test a potential fix. However, the error in Rider led me to believe that I couldn't, so I didn't even try. If it was instead a warning about an "unstable" interface, I could've just ignored it to try.

Also, that property is not documented anywhere on the website.

from avalonia.

maxkatz6 avatar maxkatz6 commented on June 16, 2024

Also, that property is not documented anywhere on the website.

Correct. We don't want users to rely on this property, as these APIs are unstable and can break in minor releases. Still, this option exists.

from avalonia.

kekekeks avatar kekekeks commented on June 16, 2024

This is rather interesting. Previously Roslyn was using reference assemblies for compilation and the build would fail.
Perhaps something got changed in .NET SDK?

from avalonia.

kekekeks avatar kekekeks commented on June 16, 2024

Actually, CoreCompile is being fed with 11.0.0/ref/net6.0/Avalonia.dll, not sure why compiler ignores the internal interface member there.

from avalonia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.