It does seem like there's inconsistent behavior in the simulator -- for example if a resource fails to start, in some cases like the one you showed above, the console keeps working fine / the simulator tries to keep running. But in other examples, the failure of one resource to start will cause a blue screen of death, for example try out this example (I ran it with Wing 0.76.19):
bring cloud;
bring util;
bring sim;
let service1 = new sim.Resource(inflight (ctx) => {
util.sleep(5s);
// ctx.resolveToken("foo", "foo");
throw "Oops";
}) as "Service1";
let t1 = service1.createToken("foo");
let service2 = new sim.Resource(inflight (ctx) => {
util.sleep(5s);
throw "Oops";
log(t1);
}) as "Service2";
new cloud.Bucket();
It does seem like there's inconsistent behavior in the simulator -- for example if a resource fails to start, in some cases like the one you showed above, the console keeps working fine / the simulator tries to keep running. But in other examples, the failure of one resource to start will cause a blue screen of death, for example try out this example (I ran it with Wing 0.76.19):
Originally posted by @Chriscbr in https://github.com/winglang/wing/issues/6858#issuecomment-2214283021