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

Add SUPPORTS_LOCAL_API build flag #4931

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Apr 11, 2024

Add SUPPORTS_LOCAL_API build flag

Pull Request Type

  • Build improvement

Description

This pull request adds a new build flag SUPPORTS_LOCAL_API. Now that the local API no longer requires Electron specific functionality (e.g. reading and writing to the file system), it makes sense to place the local API behind a different build flag, this will reduce the maintaince burden on @MarmadileManteater for FreeTubeAndroid. This also has no impact on the Electron build, yes I checked the renderer.js file kept the same size that it had before this pull request (the UniversalCache class gets correctly treeshaken out).

Note for users that might see this pull request and get the wrong idea...

Important

This does not add support for the local API anywhere where it wasn't already supported before (Electron and the Android build in FreeTubeAndroid). Only set this flag to true if you know that the local API will actually run in the target environment, that means CORS bypasses and other things have to be in-place.

Testing

Electron

Check that the local API still works (you don't need to check everywhere, if it works in a few places, the rest should work too, as I copy pasted the name to avoid typos)

Web

  1. yarn run dev:web
  2. Check that the only option for the preferred backend setting is Invidious

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.20.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 11, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 11, 2024 21:59
@FreeTubeBot FreeTubeBot merged commit af29135 into FreeTubeApp:development Apr 12, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 12, 2024
@absidue absidue deleted the local-api-build-flag branch April 12, 2024 06:37
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