-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Strange build errors #24
Comments
The library builds fine. It's the example apps that are blowing up. |
I did have to upgrade to the latest version of Avalonia recently, so that probably broke the sample. I’ll take a look! |
if you’re open to it, I’d suggest setting up CI in github. It keeps the build honest and protects against bitrot. Avalonia moves so quickly it’s hard to keep versions straightAm 10/23/23 um 6:48 PM schrieb Jordan Marr ***@***.***>:
I did have to upgrade to the latest version of Avalonia recently, so that probably broke the sample. I’ll take a look!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
There was a global.json file that was preventing me from even loading. After modifying that, I was able to build and run the Now I'm waiting for |
I am bad about putting off build automation because I have so many projects. |
I’ve managed a bunch of software efforts and the barrier (mental and organizational) always seems high but it’s a real time saver long term. I’ve found the automation in github pretty good too. They help with crafting config files and it was relatively painless. Might be harder if you’re trying to build simultaneously for 4 platforms. Was also thinking that if there’s a way of hosting the wasm version statically you could put the pipeline build output on web site as a demo. Am 10/23/23 um 7:15 PM schrieb Jordan Marr ***@***.***>:
if you’re open to it, I’d suggest setting up CI in github. It keeps the build honest and protects against bitrot. Avalonia moves so quickly it’s hard to keep versions straight
I am bad about putting off build automation because I have so many projects.
But you're right - it always is nice to have once setup.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
I definitely setup build pipelines for all of my professional projects, but those are all on Azure DevOps. Now, 15m and 6+ commits into setting up a basic build for this repo and still cannot figure out how to specify the root. lol |
I always use FAKE to do my builds because I despise the I've actually been wanting to try Fun.Build for a while. Maybe now is the time! |
Feel free to help with the build. I've tried for the last 45 minutes to do the most basic yml build script. |
On Mon, Oct 23, 2023 at 08:02:24PM -0700, Jordan Marr wrote:
Feel free to help with the build. I've tried for the last 45 minutes to do the most basic yml build script.
Maybe I'm just missing where it "helps" with creating the build, because it seems like I'm editing a text file with no intellisense.
Will take a look - interesting - it almost forced me to do my last one,
offering a basic template that almost worked out of the box. yml
without intellisense is evil. I have to admit I wasn't wild about the
gitLAB version but when it worked it was nice. One day they changed the
semantics of variable expansion and allowed dollar signs to expand
within the values of other dollarsign variables, and unfortunately one
of our build passwords had a dollarsign in it and hilarity ensued...
I'll take a look
Darren
|
On Mon, Oct 23, 2023 at 09:34:14PM -0700, daz10000 wrote:
On Mon, Oct 23, 2023 at 08:02:24PM -0700, Jordan Marr wrote:
> Feel free to help with the build. I've tried for the last 45 minutes to do the most basic yml build script.
> Maybe I'm just missing where it "helps" with creating the build, because it seems like I'm editing a text file with no intellisense.
>
Will take a look - interesting - it almost forced me to do my last one,
offering a basic template that almost worked out of the box. yml
without intellisense is evil. I have to admit I wasn't wild about the
This was the one I did for another project
https://github.com/demetrixbio/GslCore/blob/deacf55392dd9451416251757e2ca281b5c00e59/.github/workflows/dotnet.yml
I think I just clicked on github actions, made a new action and then let
it make a guess based on the type of project.
Got to github actions, new actions. From the getting started panel,
pick .Net continuous integration
FWIW, this is what it suggestions on my fork of the repo
```
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: ***@***.***
- name: Setup .NET
uses: ***@***.***
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
```
`
Darren
|
I sent you a PR. I only needed one small change to get it running
#25
Darren
|
Thank you! It's been a long day of solving problems. |
Now that you got that working, I went ahead an setup Fun.Build, just for fun: build.fsx |
First attempt to download workloads failed: |
Right now I'm setting up miniscaffold for my project and then going into the "src" it builds to "new up" an Elmish.Avalonia project by hand. The entire reason I started this was I was expecting to just copy over the XPlat example and then wire it into the build infra. |
Is there a wrinkle with .NET7 and mobile workloads? In most cases I've retreated to .NET6 but that's just a reflex/abundance of caution. |
I tried changing all the projects to net6, but there is still an issue with the workloads. As of now, the |
OK - I'm out-of-office for the next handful of hours - the weather is just too good and I've got some things to do that require daylight. 🌞 But I'll circle back to this after I get to a notch point. Thanks for looking into it. @daz10000 @JordanMarr 👍 👍 |
I got everything updated to the latest Avalonia v11.0.5. https://github.com/JordanMarr/Elmish.Avalonia/actions/runs/6635424599/job/18026327450 |
nice! It probably has to install the workload from scratch and do all the setup each time. That’s wonderful in terms of maintenance. I’mabout to start a couple more projects with the framework so it will get some more exercise. Thanks as alwaysDarrenAm 10/24/23 um 8:58 PM schrieb Jordan Marr ***@***.***>:
I got everything updated to the latest Avalonia v11.0.5.
XPlat sln now builds.
CI build now successfully builds the XPlat sln as well. (Not sure why it took 18m though.)
https://github.com/JordanMarr/Elmish.Avalonia/actions/runs/6635424599/job/18026327450
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Yeah it definitely has to install the workloads, but it was the build of the xplat sln that takes 11m! |
I ended up spending some time last night with Jimmy Byrd's miniscafflod to grok its structure. He just added a feature to be able to dovetail additional projects and wire them up to use the scaffold. While I'm still picturing hand-jamming Elmish.Avalonia's XPlat sample with copied files/folder structure, it inspired me to scout out the differences in tooling to see if there's a "paved path" that can be made. That's part of what I'm mucking around with this morning. |
Weird - cleaned and rebuilt the library and the XPlat CHart is OK - but the "simple" sample is still just rendering a transparent window. |
there was a residual bug for me on the cross platform version that if I click away from the chart and then come back to it, it stops working. The terminate background seems to be permanent. I didn’t have that problem with the desktop only version. I haven’t checked the latest build, but I wanted to debug that at some point.Am 10/25/23 um 4:50 PM schrieb Houston Haynes ***@***.***>:
Weird - cleaned and rebuilt the library and the XPlat CHart is OK - but the "simple" sample is still just rendering a transparent window.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The regular "AvaloniaExample" project "transparent window" issue should be fixed now. I just had to update to the latest Avalonia version 11.0.5. |
The issue occurs on the XPlat version because you changed the tab mechanism to use the Avalonia In the original AvaloniaExample "MainView.axaml", there is a single <DockPanel LastChildFill="true">
<StackPanel Classes="nav" Orientation="Horizontal" DockPanel.Dock="Top" HorizontalAlignment="Stretch">
<Button Classes="tab" Content="Counter" Command="{Binding ShowCounter}" />
<Button Classes="tab" Content="Chart" Command="{Binding ShowChart}" />
<Button Classes="tab" Content="File Picker" Command="{Binding ShowFilePicker}" />
<Button Classes="tab" Content="About" Command="{Binding ShowAbout}" />
</StackPanel>
<ContentControl Content="{Binding ContentVM}" />
</DockPanel> Example:
In your XPlat example, you used the So, if you want to use the Just know that getting rid of I went ahead and removed |
I fixed let vm =
AvaloniaProgram.mkSimple init update bindings
|> AvaloniaProgram.withSubscription subscriptions
|> ElmishViewModel.create
|> ElmishViewModel.subscribe (fun view model dispatch ->
view.Unloaded |> Observable.subscribe (fun _ ->
dispatch (Msg.SetIsAutoUpdateChecked false)
)
) Pretty cool that |
That is fascinating... and useful. On a total side note - as I was clicking through the site I noticed that the color scheme of the button controls in the Chart view had changed, and the "Ok" buttons had gone missing from a few views. I thought it was a good example of that global message but has become a bit ragged now that it's even missing from the About View. Is there any reason for that? It's not a deal breaker - just curious. |
Looks like the Ok buttons were commented out in the XPlat views.
|
feel free to mess with that, it didn’t feel as natural to me in a single window flow with tabs but both work and are interesting examples. Am 10/25/23 um 10:22 PM schrieb Jordan Marr ***@***.***>:
Looks like the Ok buttons were commented out in the XPlat views.
Probably because the change to use TabControl for navigation would break the GoHome message.
You could hook it back up if you wanted to, but the implementation would have to change.
Subscribe to GoHome message in MainViewModel
Create a "SelectedTab" binding to programmatically set the currently selected tab
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
You make a good point - it begs the question of what to show in an "example" for interactivity in navigation. I wouldn't necessarily want to over complicate things by having two navigation styles in one app. Does it warrant two branches? Either way this is relatively new to me so I'm learning as I go. |
Then I run fun.build and I'm getting the Android .NET6 +7 bits... PIPELINE CI is finished in 304694 ms It keeps hinting I have a reboot pending so will do the honors and come back (this is all just to get the Avalonia previewer in VSCode to give me something back - I have Rider but I'm a curious type ) :) |
It's also interesting to note that in one case there's an error message in the build-on-boot process where I'm seeing a prompt to go and download wasm-tools-net7 as opposed to what I've seen for other workloads and fun.build just fetching what it needs.
So in a fit of pique I decided to run dotnet workload restore
Installing workloads:
Successfully installed workload(s) android ios macos wasm-tools. So again I don't want to get wrapped around the axle but it seems like there's a bit of a misalignment between what fun.build is building and what VSCode's Avalonia extension can "see" as having been built. |
Oh wait - desktop runs but web fails
|
Well I'm out of ideas with the XPlat for now but have the desktop sample app running on .net6 with no complaints. So that's where I'm going to focus for the moment. 👍 |
Could be that the global.json is affecting things wrt net6/net7? |
I went through and updated all of the global.json files as well as retargeted the fsprojs and so far only the desktop on .net6 will build and run. What I'm seeing is some complaints about the Avalonia version not supporting .net6 - I understand why there's a push to get everything on 11.0.5/.NET7 - I'm just not sure "how to square the circle" in the build script such that those dependencies are changed consistently when the target(s) change. C:\repos\Elmish.Marr.Avalonia\src\Samples\AvaloniaXPlatExample\AvaloniaXPlatExample.Android\AvaloniaXPlatExample.Android.fsproj : error NU1202: Package Avalonia.Android 11.0.5 is not compatible with net6.0-android31.0 (.NETCoreApp,Versio
n=v6.0). Package Avalonia.Android 11.0.5 supports: net7.0-android33.0 (.NETCoreApp,Version=v7.0) [C:\repos\Elmish.Marr.Avalonia\src\Samples\AvaloniaXPlatExample\AvaloniaXPlatExample.sln] |
I’ll see if I can get web working again. It has been a while since I checked. My general instinct is to move forward since 8 is nearly here and just troubleshoot 7 but that might be a mistake. Re the ok button, it sounds like having it is more useful and keeps the apps consistent so please feel free to restore that. When I was wiring up the file picker, I was wondering how that would behave on web and mobile and whether it would break those environments. Am 10/26/23 um 7:15 AM schrieb Houston Haynes ***@***.***>:
Could be that the global.json is affecting things wrt net6/net7?
I went through and updated all of the global.json files as well as retargeted the fsprojs and so far only the desktop on .net6 will build and run.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
well hell - I partially take it back - moving EVERYTHING to .NET7 and upgrading deps on Elmish.Avalonia to Avalonia 11.0.5 meant that XPlat desktop works. There's still the wrinkle of the WASM client not behaving - and Android doesn't like my target being set to |
I haven’t touched it - that’s from the original avalalonia template Am 10/26/23 um 7:40 AM schrieb Houston Haynes ***@***.***>:
Has the iOS project ALWAYS been a .csproj?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
OK - yeah I guess I didn't move the change back to the sample project because I definitely make is an fsproj in my "SunFlwr" project. Sorry about that - pretty high-distraction environment. 😄 I was trying to get Bluetooth to work between the phone and my WildernessLabs Meadow board. |
Re: "Ok" buttonsIMO, it's not worth creating a new branch just for that since it already exists in the original non-xplat example. NavigationIt would be nice to have a more formalized navigation subsystem baked into the project. A fully-fledged nav system would:
Not sure if that has a place in a library like this, or if it would be more a 3rd party library concern, but it would be nice to have. Might make it a little less like the "wild west". Re: net6/7I agree that we are so close to net8 that we should probably just keep looking forward as much as possible. Especially considering that this is all very bleeding edge. net6 is soon to be behind us! Re: workloadsI had lots of issues with getting the workloads working properly in the build. Unfortunately, what worked on my machine when I ran the script locally did not always work on the build machine. Workloads are still new to me, (although I am also doing a MAUI project which uses them as well), so I'm totally stumbling along here. |
I hear you on all counts. The wrinkles in Avalonia-vs-dotnet with the added "stretch goal" of making this buildable in a scaffold is a LOT of ambition. Once it's "in the can" and can reliably be built in a fire-and-forget manner it'll be incredibly compelling. 🚀 It does beg the question of where Avalonia stands with .NET8 -- and whether the lead time to getting them to play well together is going to be shorter. 🤔 I'm working on a POC that takes my attention as much to the backplane as it's tugging me toward giving attention to UX. So I'll be hopping back and forth a bit. For now I can be relatively conservative and run the desktop app on .NET6 which will let my team plow ahead a bit. I will come back to XPlat from time to time, though, as part of our use case is to showcase a full mobile app experience. https://github.com/Rower-Consulting/Aiden I agree with your summation on navigation, and definitely want to help come up with a "paved path" for that sub-domain which makes sense for more than one common scenario. That's why I appreciated seeing the TabControl method and stretching my brain a bit over how you suggested some modifications.
It would be nice to have a pattern which allowed appropriate control/context switching that didn't step on one model over another. Though now that I think of it I wonder if they really need to coexist or would the user simply choose one over the other... 🤔 For my own case, I'm considering some options in how much work to do "at the edge" versus pushing things down to the backplane when the user's eyes aren't on the screen/view. I've thought about the client app "minding the store" on sliding windows of data (via pub/sub using SignalR) and therefore keep certain processes running in-app even if it's not the "visible" thing from the user's point of view. The idea is that the user can see everything the "machine" sees as the data surfaces. I'll just have to experiment to see if the typical "rehydrate on making a view active" model will have the immediacy I'm looking for. This is fun! I really appreciate you both helping me with deepening my understanding here. 🧠 ❤️ |
And FWIW when I run the build locally it does chunk through checking that the workloads are installed which has some lag. I had wondered if there's a way to structure the build process to simply look for the presence of the workload instead of simply "install workload" and letting the tool figure out it's already there... if I get a hot second to check into that it might help improve local build times. |
my (admittedly lazy) practice recently has been to run dotnet build in either the desktop application folder, or the core application folder when I’m troubleshooting something really basic. It’s a quick design build test cycle. Once that’s working, I Run build in the Web app folder and can check that out. I haven’t broken anything. It’s usually pretty fast.Am 10/27/23 um 7:42 AM schrieb Houston Haynes ***@***.***>:
And FWIW when I run the build locally it does chunk through checking that the workloads are installed which has some lag. I had wondered if there's a way to structure the build process to simply look for the presence of the workload instead of simply "install workload" and letting the tool figure out it's already there... if I get a hot second to check into that it might help improve local build times.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
So I re-sync'd my forked repo to yours here and then tried to build and all sorts of things started going sideways. I thought it might have been me doing something wrong in rebasing so I cloned your repo directly and tried do a workload restore and re-build. After giving me some guff about System.ReactiveUI needing to be on 5.0 (which I complied with) I got an entire litany of errors. It's been a while so I'm just wondering if a missed a memo. Any thoughts? Thanks!
The text was updated successfully, but these errors were encountered: