statelyai / studio-issues

Report issues found in Stately Studio
5 stars 0 forks source link

VS-Code Extension - Edits make in editor are not reflected in code #40

Closed dhirjgupta closed 2 years ago

dhirjgupta commented 2 years ago

Enviroment:

Steps to reproduce:

  1. request beta access to stately
  2. install vscode extension and log in
  3. restart vscode
  4. create a simple machine (code below)
  5. open machine in editor
  6. make edits

Result:

Expected Result:

Initial Machine

export type Context = {};

export type Event = { type: 'BURN'; } | { type: 'DOUSE'; } 

export const ElementalMachine = createMachine({
  schema: {
    context: {} as Context,
    events: {} as Event,
  },
  tsTypes: {} as import('./elemental.machine.typegen').Typegen0,
  states: {},
});

edits made in editor that are not reflected

  1. Changing the machine name
  2. Adding child states "fire" and "water"
  3. Adding event BURN from "water" goes to "fire" state
  4. Adding event DOUSE from "fire" goes to "water" state

attempts to fix

  1. Attempted adding an initial state, incase the lack of initial state was causing a bug
    export const ElementalMachine= createMachine({
    schema: {
    context: {} as Context,
    events: {} as Event,
    },
    tsTypes: {} as import('./elemental.machine.typegen').Typegen0,
    initial: 'water',
    states: {
    water: {},
    },
    });
    No change. Still fails
  2. My stately account didn't have a system set up. In case the vscode machines are synced with a stately account system, I added a system to my stately account. No change.
dhirjgupta commented 2 years ago

attempt 3:

dhirjgupta commented 2 years ago

Duplicate of another known Issue: https://github.com/statelyai/xstate-vscode/issues/47