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

A set of tweaks to simplify electron packaging #421

Merged
merged 2 commits into from Feb 13, 2023

Conversation

paulfitz
Copy link
Member

@paulfitz paulfitz commented Feb 4, 2023

This makes some changes which allow an Electron version of Grist to be build using grist-core as a submodule (see https://github.com/paulfitz/grist-electron). This should make it easy to keep the Electron version up to date, without bulking up grist-core. Broadly, the changes are cleanup, and more hooks.

  • Replace ormconfig.js with a newer mechanism of configuring TypeORM that can be included in the source code properly. The path to ormconfig.js has always been awkward to handle, and eliminating the file makes building different Grist setups a bit simpler.
  • Remove electron package. It is barely used, just for some old remnants of an older attempt at electron packaging. It was used for two types, which I left at any for now. More code pruning is no doubt possible here, but I'd rather do it when Electron packaging has solidified.
  • Add a hook for replacing the login system, and for adding some extra middleware the login system may need.
  • Add support for some more possible locations of Python, which arise when a standalone version of it is included in the Electron package. This isn't very general purpose, just configurations that I found useful.
  • Support using grist-core within a yarn workspace - the only tweak needed was webpack related.
  • Allow an external ID to be optionally associated with documents.

  * Replace `ormconfig.js` with a newer mechanism of configuring
    TypeORM that can be included in the source code properly.
    The path to `ormconfig.js` has always been awkward to handle,
    and eliminating the file makes building different Grist setups
    a bit simpler.
  * Remove `electron` package. It is barely used, just for some old
    remnants of an older attempt at electron packaging. It was used
    for two types, which I left at `any` for now. More code pruning is
    no doubt possible here, but I'd rather do it when Electron packaging
    has solidified.
  * Add a hook for replacing the login system, and for adding some
    extra middleware the login system may need.
  * Add support for some more possible locations of Python, which
    arise when a standalone version of it is included in the Electron
    package. This isn't very general purpose, just configurations
    that I found useful.
  * Support using grist-core within a yarn workspace - the only tweak
    needed was webpack related.
  * Allow an external ID to be optionally associated with documents.
app/server/lib/FlexServer.ts Outdated Show resolved Hide resolved
app/server/mergedServerMain.ts Outdated Show resolved Hide resolved
Comment on lines 145 to 149
// "cli": {
// "entitiesDir": `${codeRoot}/app/gen-server/entity`,
// "migrationsDir": `${codeRoot}/app/gen-server/migration`,
// "subscribersDir": `${codeRoot}/app/gen-server/subscriber`
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering why this was commented out.

Copy link
Member Author

Choose a reason for hiding this comment

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

These settings aren't a thing anymore. typeorm/typeorm#9659

Deleted the code fully now.

Copy link
Contributor

@georgegevoian georgegevoian left a comment

Choose a reason for hiding this comment

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

Thanks @paulfitz.

@paulfitz paulfitz merged commit f7f76fb into gristlabs:main Feb 13, 2023
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.

None yet

2 participants