Skip to content

split electron-builder config to a separate file from build script #4431

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

Merged
merged 2 commits into from
Dec 9, 2023

Conversation

selfisekai
Copy link
Contributor

@selfisekai selfisekai commented Dec 8, 2023

Title

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Description

allows to use electron-tasje instead of _scripts/build.js (tasje --config ./_scripts/ebuilder.js pack).

Screenshots

Testing

manually

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

typical distro policies disallow packaging prebuilt binaries, in this case of electron (e.g. https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packaged/#prebuilt-binaries-or-libraries). tasje takes an electron-builder config and packages the app without downloading anything

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 8, 2023 20:17
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 8, 2023
@absidue
Copy link
Member

absidue commented Dec 8, 2023

Just a warning that if you aren't going to use the pre-bundled electron, make sure that you lock the version in the distro dependency to the same major version the FreeTube uses. Both AUR and NixOS made the mistake of not ensuring that the version is the same and then ended up with completely broken FreeTube installs (crashing and sitting on a blank window forever).

We don't do releases very often, so it's not uncommon for FreeTube to be a few major versions of Electron behind the latest version and major versions come with breaking changes. So while it might work completely fine in your testing now, it might just "suddenly" break one day, when your distro decides to upgrade it's version of Electron.

Copy link
Member

Choose a reason for hiding this comment

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

Could you please add the word config to the name of this file, as ebuilder doesn't indicate it's purpose very well on it's own.

auto-merge was automatically disabled December 8, 2023 20:53

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 8, 2023 20:53
@selfisekai
Copy link
Contributor Author

in Alpine Linux I'm the maintainer of the electron package, every app gets rebuilt with a major version upgrade of electron

@absidue
Copy link
Member

absidue commented Dec 8, 2023

Rebuilding alone is not enough, you also need to make sure that the version of Electron in the package.json matches up with the one you are running it on and make sure that the app code doesn't use any removed APIs.

So unless you are planning on doing extensive testing on FreeTube every time you upgrade Electron, please lock the version. The fact that you describe your own tasje tool in it's README as absolutely terrible for app developers, does not inspire me with confidence that we won't have to deal with another AUR or NixOS situation again, because when stuff breaks, people come to us first.

@selfisekai
Copy link
Contributor Author

Rebuilding alone is not enough, you also need to make sure that the version of Electron in the package.json matches up with the one you are running it on and make sure that the app code doesn't use any removed APIs.

the buildscripts are also adjusted to use our node headers, packaged together with the electron. this has failed build-time, delaying electron updates (like now), but so far never on runtime

@absidue
Copy link
Member

absidue commented Dec 8, 2023

Please either lock the version or do extensive testing before releasing Electron upgrades, because when you break FreeTube people come to us first, not you. I'm sure that both the AUR and NixOS maintainers had the same confidence that you have, but they still ended up breaking stuff with upgrading Electron to version that FreeTube didn't support.

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

yarn build:arm64 works fine

@FreeTubeBot FreeTubeBot merged commit 407bcda into FreeTubeApp:development Dec 9, 2023
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 9, 2023
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Dec 9, 2023
* development:
  split electron-builder config to a separate file from build script (FreeTubeApp#4431)
  Translated using Weblate (Ukrainian)
  use swiper.js instead of tinyslider (FreeTubeApp#4427)
  Translated using Weblate (Welsh)
  Added translation using Weblate (Welsh)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Finnish)
  Translated using Weblate (Hungarian)
  Various small watch page changes (FreeTubeApp#4423)
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.

5 participants