Skip to content

Master punch list for resolving Fastboot 1.0 build issues #360

@kratiahuja

Description

@kratiahuja

This issue with track the things we need to do in order to resolve the fastboot build. This issue supersedes #264, #246 etc. Once this master list is resolved, fastboot build and serve issues should be resolved.

Pre requisites

With the help of ember-cli team, we have come up with a viable solution to resolve the double builds. The solution is described in the meeting notes here.

Build blockers

Following are the things we need to do in ember-cli-fastboot. The sub items under each section are more of a checklist:

  • Build fastboot overrides using treeForPublic hook per the new build spec. It will works as follows:
    • Collect the fastboot-app tree from the project addons and create a funnel for every addon tree with destDir as appName-fastboot
    • Collect the fastboot-app tree from the root app and create a funnel for the app fastboot tree with destDir as appName-fastboot
    • Merge the trees collected from the addons and app and create a new Funnel
    • Run the JS transpilation on the new funneled tree using ember-cli-preprocess-registry/preprocessors API. Use the preprocessJs method from the preprocessors with providing the registry
    • Concat the output of transpilation with outputFile set to assets/appName-fastboot.js
    • Merge the above output tree with the tree returned from treeForPublic
  • Make sure the fastboot-app tree in app is a watched directory tree. Most likely it will be otherwise follow treeForGenerator does here
  • Update FastBootConfig broccoli plugin to add assets/appName-fastboot.js in appFiles manifest list of package.json. The corresponding code is here
  • Update existing intializers of ember-cli-fastboot per the new spec
  • Expose a hook to add to manifest files
  • Remove the old fastboot double build spec
    • Remove usage of private ember-cli patching from ember-cli-fastboot. See example here
    • Remove invoking fastboot-filter-initializers in ember-cli-fastboot. See relevant example changes here
    • Remove config function from ember-cli-fastboot/index.js
    • Set app-boot contentFor correctly. See example here
    • Fix config-module contentFor hook to not rely on __is_building_fastboot__ flag. See example fix here
    • Remove preconcat function as it will be unused in new build spec
    • In postprocessTree hook, we should invoke FastBootConfig broccoli plugin directly instead of invoking FastBootBuild broccoli plugin. See example changes here
    • Remove FastBootBuild broccoli plugin as it will be unused
  • Update tests
  • Kill ember fastboot command 🔪
  • Kill usage of process.env.EMBER_CLI_FASTBOOT flag as it will be unavailable in new build spec 🔪
  • Doc updates
    • Update addon guide to not have usage of process.env.EMBER_CLI_FASTBOOT flag
    • Update user guide with example to how to add/override fastboot specific functionality in app using fastboot-app and app folders.
    • Update addon user guide on how to write to vendorFiles or appFiles array. Only meant for advanced usage.
  • Update some of the exisiting addons to not rely on process.env.EMBER_CLI_FASTBOOT flag or not contain app/[instance-]initializers/[browser|fastboot]/*.js folder structure. These addons should follow the new build spec
    • ember-network
    • ember-cli-head
    • Identify other addons that need to be updated
  • Decide FastBoot release version number with the new build spec. Should we do 1.0 or 2.0? (owners: @rwjblue @tomdale )
  • Close all open issues in ember-cli-fastboot related to build and/or serve since the new build spec should resolve it.
  • Release FastBoot! 🎉
  • Blog on FastBoot? (owners: @rwjblue @tomdale )

cc: @danmcclain @rwjblue @tomdale @leitsubomi @arjansingh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions