These are chat archives for AvaloniaUI/Avalonia

27th
Apr 2017
Darnell Williams
@Seeker1437
Apr 27 2017 00:45
The big thing is that the render engine can already handle dirty rects right? You could tie it into the layout/clipping
Maybe I'm talking out of my backside. XD But when you do the pass wasn't there something like invalidate or something that could be put together with the final like pass?
Eli Arbel
@aelij
Apr 27 2017 13:59
Hey, is there any workaround for the black popups issue?
Steven Kirk
@grokys
Apr 27 2017 15:31
@aelij do you have a repro?
danwalmsley
@danwalmsley
Apr 27 2017 16:54
Eli, my workaround was to somehow trigger a second render, i.e. InvalidateVisual, a short time after it has opened, but best to find a minimal repro and we can fix it once and for all
danwalmsley
@danwalmsley
Apr 27 2017 20:53
@kekekeks will it always be a requirement for designer to need a net framework target?
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:15
It will need full .NET in the foreseeable future
.NET Core requires different initialization logic
Also CreateEmbeddableWindowneeds winforms to be available
I think there was also some stuff in designer process that wants winforms
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:24
@danwalmsley Is there a build of AvalonStudio that can actually run on Ubuntu and open C# projects?
danwalmsley
@danwalmsley
Apr 27 2017 21:31
iv not tested it, but I think we could get it working pretty quickly
let me fire up my Ubuntu ;)
does the latest build from appveyor run?
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:34
It doesn't seem to have all required files there
danwalmsley
@danwalmsley
Apr 27 2017 21:34
whats missing?
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:34
And I can't get it building from source
Probably because you are using .NET Core 2.0
Well, there is no executable file
danwalmsley
@danwalmsley
Apr 27 2017 21:36
if you run the latest build.sh does it not build?
probably dotnet-debugging-part-3 is best branch to use
going to have to try bash for windows 10
cant find my external ssd with Ubuntu on
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:38
/usr/share/dotnet/sdk/1.0.3/NuGet.targets(97,5): error : Unable to resolve '/home/kekekeks/Projects/AvalonStudio/debugger-libs/Mono.Debugging/Mono.Debugging.NetCore2.csproj' for '.NETCoreApp,Version=v2.0'. [/home/kekekeks/Projects/AvalonStudio/AvalonStudio/AvalonStudio/AvalonStudio.csproj]
I'm getting errors like this
Probably because I don't have .NET Core 2.0 installed and it's not available from APT repo
danwalmsley
@danwalmsley
Apr 27 2017 21:39
oh yeh
you need to install this
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:40
Will it break existing SDKs?
I kinda rely on those for production use
danwalmsley
@danwalmsley
Apr 27 2017 21:40
see commands here:
erm, it seems ok for me
but I couldn't guarentee
i think you can manually download the zip version
and extract to a specific folder
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:41
Will it work from /opt?
danwalmsley
@danwalmsley
Apr 27 2017 21:43
couldn't say
probably
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:45
Does debugger work on *nix already?
danwalmsley
@danwalmsley
Apr 27 2017 21:45
just installing now
it should do but untested
it does on windows
and all the apis are compatible
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:46
Do I need to install something to get C# projects working?
danwalmsley
@danwalmsley
Apr 27 2017 21:46
there is a nugget package
that gets installed
i need to publish the Linux version
it wont take long...
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:46
So you are still on OmniSharp, right?
danwalmsley
@danwalmsley
Apr 27 2017 21:47
oh i think its already there
for now
I want to move away from it very quickly
yeh there is a package so I think we can get it to work
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:47
It's a pity that they got rid of project system server
danwalmsley
@danwalmsley
Apr 27 2017 21:48
i think with Roslyn we can get it working pretty quick
just need time, and i don't get much
i think now debugging is basically there i can move on to it next
are you thinking we can integrate avalonia?
with previewer
of some sort
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:51
That needs moving to the new architecture with remote widgets
#900
But the progress on it kinda stalled now
danwalmsley
@danwalmsley
Apr 27 2017 21:52
well first we need XAML and XAML completion anyway
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:52
Yeah, you yet need to get information from the project system
About the target assembly
completion won't work otherwise
danwalmsley
@danwalmsley
Apr 27 2017 21:53
what just location of assembly or more?
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:53
Just location of the assembly
danwalmsley
@danwalmsley
Apr 27 2017 21:53
any ideas how to do that with Roslyn?
I can detect the location already, aslong as project has been built once
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:54
Well, you can check VS extension source
it might be similar
The code is a bit wonky, but seems to work
danwalmsley
@danwalmsley
Apr 27 2017 21:56
any ideas how to fix this...
image.png
stopping me build on bash for windows
are those Roslyn apis?
or visual studio?
Nikita Tsukanov
@kekekeks
Apr 27 2017 21:57
ProjectSystem, I guess
It should support the concept of UnconfiguredProject and ConfiguredProject
$ dotnet --version
2.0.0-preview2-005900

