These are chat archives for AvaloniaUI/Avalonia

23rd
Sep 2017
Geoffrey Huntley
@ghuntley
Sep 23 2017 02:07
howdy folks, okay so i'm file -> newing up a avalonia project atm
Geoffrey Huntley
@ghuntley
Sep 23 2017 03:01
jfc monstrous amount of work you folks have done here. Wasn't expecting this :thumbsup:
Going to steal Avalonia.LeakTests good idea!
You need to add Avalonia.AcceptanceTests though
Geoffrey Huntley
@ghuntley
Sep 23 2017 03:36
FYI master is currently red build on windows (for me)
CI badge also looks red build
Geoffrey Huntley
@ghuntley
Sep 23 2017 03:42
Anyway I'll check back here later tonight; ps stay away from system.reactive v4 -pre until advised otherwise. Ecosystem is staying at 3.1.1 and pinned < 4.x in rxui, dynamicdata, akavache, etc etc.
likewise if you get any circular restoration problems from nuget related to system.reactive, configure VS to use PackageReference as your resolver instead of packages.config.
Wiesław Šoltés
@wieslawsoltes
Sep 23 2017 08:42
@kekekeks @danwalmsley I am getting this error on appveyor:
Errors in C:\projects\panandzoom\samples\AvaloniaDemo\AvaloniaDemo.csproj
    Package Avalonia.Skia 0.5.2-build3857-alpha is not compatible with net461 (.NETFramework,Version=v4.6.1). Package Avalonia.Skia 0.5.2-build3857-alpha supports: netstandard2.0 (.NETStandard,Version=v2.0)
Nikita Tsukanov
@kekekeks
Sep 23 2017 08:48
You need to update .NET Core SDK
MonkAlex
@MonkAlex
Sep 23 2017 08:57
I use ReactiveUI reference to IReactiveDerivedList (live filtering), but after update avalonia to last night build i lost reference. What i need do now?
Nikita Tsukanov
@kekekeks
Sep 23 2017 08:58
I think we are no longer shipping our old patched version of reactiveui and using one from nuget instead
MonkAlex
@MonkAlex
Sep 23 2017 08:59
So, i need just use nuget reativeui?
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:00
Check if you are still referencing Avalonia.ReactiveUI package
It should pull ReactiveUI 8.0.0-alpha0073 from nuget
I think we were using version 6 before
MonkAlex
@MonkAlex
Sep 23 2017 09:02
System.Reactive - its another lib?
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:02
Yep
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:05
Yes, but it should be included automatically
MonkAlex
@MonkAlex
Sep 23 2017 09:05
Not included now
Do i check something?
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:06
Are you using packages.config?
MonkAlex
@MonkAlex
Sep 23 2017 09:07
Yes. Dont see any Reactive libs, another then System.Reactive
<package id="System.Reactive" version="4.0.0-preview00001" targetFramework="net461" />
<package id="System.Reactive.Core" version="3.0.0" targetFramework="net45" />
<package id="System.Reactive.Interfaces" version="3.0.0" targetFramework="net45" />
<package id="System.Reactive.Linq" version="3.0.0" targetFramework="net45" />
<package id="System.Reactive.PlatformServices" version="3.0.0" targetFramework="net45" />
<package id="System.Reactive.Windows.Threading" version="3.0.0" targetFramework="net45" />
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:09
Switch to PackageReference
MonkAlex
@MonkAlex
Sep 23 2017 09:10
Not understand.
MonkAlex
@MonkAlex
Sep 23 2017 09:14
Dont have any PackageReference in csproj file
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:15
you need to migrate from packages.config to PackageReference
Transitive dependencies won't work properly otherwise
Wiesław Šoltés
@wieslawsoltes
Sep 23 2017 09:21

You need to update .NET Core SDK

@kekekeks I am using latest version

Nikita Tsukanov
@kekekeks
Sep 23 2017 09:23
Also make sure that you have VS2017.3
i. e. using the latest image
Package Avalonia.MonoMac 0.5.2-build3857-alpha is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Avalonia.MonoMac 0.5.2-build3857-alpha supports: netstandard2.0 (.NETStandard,Version=v2.0)
Yep, something in the build toolchain is outdated
Make sure that you are using this image: https://i.imgur.com/OsOXUa4.png
MSBuild auto-detection: using msbuild version '15.3.409.57025' from 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin'.
Hm...
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:28
Microsoft/vsts-tasks#5164
MonkAlex
@MonkAlex
Sep 23 2017 09:40

@kekekeks At present, package references are supported in Visual Studio 2017 only, for .NET Core projects, .NET Standard projects, and UWP projects targeting Windows 10 Build 15063 (Creators Update).

What about simple net46 project?

Nikita Tsukanov
@kekekeks
Sep 23 2017 09:41
For me it just works
I think there were some issues with classic ASP.NET projects
MonkAlex
@MonkAlex
Sep 23 2017 09:42
No idea, why its not work for me. Can u link to csproj file, how it must see?
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:42
Since they don't have app.config, so nuget is unable to generate binding redirects properly
Create a new AvaloniaApplication project using our extension
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:50
We'll probably won't support the old project format starting from the next version
MonkAlex
@MonkAlex
Sep 23 2017 09:50
https://youtrack.jetbrains.com/issue/RIDER-6961 - okay, this not work in rider =_=
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:50
You can migrate to the new project format then
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
     <Compile Update="**\*.xaml.cs">
      <DependentUpon>%(Filename)</DependentUpon>
    </Compile>
    <EmbeddedResource Include="App.xaml" />
    <EmbeddedResource Include="MainWindow.xaml" />
      <PackageReference Include="Avalonia" Version="0.5.2-build3857-alpha" />
      <PackageReference Include="Avalonia.Desktop" Version="0.5.2-build3857-alpha" />
      <PackageReference Include="Avalonia.ReactiveUI" Version="0.5.2-build3857-alpha" />
  </ItemGroup>
Something like that
If you want to get it working on *nix, you need to switch to netcoreapp2.0
MonkAlex
@MonkAlex
Sep 23 2017 09:54
omfg =) so hard :D
Nikita Tsukanov
@kekekeks
Sep 23 2017 09:56
that't the brave new .NET world for you
But don't worry, everything is going to be just fine
Nikita Tsukanov
@kekekeks
Sep 23 2017 10:46
@grokys what's our policy on PRs with 46 commits that have stuff like "revert merge" in commit list?
I think we should require rebase + squash or something along the lines in that case
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:12
Probably
The guidelines says something about rebasing to keep the commits clean
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:19
I'm not sure how to do that though
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:20
The easiest way is to:
1) merge with the latest master
2) git reset --soft master
3) create a fresh commit
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:25
Is that something I have to do?
Since I'll have to create a new branch with a pr after that then
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:26
You can force-push to the same branch, I think
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:27
But that won't clear the history
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:27
Ehm, it will create one commit with all changes
based on master branch
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:32
That reset also changes a lot of things I didn't even touch
Like that
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:33
That's weird
Well, I can do a history cleanup before merging, I guess
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:34
I should just leave it be then?
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:34
yep
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 11:34
Alright, Thanks!
Hmm, weird I pushed the merge
But github still claims its out of date
Geoffrey Huntley
@ghuntley
Sep 23 2017 11:50
<package id="System.Reactive" version="4.0.0-preview00001" targetFramework="net461" /> Stick with 3.1.1 only. Do not use 4.x atm. I'd like to see 4.0.0-x preview unlisted honestly tbh.
There are some super broken problems with nuget.exe right now if you are using package.config
Install-Package : Circular dependency detected 'reactiveui 8.0.0-alpha0034 => System.Reactive 3.1.0 => System.Reactive.PlatformServices 4.0.0-preview00001 => System.Reactive 3.1.0'.
It's not a reactiveui issue; the resolution logic in nuget.exe is just broken.
It pulls in 4.x when installing 3.x even if you pin at 3.x
4.x had some big changes w/merging nuget packages into a nuget package which triggers nuget.exe to blow up :/ upstream defect is logged in nuget/home
Nikita Tsukanov
@kekekeks
Sep 23 2017 11:57
the resolution logic in nuget.exe is just broken.
I'm mostly frustrated by the fact that it ignores package requirements deep in the graph
e. g. if you have
-> A -> B -> C=2.0
-> D -> C=1.0
Nuget will pick C=1.0
And it's not even a bug, it's by design

@JurjenBiewenga
https://github.com/AvaloniaUI/Avalonia/pull/1150/files#diff-fa616233ba8817223127ae63631cea21R138

If I understand correctly, it returns a fresh snapshot every time

