Guide for merging in changes after 1.99

Since the recent addition of the engine and widgets workspaces has changed the folder structure of CesiumJS quite a bit, we hope to provide some guide for migrating code changes from the older structure to the latest one.

First, you’ll want to merge in the latest changes:

# Fetch latest tags from origin. Note that if you are working on a fork, then instead of origin, you will use upstream.
git fetch --tags origin
# Merge in latest changes from 1.99 (pre-workspace)
git merge 1.99
# Merge in latest changes from after workspaces PR was merged.
git merge post-workspaces

At this stage, you may see some merge conflicts. We expect that most of these can be resolved following these steps:

  1. Move new files from the root level Source folder to the Source folder of the appropriate workspace. Any file that was originally in Source/Widgets (except CesiumWidget) should go into the widgets workspace. Anything else goes in the engine workspace.
  2. Ensure that the imports are updated correctly:
    • For files in Specs, imports for common test functions like createScene will need to be updated.
    • For files in Specs, imports for the workspace they are testing will need to be imported. Instead of importing from the root level Cesium.js file, you will need to import from the index.js at the root of the workspace. This file is generated once you run the build script.
    • Any imports from another workspace should be imported from the package name.
  3. Delete any new files that are in the root level Source folder.

If you run into any more issues, please let us know.

1 Like