...
      Unable to resolve '/home/kekekeks/Projects/AvalonStudio/debugger-libs/Mono.Debugging/Mono.Debugging.NetCore2.csproj' for '.NETCoreApp,Version=v2.0 (ubuntu.14.04-x64)'.
Oh, my bad, forgot to update submodules
danwalmsley
@danwalmsley
Apr 27 2017 22:01
git submodule update --init -recursive
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:02

System.Console 4.0.0-rc2-24027

Then feeling when you see rc2 on System.Console

danwalmsley
@danwalmsley
Apr 27 2017 22:03
its all working pretty nicely
and you have almost full dotnet!
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:04
What a time to be alive
It takes ages to build everything though
danwalmsley
@danwalmsley
Apr 27 2017 22:06
yeah, but only the first time!
quicker if you cd into AvalonStudio/AvalonStudio/
and just build AvalonStudio.csproj
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:06
Unhandled Exception: System.TypeInitializationException: The type initializer for 'ReactiveUI.ReactiveNotifyPropertyChangedMixin' threw an exception. ---> System.TypeInitializationException: The type initializer for 'ReactiveUI.RxApp' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: context
   at System.Reactive.Concurrency.SynchronizationContextScheduler..ctor(SynchronizationContext context)
   at ReactiveUI.DependencyResolverMixins.InitializeReactiveUI(IMutableDependencyResolver resolver)
   at Splat.Locator.RegisterResolverCallbackChanged(Action callback)
   at ReactiveUI.RxApp..cctor()
   --- End of inner exception stack trace ---
   at ReactiveUI.RxApp.EnsureInitialized()
   at ReactiveUI.ReactiveNotifyPropertyChangedMixin..cctor()
   --- End of inner exception stack trace ---
   at ReactiveUI.ReactiveNotifyPropertyChangedMixin.ObservableForProperty[TSender,TValue](TSender This, Expression`1 property, Boolean beforeChange, Boolean skipInitial)
   at AvalonStudio.MVVM.ToolViewModel..ctor()
   at AvalonStudio.Debugging.CallStackViewModel..ctor()
   at lambda_method(Closure , LifetimeContext , CompositionOperation )
   at System.Composition.Hosting.Providers.ImportMany.ImportManyExportDescriptorProvider.<>c__DisplayClass3_2`1.<GetImportManyDescriptor>b__4(ExportDescriptor e)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at lambda_method(Closure , LifetimeContext , CompositionOperation )
   at System.Composition.Hosting.Core.CompositionOperation.Run(LifetimeContext outermostLifetimeContext, CompositeActivator compositionRootActivator)
   at System.Composition.Hosting.Core.LifetimeContext.TryGetExport(CompositionContract contract, Object& export)
   at System.Composition.CompositionContext.GetExport(CompositionContract contract)
   at System.Composition.CompositionContext.GetExport[TExport](String contractName)
   at AvalonStudio.Program.Main(String[] args)
danwalmsley
@danwalmsley
Apr 27 2017 22:08
this used to work, on .net 1.1
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:08
It seems that you are trying to initialize MEF before configuring AppBuilder
danwalmsley
@danwalmsley
Apr 27 2017 22:08
ah something could have changed here recently, but windows doesn't throw
I'm still building :(
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:09
You shouldn't do anything until Application::Initialize is called
Because you won't get SynchronizationContext set up in time otherwise
Unhandled Exception: OmniXaml.LoadException: Error loading XAML: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'sk_color_get_bit_shift' in DLL 'libSkiaSharp'.
   at SkiaSharp.SkiaApi.sk_color_get_bit_shift(Int32& a, Int32& r, Int32& g, Int32& b)
   at SkiaSharp.SKImageInfo..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKBitmap.Decode(SKCodec codec, SKImageInfo bitmapInfo)
   at SkiaSharp.SKBitmap.Decode(SKCodec codec)
   at SkiaSharp.SKBitmap.Decode(SKStream stream)
   at Avalonia.Skia.PlatformRenderInterface.LoadBitmap(Stream
And here we have it
Incompatible SkiaSharp version
danwalmsley
@danwalmsley
Apr 27 2017 22:13
bollocks!
if you downgrade skiasharp nuget
it should work
the fix was only for copying dll to correct palce for win7 build
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:14
Mkay, it started and then crashed on solution open, because you don't pass parent window
danwalmsley
@danwalmsley
Apr 27 2017 22:14
where?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:15
OpenFileDialog
It currently can't work without parent window handle
And I can't create a project because of
Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
   at AvalonStudio.Projects.OmniSharp.BlankOmniSharpProjectTemplate.Generate(ISolution solution, String name)
danwalmsley
@danwalmsley
Apr 27 2017 22:16
you have to run dotnet new
to create project manually first then open
I can implement the new project soon
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:16
I can't open projects
because you don't pass a window instance to OpenFileDialog
danwalmsley
@danwalmsley
Apr 27 2017 22:17
we can fix by passing in parent window handle?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:17
Yep
danwalmsley
@danwalmsley
Apr 27 2017 22:17
should be easy to get window handle?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:17
Just pass your main window
danwalmsley
@danwalmsley
Apr 27 2017 22:17
couldnt avalonia do that under the hood?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:17
Well, it should accept null as a window
But for some weird reason a null SafeHandle can't be passed to P/Invoke
Need to investigate to figure out a workaround for that
The problem is that build is currently broken, so we won't get updated nuget packages anyway
danwalmsley
@danwalmsley
Apr 27 2017 22:21
its going to take me a while to catch up
still just installing dotnet
the file you need to change to fix that bug is
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:25
Yeah, but where do I get a reference to the main window?
danwalmsley
@danwalmsley
Apr 27 2017 22:25
hmm not sure a good way to do that from viewmodel
you could do this
in mainwindows.xaml.cs
in the constructor you can do
IoC.Register<MainWindow>()
and then when you need the handle
IoC.Get<MainWindow>().Handle
it just shoves it in the splat container
danwalmsley
@danwalmsley
Apr 27 2017 22:32
did you get skiasharp dll not found?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:33
Nope
danwalmsley
@danwalmsley
Apr 27 2017 22:33
how did you get it to install compatible skiasharp?
oh need to downgrade
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:35
dotnet run seems to be rebuilding the whole solution for some reason
danwalmsley
@danwalmsley
Apr 27 2017 22:35
yeh i know, wierd
i assumed that was a dotnet core bug
but i guess you havent seen that issue before?
@kekekeks
IoC.RegisterConstant<Window>(this);
in mainwindow.xaml.cs
and
var mainWindow = IoC.Get<Window>();
then you can get handle
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:41
Selected solution
nothing happened
danwalmsley
@danwalmsley
Apr 27 2017 22:41
are you able to step into code
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:41
System.AggregateException: One or more errors occurred. (Нет такого файла или каталога) ---> System.ComponentModel.Win32Exception: Нет такого файла или каталога
   at System.Diagnostics.Process.ResolvePath(String filename)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at AvalonStudio.Languages.CSharp.OmniSharp.OmniSharpServer.<>c__DisplayClass10_0.<<StartAsync>b__0>d.MoveNext()
danwalmsley
@danwalmsley
Apr 27 2017 22:42
it needs to install a package first
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:42
From where
danwalmsley
@danwalmsley
Apr 27 2017 22:42
you need to check what happens here:
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:42
Oh, tools->packages is working now
nice
But I don't see any available packages
danwalmsley
@danwalmsley
Apr 27 2017 22:42
its supposed to auto install the required package
but you can manually install from there
oh its filtering
what is written in bottom left of status bar?
print screen it
danwalmsley
@danwalmsley
Apr 27 2017 22:44
press cancel
then print screen
danwalmsley
@danwalmsley
Apr 27 2017 22:45
hmmm looks ok
check what this method returns
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:46
How I'm supposed to do that? There is no debugger that actually works
danwalmsley
@danwalmsley
Apr 27 2017 22:46
ah ok
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:46
I can add debug output to console
danwalmsley
@danwalmsley
Apr 27 2017 22:47
@kekekeks can you paste the fix for open file dialog and I can check whats happening
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:47
Good old printf debugging
danwalmsley
@danwalmsley
Apr 27 2017 22:47
its filtering because of this..
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:47
You need to pass Window instance to dialog.ShowAsync()
needs to match packages here:
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:48
AvaloniaLocator.CurrentMutable.BindToSelf<Window>(this); in MainWindow ctor
var result = await dlg.ShowAsync(Avalonia.AvaloniaLocator.Current.GetService<Window>());
ok so you need to make
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:50
ubuntu16-x64?
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:50
Doesn't look like a proper RID at all
danwalmsley
@danwalmsley
Apr 27 2017 22:50
that return ubuntu16
its not a .net core rid
yeh it needs changing
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:50
I'm running on 15.10 BTW
danwalmsley
@danwalmsley
Apr 27 2017 22:50
i think the binaries are really for ubuntu 14
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:51
Probably need to update, but kinda afraid to break something
Can't afford that right now
result = "ubuntu64-";
Something like that?
danwalmsley
@danwalmsley
Apr 27 2017 22:52
ubuntu16-
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:52
ouch
danwalmsley
@danwalmsley
Apr 27 2017 22:52
i kno
its because with windows and mac i only need 1 set of binaries
for linux I need loads
but needs sorting out
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:54
Meh, just target ubuntu and ship some base set of libs
Like steam does
Might even steam that set from steam
Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'NuGet.Configuration.NullSettings' to type 'NuGet.Configuration.Settings'.
   at AvalonStudio.Packages.PackageManager.<InstallPackage>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
danwalmsley
@danwalmsley
Apr 27 2017 22:55
amazing how nothing works
thats in PackageManager.cs
InstallPackage
at least when this compiles and runs we will be able to actually use the debugger
it seems to fully build each time, wierd
Nikita Tsukanov
@kekekeks
Apr 27 2017 22:59
I guess you shouldn't be casing to (Settings) there
From ISettings
danwalmsley
@danwalmsley
Apr 27 2017 23:00
must have worked on windows, because it wasnt returning nullsettings
if you remove the cast does it work?
looks like removing that cast works
oh you need a .sln file for it to work!!!
Nikita Tsukanov
@kekekeks
Apr 27 2017 23:04
INFORMATION: Completed installation of AvalonStudio.Languages.CSharp.ubuntu16-x64 1.15.0
INFORMATION: Adding package 'AvalonStudio.Languages.CSharp.ubuntu16-x64.1.15.0' to folder '/home/kekekeks/AvalonStudio/AppData/Repos'
INFORMATION: Added package 'AvalonStudio.Languages.CSharp.ubuntu16-x64.1.15.0' to folder '/home/kekekeks/AvalonStudio/AppData/Repos'
INFORMATION: Added package 'AvalonStudio.Languages.CSharp.ubuntu16-x64.1.15.0' to folder '/home/kekekeks/AvalonStudio/AppData/Repos' from source 'https://www.myget.org/F/avalonstudio/api/v3/index.json'
INFORMATION: Successfully installed 'AvalonStudio.Languages.CSharp.ubuntu16-x64 1.15.0' to /home/kekekeks/AvalonStudio/AppData/Repos
INFORMATION: Executing nuget actions took 11,51 sec
danwalmsley
@danwalmsley
Apr 27 2017 23:04
that means its ready to go
but you need to add this
return new List<string> { "sln", "csproj" };
visualstudiosolution.cs
Nikita Tsukanov
@kekekeks
Apr 27 2017 23:05
Still getting Win32Exception
From
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at AvalonStudio.Languages.CSharp.OmniSharp.OmniSharpServer.<>c__DisplayClass10_0.<<StartAsync>b__0>d.MoveNext()
danwalmsley
@danwalmsley
Apr 27 2017 23:06
i think it must not be finding correct file
let me see
Nikita Tsukanov
@kekekeks
Apr 27 2017 23:06
There is no visualstudiosolution.cs
only VisualStudioSolutionType.csproj
BTW, let's move to AvalonStudio room
danwalmsley
@danwalmsley
Apr 27 2017 23:08
ok