I'm not sure if we should keep it as a property
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:01
@kekekeks nuget problems atm make me want to quit .NET tbh
like not just technically, the entire thing they did with paket community, burned trust, etc.
the nuget team is going to add a package lock do we can freeze graphs, no eta yet. It's really annoying cause you can't get reproducible builds etc.
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:04
Are you talking about that PR with Paket-related changes for nuget.org website?
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:06
Yeah, it's kinda water under the bridge now that the nuget.org team relented and allowed the PR in but at first they just closed it and poured petrol onto a fire.
Anyway @kekekeks cloned down Avalonia early this morning, first time opening up in visual studio. I guess a congratulations is in order - more platforms than reactiveui, more complexity because of this, etc. /me passes you the platform crown.
I find maintaining nine hard enough as it is (though new project sdk format makes it easier now) .... you have more! :)
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:10
Well, technically we only maintain 4 platforms - full .NET/Mono, .NET Core and Xamarin.iOS/Xamarin.Android
Everything else is just windowing/drawing backends
It's still a bit nightmarish to get through SDK hell
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 12:12
@kekekeks Oh yeah, good point!
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:12
Before VS2017 we were using PCLs for almost everything
And, to be honest, it was way easier
In terms of IDE stability and performance
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:16
actually I don't have too many griefs with vs4win (right now) last six months has been hell.
VS4Mac however, right now is a bonfire; much stuff just isn't implemented or behaves differently to vs4win behaviour.
Johan Larsson
@JohanLarsson
Sep 23 2017 12:18
stooling is a pretty good word for it :D
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:18
The are also issues with .NET SDK itself
It can't properly locate reference assemblies for desktop .NET on *nix platforms
And that's one of the reasons why new project format isn't really usable for MonoDevelop/VSforMac
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:19
Oren Novotny has been a saint tbh. So many times he's known about obtuse .NET SDK issues and steered me away from them.
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:20
And it's not just VS4Mac, Rider guys have tons of issues with SDK too
Another blow is that vsdbg can't really be used with non-microsoft products
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:20
You folks going to join .NET foundation?
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:20
So no .NET Core debugging support in MonoDevelop on Linux
There was some discussion about it, better ask @grokys
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:22
If you do, Oren can get your VSIX and NuGet assemblies signed by .NET foundation. It's super easy to do. -> https://github.com/reactiveui/ReactiveUI/blob/develop/build.cake#L275
re: vs4mac -> reactiveui/ReactiveUI#1445
(╯°□°)╯︵ ┻━┻
Haven't tried/tested rider yet on any platform, good idea.
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:27
I'm currently using Rider to build & debug avalonia on Linux, because nothing else really works for me
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:28
ಠ_ಠ
It feels so good to hear that I'm not the only one.
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:29
And even then, it can't actually open the whole solution: everything that wants net461 is broken
Geoffrey Huntley
@ghuntley
Sep 23 2017 12:30
FYI - Splat is broken with netstandard 2.0; sorry not sorry. It'll get fixed sometime soon, been working on community/marketing/developer experience stuff rather than code lately.
like converting over to netstandard+sdk project tooling was a pretty big change, need to regression test (current #1 activity) to ensure we didn't break stuff.
for example we found we couldn't embed wpf themes because the sdk tooling doesn't actually support embedding, so we had to roll back the wpf package to old csproj format.
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:33
Ehm, embedding? We are using EmbeddedResource and it works just fine
Oh, I think I get it. WPF is using different resource model that's preserving paths
It never worked for us since xbuild is not capable of generating it
Nikita Tsukanov
@kekekeks
Sep 23 2017 12:49
@JurjenBiewenga caching screens that way is probably a bad idea, since it doesn't check if display configuration has changed
We probably need Changed event in IScreenImpl or something like that
Oh, nevermind
I'm blind
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 12:58
Lol
Nikita Tsukanov
@kekekeks
Sep 23 2017 13:12
@grokys @jkoritzinsky @aelij After latest changes something is broken in RepeatButton in controlcatalog
I'm getting System.InvalidOperationException: 'Invalid Arrange rectangle.' in ArrangeCore
I guess it was caused by AvaloniaUI/Avalonia#1131
Nikita Tsukanov
@kekekeks
Sep 23 2017 13:34
@JurjenBiewenga AvaloniaUI/Avalonia@e25f949
If build pass, I'll merge that to master instead of PR contents
I've also cleaned up the diff a little bit
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 13:46
Cheers
Steven Kirk
@grokys
Sep 23 2017 14:17
@kekekeks ah crap, i'll look into that this morning
Nikita Tsukanov
@kekekeks
Sep 23 2017 14:19
need to scroll the left panel to reproduce
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 14:39
@kekekeks You had an idea for platform specific functions?
For functions that fit in no other place
Like hide in dock
Nikita Tsukanov
@kekekeks
Sep 23 2017 14:52
Yep, I suggest something like
GetPlatformSpecificFeatureSet<OSXSpecificFeatures>();
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 16:17
Hmm, should they be implemented with interfaces
So that if ever needed you can have different implementations for the same platform
Because of different os version etc
Nikita Tsukanov
@kekekeks
Sep 23 2017 16:19
The thing is that I want to keep Something + ISomethingImpl pattern
So we can keep our public API more or less stable
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 16:23
I mean something like this
public interface IOSXFeaturesImpl
{
    void ShowInDock();
}

public class OSXLionFeatures : IOSXFeaturesImpl
{
    public void ShowInDock()
    {
        throw new NotImplementedException();
    }
}

public class OSXYosemiteFeatures : IOSXFeaturesImpl
{
    public void ShowInDock()
    {
        throw new NotImplementedException();
    }
}
Nikita Tsukanov
@kekekeks
Sep 23 2017 16:24
Yep, but that will live inside Avalonia.MonoMac assembly
And won't be accessible from our public API
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 16:26
How do you suggest exposing it to the public api?
Just a class that redirects everything?
Nikita Tsukanov
@kekekeks
Sep 23 2017 16:26
Yep, something like that
Like we do with everything else
Jurjen Biewenga
@JurjenBiewenga
Sep 23 2017 16:28
Alright
Nikita Tsukanov
@kekekeks
Sep 23 2017 16:30
Need some feedback on this idea from @grokys
Not sure where to expose those
Since Dock is application-global
Nikita Tsukanov
@kekekeks
Sep 23 2017 20:42
Nikita Tsukanov
@kekekeks
Sep 23 2017 21:42
@grokys AutoSize still doesn't work if Resize call is async
Steven Kirk
@grokys
Sep 23 2017 22:42
hmm ok, yeah the autosize stuff kinda sucks
Mkay, got it working