KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.41k stars 188 forks source link

Instructions do not work for latest Release on Mac #731

Closed dansiegel closed 5 months ago

dansiegel commented 7 months ago

Following the instructions for installing on MacOS do not seem to be working.

I have the new M3 Max. I downloaded the StructuredLogViewer-arm64.zip from the the latest release. I made sure that I have the security settings to allow apps from identified developers

Screenshot 2023-12-06 at 8 47 47 PM

After unzipping I moved the app to the Applications directory. I opened the terminal and ran the command as provided chmod +x /Applications/Structured\ Log\ Viewer.app/Contents/MacOS/StructuredLogViewer.Avalonia which did not work

dansiegel@Dans-MacBook-Pro-M3-Max ~ % chmod +x /Applications/Structured\ Log\ Viewer.app/Contents/MacOS/StructuredLogViewer.Avalonia
chmod: /Applications/Structured Log Viewer.app/Contents/MacOS/StructuredLogViewer.Avalonia: No such file or directory
dansiegel@Dans-MacBook-Pro-M3-Max ~ % 

I let autocomplete provide the correct path:

dansiegel@Dans-MacBook-Pro-M3-Max ~ % chmod +x /Applications/StructuredLogViewer.app/Contents/MacOS/StructuredLogViewer.Avalonia

That seemed to work... however when I think right click and select Open I get the following error:

Screenshot 2023-12-06 at 8 46 37 PM
slang25 commented 6 months ago

I can confirm this as well, for the last few months I've been building from source as a workaround on my M2

KirillOsenkov commented 6 months ago

Sorry folks, someone with a mac is going to have to investigate this, I have no throughput for the mac version right now. If no one gets to this first, I hope to have some time in the new year.

slang25 commented 6 months ago

I would like to help 🙂

I have a few things I would like to get done over the next month and would be interested to know your thoughts on the sequencing of them:

This would be pulling together the works from these PRs/branches:

Although I don't want to tread on any toes, so if the above works are already being planned in then I'd be happy to wait for them.

KirillOsenkov commented 6 months ago

@slang25 I really appreciate your offer to help!

Most of it is up for grabs. Unfortunately I personally don't have the resources or motivation to work on Mac and Linux versions. I do have plans to continue improving and maintaining the Windows version.

One thing before we do any Avalonia work is I wanted to introduce some partial classes and move as much shared code into linked files shared between WPF and Avalonia projects. Specifically the BuildControl.xaml.cs are huge classes that contain tons of duplication. We should make a pass and for all members that are exactly the same, extract them to a partial class and include in both projects. Also see if there are more opportunities to reduce duplication.

Avalonia and Avalonia in the browser seem fine, just want to get rid of the duplication as much as possible and ensure the Avalonia version is up-to-date with the Windows version in terms of latest source and functionality. I admit as I was adding features I often didn't have the time or energy to also add them to the Avalonia fork, so it does lag behind. There's an in progress PR to move Avalonia to 11 and add browser version: https://github.com/KirillOsenkov/MSBuildStructuredLog/pull/645

In regards to updating to .NET 8, from my measurement the performance of loading binlogs is much slower on Core than it is on Desktop. This needs to be investigated because I'd expected Core to be much faster than desktop, and that's currently not the case. I have a series of internal binlogs that I can't share that I do perf testing with. The largest binlog is 900 MB, and it takes 3 min to open with desktop and 5 minutes to open with Core. I don't think we can move to Core until it's faster. Also moving to Core introduces a headache of how to distribute the runtime. If we include the runtime with the installer, it increases the update size significantly, and will use up people's bandwidth. If we require the runtime to be already installed, this introduces friction for the end users. Perhaps we could look into https://github.com/Tyrrrz/DotnetRuntimeBootstrapper.

With GitHub Actions, we currently use signpath.io who are graciously providing a certificate to sign the installer .exe. It integrates with AppVeyor and I'm not sure whether they've added support for GitHub Actions or not yet. Last time I checked it was not available.

Mac notarization and owning the macOS app would be very welcome! I'm sure many people would appreciate it.

I myself don't plan on doing any of the above (maybe except doing the unification pass to extract shared code into linked files). If I do the unification, I'd want to do it before the end of the year hopefully.

So any help here would be welcome! Please keep me posted before you get started on anything just to confirm.

gaoyang commented 6 months ago

@dansiegel It worked for me. dotnet /Applications/StructuredLogViewer.app/Contents/MacOS/StructuredLogViewer.Avalonia.dll

akoeplinger commented 5 months ago

Since I just ran into this as well another workaround is to codesign the app bundle, it looks like something is wrong there.

codesign -s- --deep StructuredLogViewer.app
rmarinho commented 5 months ago

@akoeplinger saves the day again :)

KirillOsenkov commented 5 months ago

Could someone volunteer a PR to update the instructions here: https://github.com/KirillOsenkov/MSBuildStructuredLog/blob/main/README.md#installing-the-avalonia-version-on-mac

not sure when should that step be run in the order

KirillOsenkov commented 5 months ago

Should we close this bug?

slang25 commented 5 months ago

Yes, I was facing the same issue and the new instructions have worked :tada:

dansiegel commented 5 months ago

Closing this as the updated docs do work.