Skip to content

Conversation

@softworkz
Copy link
Collaborator

This PR may seem contradictive at first sight.. :-)

It does this:

  • Adds a build-time check when publishing that the package building is executed on the same OS which the packages are targeting
    This has caused user confusion because it can too easily be gotten wrong. Now it's no longer possible to build for OS A on OS B.
    One exception: Linux packages can be build on Windows (WSL)
  • Introduces cross-platform behavior for npm install
    This means for example: When you are on Windows and osx-x64 is selected as RID, then the npm restore will do the restore as if it was on OSX.
  • Automatically sets executable flag when running in unpackaged dotnet-first mode (= usually debugging)
  • Adds a runtime check for mismatch between the RID for which the application has been built and the actual OS on which it's being run
    In case of mismatch, it exists with an appropriate error message
    (it would fail anyway, but without explanation otherwise)

So - why do x-platform npm restore first and then error out on platform mismatch when publishing?

It's all about debugging - remote debugging. And again, the fast way is of course without packaging - i.e. how debug is working now. For remote debugging, we need to have everything ready to work on the target/remote machine. For .net it's not a problem anyway, but the Electron executable is platform-dependent, This PR allows to get the right one, so that we can end up with a file set which runs on the target direct.ly, without any additional steps needed.

Copilot AI review requested due to automatic review settings December 15, 2025 11:43

This comment was marked as resolved.

@github-actions
Copy link

github-actions bot commented Dec 15, 2025

pr-comment: Run #2

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
1372 1210 0 0 0 162 0 2m 54s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FlorianRappl FlorianRappl added this to the 0.4.0 milestone Dec 15, 2025
Copy link
Collaborator

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one !

@softworkz
Copy link
Collaborator Author

Great one !

I need a package

😍

@FlorianRappl FlorianRappl merged commit 368ef41 into ElectronNET:develop Dec 17, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants