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

πŸ›€οΈ tracking: EmberData Embroider Support #8103

Closed
23 of 25 tasks
runspired opened this issue Aug 5, 2022 · 4 comments
Closed
23 of 25 tasks

πŸ›€οΈ tracking: EmberData Embroider Support #8103

runspired opened this issue Aug 5, 2022 · 4 comments

Comments

@runspired
Copy link
Contributor

runspired commented Aug 5, 2022

Embroider Support

While not originally in scope of 🌲 Project Trim (as embroider was but a twinkling in our eye when it began), to consider Project Trim (#6166) complete we should:

  • be able to be included in an embroider app without any custom build adapters
  • have embroider support and embroider+fastboot tests that catch regressions.

We intend to have this work complete before 5.0, and will add it to the 5.0 roadmap in #8086

Prior Art

The steps to complete this are:

Stage 1

  • move all non-package code (tests, scripts etc.) out of published packages
  • convert to pnpm
  • replace ember-fetch dynamic require with Fastboot.require / importSync (see note 1)
  • deprecation flags converted to macros (see note 2)
  • feature flags converted to macros (see note 2)
  • log instrumentation converted to macros
  • package presence checks converted to macros (see note 1)
  • DEBUG guards converted to macros
  • convert @ember-data/debug (HAS_DEBUG_PACKAGE) package presence check to macros
  • @ember-data/store/-debug filtering converted to macros (see note 2)
  • add embroider test scenarios (legacy-compat)

Stage 2

  • packages/-ember-data converted to v1-lite (see note 3)
  • packages/private-build-infra converted to v1-lite
  • packages/canary-features converted to v1-lite
  • packages/serializer converted to v1-lite
  • packages/adapter converted to v1-lite
  • packages/record-data converted to v1-lite
  • packages/model converted to v1-lite
  • packages/store converted to v1-lite
  • packages/debug converted to v1-lite (see note 4)

Stage 3

notes:
[1]
importSync is unable to distinguish currently the presence of a package due to it being from the same monorepo vs it actually being in the dep tree. We may require converting to pnpm to resolve this issue (non-trivial, see #8087). It may also take doing some work to the macro to make it understand this situation.

[2]

  • we want to keep the DX of importing the boolean flags
  • we want to keep the ability for runtime configuration of feature flags for canary only
  • we want to keep the ability for consumers to configure their deprecation compatibility at build time
  • we want to continue not exposing anything not exported from the index file of -private directories

[3]
V2 Addons don't trigger consuming addon/app rebuilds currently. This is something the ergo will need to be
improved for. Turborepo/vite may be options. Improving DX directly in embroider may be necesssary.

[4]
The debug package has unique build-time requirements that may be tricky to convert to embroider.

@richgt has offered to take on this effort.

@runspired runspired added this to Quest Issues in 🌲 Project Trim 🌲 via automation Aug 5, 2022
@runspired runspired added this to Quest Issues in πŸ”Œ Project Unplug πŸ”Œ via automation Aug 5, 2022
@runspired runspired added 🌲 Project Trim 🌲 PRs related to https://github.com/emberjs/data/issues/6166 Infra/CI/DX πŸ”Œ Project Unplug πŸ”Œ labels Aug 5, 2022
@runspired runspired pinned this issue Aug 5, 2022
@runspired
Copy link
Contributor Author

landed conversion to pnpm which was blocking this effort

@NullVoxPopuli
Copy link
Sponsor Contributor

NullVoxPopuli commented Jul 24, 2023

@runspired runspired added this to the Polaris milestone Sep 11, 2023
@runspired runspired removed the Polaris label Sep 11, 2023
@runspired runspired modified the milestones: Polaris, πŸ”Œ Unplug Sep 11, 2023
@runspired runspired modified the milestones: πŸ”Œ Unplug, 🌲 Project Trim 🌲 Sep 11, 2023
@runspired runspired modified the milestones: πŸ”Œ Unplug, 🌲 Project Trim 🌲 Sep 11, 2023
@runspired runspired changed the title EmberData | Embroider Support Roadmap tacking: EmberData Embroider Support Sep 16, 2023
@runspired runspired changed the title tacking: EmberData Embroider Support tracking: EmberData Embroider Support Sep 16, 2023
@runspired runspired changed the title tracking: EmberData Embroider Support πŸ›€οΈ tracking: EmberData Embroider Support Sep 17, 2023
@runspired
Copy link
Contributor Author

The ideas in this spike may allow us to finish the v2 conversion #9292 and close out this ticket

@runspired
Copy link
Contributor Author

closing as we will be landing #9292

@runspired runspired unpinned this issue Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 Roadmap Infra/CI/DX 🌲 Project Trim 🌲 PRs related to https://github.com/emberjs/data/issues/6166
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants