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

gtk ongoing #37

Merged
merged 3,320 commits into from
Apr 14, 2023
Merged

gtk ongoing #37

merged 3,320 commits into from
Apr 14, 2023

Conversation

lytico
Copy link
Collaborator

@lytico lytico commented Aug 22, 2022

merging main-linux with

  1. a recent maui.main (dotnet@1106987)
  2. plus Moves Microsoft.Maui.Graphics.Gtk into the Maui repo dotnet/maui#9522

State

Controls.Samples.Gtk is running

all the rest is WIP

How to get net6-gtk workload:

clone https://github.com/GtkSharp/GtkSharp branch Develop

dotnet tool restore
dotnet cake --BuildTarget=InstallWorkload 

Controls.Samples.Gtk screenshot:

grafik

mattleibow and others added 30 commits July 22, 2022 21:06
…20722.1 (dotnet#8935)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22369.1 -> To Version 1.0.0-prerelease.22372.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Fix issue Entry clear button not working

* Updated EditTextExtensions

* Update clear button visibility when text changes

Co-authored-by: E.Z. Hart <hartez@gmail.com>
* Add Admin check for removing needs-info labels
"Write" is a separate permission from "Admin" so we need to check both when applying certain rules

* Update fabricbot.json
…uild 6.0.4xx-0b8d593a61bb49120fdf817e8dfdbc4b33937772-1

Microsoft.Android.Sdk.Windows
 From Version 32.0.446 -> To Version 32.0.447

Dependency coherency updates

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.400-rtm.22364.21 -> To Version 6.0.400-rtm.22371.2 (parent: Microsoft.Android.Sdk.Windows
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…Gradient (dotnet#7926) Fixes dotnet#7885

* Fix the issue

* Added Device Tests

Co-authored-by: Rui Marinho <me@ruimarinho.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
…uild 6.0.4xx-2c639362ff709d9f9c090d8bb363b2d6b67945ce-1 (dotnet#8992)

Microsoft.Android.Sdk.Windows
 From Version 32.0.447 -> To Version 32.0.448

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…otnet#8930)

* Internalize added APIs

* Update CalendarDatePickerExtensions.cs

Co-authored-by: Rui Marinho <me@ruimarinho.net>
* Fix Windows DatePicker TextColor

* Updated implementation

* Added Windows DatePicker DeviceTests

* - remove public API changes

* - clean up handlers

* - fix ext methods

* - fix windows attach tests

* Update PublicAPI.Unshipped.txt

* - remove ToDateTimeOffset ext for now

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
…et#8977)

* Bump Xamarin.AndroidX.Navigation.Fragment from 2.4.2.1 to 2.5.0

Bumps [Xamarin.AndroidX.Navigation.Fragment](https://github.com/xamarin/AndroidX) from 2.4.2.1 to 2.5.0.
- [Release notes](https://github.com/xamarin/AndroidX/releases)
- [Commits](https://github.com/xamarin/AndroidX/commits)

---
updated-dependencies:
- dependency-name: Xamarin.AndroidX.Navigation.Fragment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump other Xamarin.AndroidX.Navigation

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rui Marinho <me@ruimarinho.net>
Bumps [Microsoft.CodeAnalysis.NetAnalyzers](https://github.com/dotnet/roslyn-analyzers) from 7.0.0-preview1.22369.1 to 7.0.0-preview1.22373.2.
- [Release notes](https://github.com/dotnet/roslyn-analyzers/releases)
- [Changelog](https://github.com/dotnet/roslyn-analyzers/blob/main/PostReleaseActivities.md)
- [Commits](https://github.com/dotnet/roslyn-analyzers/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.NetAnalyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…20725.5 (dotnet#9012)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22372.1 -> To Version 1.0.0-prerelease.22375.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…net#8418) Fixes dotnet#1111

* Remove duplicate classes and fix issue

* Fix all overloads and added tests
…t#8981)

Bumps [Xamarin.AndroidX.Lifecycle.LiveData](https://github.com/xamarin/AndroidX) from 2.4.1.2 to 2.5.0.
- [Release notes](https://github.com/xamarin/AndroidX/releases)
- [Commits](https://github.com/xamarin/AndroidX/commits)

---
updated-dependencies:
- dependency-name: Xamarin.AndroidX.Lifecycle.LiveData
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@lytico
Copy link
Collaborator Author

lytico commented Sep 7, 2022

State

Controls.Samples.Gtk is compiling
Controls.Maps is compiling
BlazorWebView is compiling

@lytico
Copy link
Collaborator Author

lytico commented Sep 8, 2022

State

Controls.Samples.Gtk running

grafik

@jsuarezruiz
Copy link
Owner

State

Controls.Samples.Gtk running

grafik

Ready to review/merge?

@lytico lytico marked this pull request as ready for review October 20, 2022 08:54
@lytico
Copy link
Collaborator Author

lytico commented Oct 20, 2022

i've little time at the moment ...

@iMonZ
Copy link

iMonZ commented Nov 7, 2022

i've little time at the moment ...

Hey @lytico and @jsuarezruiz and everybody else, thank you so much for your work!
My only question is what is missing before this can be merged?

Thanks

@knocte
Copy link

knocte commented Nov 21, 2022

Ready to review/merge?

How can this be tested? If there were clear instructions I'd be down to help :)

@lytico
Copy link
Collaborator Author

lytico commented Nov 21, 2022

@knocte check it out, & run src/Controls/samples/Controls.Sample.Gtk

next step would be: try get src/Controls/samples/Controls.Sample to COMPILE
it wouldn't RUN, cause there are missing controls, but it would be helpful to have a compiling Controls.Sample to continue

@trungnt2910
Copy link

it wouldn't RUN, cause there are missing controls

I can see that MAUI is a really quicky-evolving platform, so for every version of MAUI added, numerous new controls are added too.

The platform specific portions of controls seem to follow a very specific convention, would a stub generator program (something that guesses the functions needed to be implemented, and then write placeholders that simply throw NotImplementedException()) be a useful tool for the porting effort?

@lytico
Copy link
Collaborator Author

lytico commented Nov 22, 2022

@trungnt2910 this is the strategy i use.

  1. make it COMPILE
    the projects compile without errors

  2. make it RUN
    the project runs without exceptions; this includes "dummy" implementations showing "nothing" but an empty placeholder == stub

  3. make it VISIBLE
    the controls/views show up something useful, but maybe not all features are implemented

  4. make it feature complete
    :-) will it ever be?

  5. optimize it
    sometimes after 3), sometimes after 4). have an implementation that is fast and memory optimized

@trungnt2910
Copy link

@lytico

  1. make it COMPILE
    the projects compile without errors

My point is the rapid evolution of MAUI means that controls and other features are added, making this step harder and harder after rebasing (for example, while some parts of this branch may compile, rebasing it to the main branch for .NET 8 might not work, especially after half a year).

Therefore, this project would benefit from a stub generator. The simplest method is to throw a NotImplementedException everywhere, but we can customize the stubgen to generate more specific implementations for certain situations in step 2).

I would gladly build and provide an initial implementation of the stubgen for the project if you and other maintainers don't have much time, but I'm asking if using a stub generator is preferred, or if you or the other maintainers have better solutions for handling missing controls/functions.

@YoshiRulz
Copy link

I wasn't able to test the sample app on Manjaro, as installing the GTK# workload fails.

An error occurred when executing task 'InstallWorkload'.
Error: One or more errors occurred. (Access to the path '/usr/share/dotnet/sdk-manifests/6.0.400/GtkSharp.NET.Sdk.Gtk/temp' is denied.)

Everything under /usr/share/dotnet is owned by root. Creating the dir as root broke things.


I'm also available to work on Source Generators if that's desired.


My point is the rapid evolution of MAUI means that controls and other features are added, making this step harder and harder after rebasing

Microsoft could easily check for build errors in CI. But from their attitude towards Linux on the main repo so far, I'm guessing they're not going to.

@trungnt2910
Copy link

@YoshiRulz

as installing the GTK# workload fails.

Have you tried installing it as root? This workload (and probably official workloads from Microsoft) requires root access to be installed on UNIX-like machines.

I'm also available to work on Source Generators if that's desired.

What I was talking about are stub generators, those that can semi-automatically insert

#if GTK
    throw new NotImplementedException("Code path unimplemented on GTK");
#endif

and things like that, and not those Roslyn plugins that Microsoft calls "Source Generators".

Microsoft could easily check for build errors in CI

Yes, they could easily check for build errors in the CI (if writing and updating CI scripts for a separate platform is considered easy).

But what about fixing the errors? Microsoft doesn't want to spend money on a small market like GTK on Linux, and while waiting for two busy GTK experts to inspect what's wrong Microsoft would rather remove the whole Linux CI.

Also if someone really, really needs MAUI on GTK and willing to hire someone I'm happy to take on this issue as a part-time job.

@lytico
Copy link
Collaborator Author

lytico commented Mar 2, 2023

Controls.Sample is compiling now (but not working)

Ready to review/merge

@jsuarezruiz jsuarezruiz merged commit 33daf8b into jsuarezruiz:main-linux Apr 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.