microsoft / microsoft/pxt-microbit

mechanims for extensions that require features in beta to declare it (and not load in live)

Open
#4,691 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extension
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

During development of features that require CODAL changes, we may end up with a situation where an extension only works with an updated CODAL, say in the beta release of MakeCode

At the moment, it doesn't seem like there's anything preventing these extensions from being loaded into the live editor and causing errors. As an example, here's an extensions developed in beta, that relies on the new sound blocks and latest CODAL:

https://github.com/jaustin/pxt-musicextras

Despite this section in pxt.json

...
    "targetVersions": {
        "branch": "v4.1.22",
        "tag": "v4.1.22",
        "commits": "https://github.com/microsoft/pxt-microbit/commits/87c494673712c7699f68564a13e1b634d20da326",
        "target": "4.1.34",
        "pxt": "7.5.14",
        "targetId": "microbit"
    },
...

The extensions still loads in live today, but has no blocks and looks wrong.

As we would like to be able to continue to user-test new features between annual MakeCode releases it would be great to have one of the following things happen:

  • We can mark an extension as 'beta' which would mean it can only be used in the beta editor (perhaps only show up in beta editor?)
  • we can have fine-grained control over the required versions and things like 'live' will refuse to load extensions that require things newer than live contains (and perhaps prompts to try /beta)
  • Something else that stops extensions that we're testing being loaded into live where they won't work.

(perhaps this already exists and I don't know the flags, sorry if so!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the pxt.json targetVersions metadata and how the live and beta editors decide whether to load an extension. Define a compatibility or beta-only behavior that prevents extensions requiring newer CODAL or editor features from loading in live, and verify that the example extension is rejected or directed to beta.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.