Skip to content

🚩(frontend) version MIT only #911

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

🚩(frontend) version MIT only #911

wants to merge 2 commits into from

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Apr 28, 2025

Purpose

We have some packages that are not MIT compatible, so if the env var MIT_ONLY is set to true, we don't build the application with features that are not MIT compatible.
For the moment, it concerns only the export packages.

Proposal

Set the environement variable:
MIT_ONLY=false -> will include the export feature

  • 🚩(frontend) version MIT only

Demo

Thanks to the treeshacking, the packages of the features not included will not be included as well.
toReactPDFDocument is a method from @blocknote/xl-pdf-exporter, we will search the method in the js files of the app:

With MIT_ONLY=false
image

With MIT_ONLY=true
image

@AntoLC AntoLC self-assigned this Apr 28, 2025
@AntoLC AntoLC force-pushed the refacto/agpl-version branch 5 times, most recently from c397033 to 1e66bcd Compare May 2, 2025 13:23
@virgile-dev
Copy link
Collaborator

Hey! Keep in mind that this has to work for all XL packages that have AGPL licences that we will want to include.

We have some packages that are not MIT compatible,
so if the env var MIT_ONLY is set to true,
we don't build the application with features
that are not MIT compatible.
For the moment, it concerns only the export packages.
@AntoLC AntoLC force-pushed the refacto/agpl-version branch from 1e66bcd to 9166e7b Compare May 2, 2025 15:00
@bzg
Copy link
Collaborator

bzg commented May 5, 2025

The name MIT_only is ambiguous: does it mean you only want MIT licensed libs? or you want to publish under MIT?

The "only" seems to indicate you only want MIT-licensed lib, which I guess is not what you really want.

I suggest PUBLISH_AS_MIT to capture the question "Do you want to publish (your build) as MIT or not?", leaving the scenarios open in case the answer is "No" (the user can then publish as AGPL or under proprietary terms.)

@AntoLC
Copy link
Collaborator Author

AntoLC commented May 5, 2025

The name MIT_only is ambiguous: does it mean you only want MIT licensed libs? or you want to publish under MIT?

The "only" seems to indicate you only want MIT-licensed lib, which I guess is not what you really want.

I suggest PUBLISH_AS_MIT to capture the question "Do you want to publish (your build) as MIT or not?", leaving the scenarios open in case the answer is "No" (the user can then publish as AGPL or under proprietary terms.)

I changed it to PUBLISH_AS_MIT.

By default PUBLISH_AS_MIT is at true, meaning without the export feature.

PUBLISH_AS_MIT=true

It will have to be set to false explicitly before building the image in order to have the export feature.
PUBLISH_AS_MIT=false

Could you give a hand you think about how to document this env variable in our documentation ?

@AntoLC AntoLC force-pushed the refacto/agpl-version branch from 3693f0c to 2779c61 Compare May 5, 2025 14:12
@bzg
Copy link
Collaborator

bzg commented May 6, 2025

While attempting to find my way through documenting PUBLISH_AS_MIT, I've opened this PR for minor fixes against docs/env.md and this issue for some other env variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants