question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Idea: Experimental feature flags for CesiumJS

See original GitHub issue

Thinking about the future of the Model.js refactor (a large part of #9520), one concern is migration will prove difficult, as there are many, many intertwined features there.

To help avoid creating staging branches for many months on end, it would be nice if we had some standard mechanism for enabling/disabling experimental features. This way, users can try out new features before they are fully finished.

For example, for 3D Tiles it would be very helpful if the contents could do something along the lines of:

var model;
if (ExperimentalFeatures.enable3DTilesNextModel) {
    // Experimental version of Model. Basic rendering may work, 
    // but other features like animations and glTF 1.0 support are not yet implemented 
    // and may break.
    model = new Model2(...); 
} else {
    // Original Model.js implementation
    model = new Model(...);
}

Then applications only have to specify Cesium.ExperimentalFeatures.enable3DTilesNextModel = true to try the new version of Model.

This could be used for other large features in the future as well. The important thing would be to clearly mention that experimental features are subject to change from release to release, use at your own risk.

What are your thoughts, @sanjeetsuhag, @lilleyse, @ebogo1? Is ExperimentalFeatures something that would benefit CesiumJS in the long run? Are there any potential pitfalls to doing this?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ptrgagscommented, Jun 25, 2021

@ebogo1 That’s a good point, though I think we should keep this simple, just a flat list of flags for now.

ExperimentalFeatures.enable3DTilesNextModel;
ExperimentalFeatures.enableMeshopt;

I plan to make a PR for this early next week. In the code I’ll include a block comment so we can describe best practices for this from the start. Some ideas:

  • experimental features must have solid unit test coverage. This is not a replacement for a thorough PR review!
  • experimental features are intended for large work-in-progress features when there’s a benefit to merging the code sooner (e.g. to avoid keeping staging branches around).
  • experimental feature flags should ideally be short-lived - make it clear in the PR what needs to happen for the experimental feature to be promoted to a regular feature.
0reactions
ptrgagscommented, Nov 17, 2021

Closing this as ExperimentalFeatures is now available in the latest release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ExperimentalFeatures - Cesium Documentation
Flags to enable experimental features in CesiumJS. ... Experimental features are subject to change without Cesium's standard deprecation policy.
Read more >
3D Tiles Next CesiumJS Roadmap #9520
3D Tiles Next adds several new, experimental capabilities to 3D Tiles. Currently, they take the form ... Idea: Experimental feature flags for CesiumJS...
Read more >
Feature Flags: What They Are and How to Use Them
Learn about feature flags, the benefits they bring, and how the Space team is using them to deliver new functionality and collect feedback ......
Read more >
Detection of cesium in the atmosphere of the hot He-rich ...
We report the first detection of cesium (Z = 55) in the atmosphere of a white dwarf. Around a dozen absorption lines of...
Read more >
Use feature flags
Feature flags, also known as feature toggles, are a software development ... Full Stack supports advanced feature flagging through the core concept of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found